Is it possible to have an application detect when ADB is listening over USB on an Android phone?
I'm looking for something like this: Is it possible to determine whether an Android device is plugged into a computer or just power? but specifically for when ADB is running.
Thanks!
Settings.Global.getInt(context.getContentResolver(), Settings.Global.ADB_ENABLED, 0);
Will return a 1 if USB Debugging is enabled on the phone and a 0 if it isn't.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With