Adb over network without previous USB pairing

2019-05-07 15:37发布

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.

标签: android adb
1条回答
劫难
2楼-- · 2019-05-07 16:07

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.

查看更多
登录 后发表回答