How to enable USB Debugging from recovery mode?
12
votes
0
answers
24837
views
My phone screen broke. I can't see anything, and the touch screen doesn't work. I can't buy a new phone, so I'm not looking into backing up my data. I want to be able to use it from my pc.
I have a Motorola Moto G2 running LineageOS 14.1 and TWRP custom recovery.
Until now, I have been able to use my phone from my PC using [Vysor](https://vysor.io) , because I previously had USB debugging activated. However, **I accidentally deactivated it and now I'm stuck out**.
I can access via ADB through recovery and **already have investigated how to activate USB debugging** again from the shell using these sources:
- https://android.stackexchange.com/questions/112040/how-to-enable-usb-debugging-in-android-if-forgotten-pattern-for-screen-unlock
- https://android.stackexchange.com/questions/120394/can-i-enable-usb-debugging-using-adb
- https://android.stackexchange.com/questions/12834/broken-screen-while-debug-mode-was-disabled-how-can-i-re-enable-adb
- [Enable USB debugging through Clockworkmod with adb ](https://stackoverflow.com/questions/13326806/enable-usb-debugging-through-clockworkmod-with-adb/13332721#13332721)
- https://android.stackexchange.com/questions/55674/how-can-i-enable-adbd-during-boot-on-cyanogenmod
- [Manually enable adb debugging from recovery](https://forum.xda-developers.com/showthread.php?t=2335799)
- [How to authorize adb service from boot](https://groups.google.com/forum/#!topic/mozilla.dev.b2g/epQ6qhIFZ50)
But **none of these solutions have worked for me.**
Here's a brief summary of everything I've tried:
- I've set the content of /data/property/persist.sys.usb.config to
mtp,adb
- I've edited /data/system/users/0/settings_global.xml, setting adb_enabled
, verifier_verify_adb_installs
and development_settings_enabled
to 1
- I've added these lines to /system/build.prop:
`persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb`
- I've used the following setprop
commands:
`setprop persist.service.adb.enable 1
setprop persist.service.debuggable 1
setprop persist.sys.usb.config mtp,adb`
But when I reboot, I still can't see my device when I run adb devices
Not only that, but then **everytime I reboot to TWRP recovery again, I notice that some changes are reversed:**
- /data/property/persist.sys.usb.config content only says adb
- /data/system/users/0/settings_global.xml remains almost intact but adb_enabled
is back to 0
again
- When I run getprop
to all of the properties I've set before using setprop
, it returns an empty string (which makes me suspect that the changes I've been making to /system/build.prop are being completely ignored)
**It's as if everytime the phone boots, the system loads some default configuration and reverses some of the changes I've made and USB debugging remains deactivated**. Am I missing something? I really not know what else to do.
Asked by Luigi Rojas
(121 rep)
Aug 23, 2018, 05:36 PM
Last activity: May 2, 2025, 01:54 AM
Last activity: May 2, 2025, 01:54 AM