3

Of course this should be possible, but finding the correct files to modify is the real question.

Assuming we can boot into a custom recovery and have full access to the file system, has anyone investigated the steps for enabling USB debugging?

The motivation for this request is that I have a device that will not fully boot, so a log dump would be very helpful in this case.

3

The correct file to modify is the build prop. Which can be risky to modify. This will enable everything needed. Through the file system modify the build.prop or with a computer. If the custom recovery is TWRP or possibly CWM. Then adb comes pre-enabled. Then you also need root and a computer with adb.

  1. boot into your custom recovery.

  2. Plug your device into your computer and open an elevated command prompt.

  3. Throw these commands.

adb shell

su

mount -o remount,rw /system

cd /

echo "persist.service.adb.enable=1" >> default.prop

echo "persist.service.debuggable=1" >> default.prop

echo "persist.sys.usb.config=mtp,adb" >> default.prop

echo "persist.service.adb.enable=1" >> /system/build.prop

echo "persist.service.debuggable=1" >> /system/build.prop

echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop

I have done it this way with a nexus 4 and since this is the build prop. Here are some others that have too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.