in my app i need a way to detect if the android-device runs in usb-debugging mode.
Is it possible? If yes, how?
thanx in advance
You can use the following to get whether or not the ADB is enabled.
int adb = Settings.Secure.getInt(context.getContentResolver(), Settings.Secure.ADB_ENABLED, 0);
If it is enabled, adb == 1
, otherwise adb == 0
.
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