1

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

4
  • Can you see your device listed after running adb devices command?
    – Puspam
    Sep 20, 2019 at 5:57
  • Please add some screenshots.
    – Puspam
    Sep 20, 2019 at 5:58
  • yes. my devices is listed on adb devices command. but now i cant get in to my phone. it is locked and ask for activating mi account. maybe i will try to flash it. Sep 20, 2019 at 6:57
  • It's chicken or the egg situation. USB Debugging enables you to use Android Debugging Bridge (adb). And you want to activate USB Debugging using adb. Feb 16, 2020 at 13:06

2 Answers 2

1

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.

0

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

1
  • 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .