Search code examples
androidtestingadb

Enabling USB debugging after re flashing the phone


I want to enable the usb debugging option in android phone automatically after my phone is flashed. Is there any possible way I can tell my device without usb debugging option on. All I want is to get my USB debugging option on automatically. Thanks in Advance


Solution

  • use Settings.System with ADB_ENABLED and android.permission.WRITE_SECURE_SETTINGS, but settings cannot be changed by normal application , it requires rooted phone :(