Enable USB debug mode on Moto G with a cracked or broken screen
This is for a Motorola Moto G XT1028. YMMV for other variations or generations of the phone, but these instructions are fairly generic. The important thing is that you are able to find the appropriate recovery image for your phone. For me, CWM and Philz Recovery didn't work, but TWRP did.
A lot of posts on XDA forums and Android StackExchange have steps for enabling USB debugging mode using the ADB shell. But what if you can't even see your device in "adb devices" in the first place? If your screen is broken and illegible, like mine was, you can't navigate via touch to enable debugging. This was the problem I faced. It took me several hours to really understand the solution.
I won't go into detail for most of these steps as there are many guides already:
- Restart the phone in fastboot mode and connect the USB cable from your PC
- From your PC's command line, run: fastboot devices
- If you see your phone's serial number with the word "fastboot" next to it, your phone is in the fastboot menu.
-
Now we boot into our recovery image. Run: fastboot boot
- Wait a minute or two for the phone to boot into the recovery mode
- Run: adb devices
- You should see your phone's serial number with the word "recovery" next to it.
- Now run: adb shell
- If you don't mount the /system directory in read-write mode, you'd just be modifying temporary recovery /system files that won't persist when you reboot into your normal image. This step was the crucial one that I missed several times earlier, because the mount was never successful I simply copied and pasted from online instructions for other Android phones (in the links below). For the Moto G, the command is: mount -o rw /system
- Now you'll need to add the USB debug and ADB flags to the end of /system/build.prop. XDA post | StackExchange post
- Now, you can reboot into your normal image. Run: adb shell reboot
- Once your phone has completed restarted, run adb devices again and you should see your device listed. If you get see an unauthorized status, check out this post to resolve that issue.
- Now you can use a tool like Android Control to interact with the phone.
List of devices attached
TA965XXXXX fastboot
C:\Installs\Recovery>fastboot boot twrp-3.1.1-0-falcon.img
downloading 'boot.img'...
OKAY [ 0.327s]
booting...
OKAY [ 0.239s]
finished. total time: 0.571s
List of devices attached
TA965XXXXX recovery
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
C:\Installs\Recovery>adb push c:\users\username\.android\adbkey.pub /data/misc/adb/adb_keys
24 KB/s (716 bytes in 0.028s)
C:\Installs\Recovery>adb shell reboot
C:\Installs\Recovery>adb devices
List of devices attached
TA965XXXXX device
Comments
Post a Comment