9

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 with from my PC using Vysor, because I previously had USB debugging activated. However, I accidently 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:

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 setted 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.

4
  • 1
    Keep in mind that you are running the recovery OS, not the main OS. Also consider that certain paths may be loaded from a RAM-disk image, there editing has no persistent effect.
    – Robert
    Aug 23, 2018 at 18:20
  • Then, where should I make the changes necessary for the main OS to apply my parameters? Is there any file which is being loaded from boot that I can edit to activate usb debugging? Aug 24, 2018 at 21:11
  • May be you should elaborate first why you need adb on your main OS. From your description it seems like you already have adb access from the recovery rom and it looks like you have access to your data partition. Therefore you can backup your data and migrate it to a new phone.
    – Robert
    Aug 25, 2018 at 11:49
  • 1
    Because right now I can't afford a new phone. I'm not looking for a backup of my data, what I'm looking for is to be able to use my phone from the computer. As I said, I use an app named Vysor that mirrors the screen and lets me manipulate it, but for it to work, USB Debugging must be activated. Aug 28, 2018 at 20:17

0

You must log in to answer this question.

Browse other questions tagged .