Skip to content

Instantly share code, notes, and snippets.

@florianbussmann
Last active August 18, 2023 10:51
Show Gist options
  • Save florianbussmann/3193daacfec45c84a5ee0474cfda596e to your computer and use it in GitHub Desktop.
Save florianbussmann/3193daacfec45c84a5ee0474cfda596e to your computer and use it in GitHub Desktop.
Enable ADB debugging
## Delete persist.sys.usb.config from /data/property/persistent_properties (defaults to none and overrides build.prop)
adb pull /data/property/persistent_properties
# modify as needed
adb push persistent_properties /data/property/persistent_properties
adb shell
raphael:/ # chmod 600 /data/property/persistent_properties
## Add persist.sys.usb.config to build.prop
raphael:/ # mount /dev/block/bootdevice/by-name/system
raphael:/ # echo '' >> /system_root/system/build.prop
raphael:/ # echo '# Enable ADB' >> /system_root/system/build.prop
raphael:/ # echo 'persist.service.adb.enable=1' >> /system_root/system/build.prop
raphael:/ # echo 'persist.service.debuggable=1' >> /system_root/system/build.prop
raphael:/ # echo 'persist.sys.usb.config=mtp,adb' >> /system_root/system/build.prop
raphael:/ # reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment