i have xiaomi phone and forget mi account. so i try to restore it using factory reset. i try to enabling USB debuging then. but it says "developer option is not avaiable for this user". adb is active. my question is "is it possibe to activate usb debugging using adb command, and how?" thanks
2 Answers
If the usb debugging is off. Your device won't appear in adb devices
list.
So you cannot turn it on any other way than opening the developer options and manually enabling it.
YES you can switch on USB debugging through ADB provided you bootlaoder is unlocked. Just have to pull few files ---> edit them ---> Push them back. It is explained on Github: https://gist.github.com/pantasio/3d0eb4bb03a1e696aae8696f60730859#file-enable-usb-debug-adb
-
Since Android 9
/data/property/persist.sys.usb.config
no more exists. Now there's only one file:/data/property/persistent_properties
. And that too isn't plain text but includes arbitrary characters. Even after editing that,adb
authentication won't work without extra steps. Feb 16, 2020 at 12:52
adb devices
command?adb
). And you want to activate USB Debugging usingadb
.