Adb over network without previous USB pairing

2019-05-07 16:11发布

问题:

I have an android 4.2.2 that requires the ADB connection to match an approved fingerprint.

The problem is that the device need to be paired using a USB cable the first time which in my situation will be a problem.

My development environment is running in VirtualBox and I have previously given up trying to get USB to work and instead used the ADB over the network.

The Android SDK Platform-tools is the latest 1601.

Is there any way for me to manually add the key from the virtual machine to my device?

I have a working Android SDK on my host and root access to my device if that can be used to fix this.

回答1:

This solution requires root on the device.

From the development machine, copy the single line from $HOME/.android/adbkey.pub.

QAAAAJk..................QA= @myhost

And append it to /data/misc/adb/adb_keys on your android device. adb_keys contain one key per line so if you previously have paired any other machines they will show up here.

Restart the device.



标签: android adb