I need to prevent others from accessing my phone via adb. Any way we can have password protection for adb connection?
问题:
回答1:
Since Android 4.2.2, connections to ADB are authenticated with an RSA keypair. This prevents unauthorized use of ADB where the attacker has physical access to a device.
Security Enhancements in Android 4.3
回答2:
As far as I know, there's no way to set an extra password specific to adb access.
If you have USB debugging (adb) enabled, on Android 4.3 or later you need to manually accept the host computer on your device before debugging is enabled.
So unless somebody has access and PIN/password to your phone AND the computer you already authorized for USB debugging that phone, your phone should be safe. However, there are security holes such as this which means that if you're using an old device, maybe it's time for a custom ROM based on a recent version of Android.
With earlier versions of Android, I used an app called Delayed Lock with the "helper app" add-on (ROOT required), that automatically enabled/disabled USB debugging when you unlock/lock your phone.
回答3:
As long as the "USB debugging" (check it here) is disabled and phone is locked so no one can have the access to this option, no one can use your phone for adb connection.
Refer wipe data remotely for an ill fortunate situation.