Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aktentasche/7d4ae160c3fc3b126d9f83fd0a0e98d6 to your computer and use it in GitHub Desktop.
Save aktentasche/7d4ae160c3fc3b126d9f83fd0a0e98d6 to your computer and use it in GitHub Desktop.
adb enable debug in recovery mode and show screen on PC
# this helps with a broken display or touch on an android phone
# the phone needs to be rooted and adb installed
# boot into recovery mode and type
adb shell setprop persist.service.adb.enable 1
adb shell setprop persist.service.debuggable 1
adb shell setprop persist.sys.usb.config mtp,adb
# then copy adb key so the accept fingerprint dialog is skipped
cd ~/.android
adb push adbkey.pub /data/misc/adb/adb_keys
# finally reboot phone. for me this shuts the phone down, so
# you might need to push the power button separately
adb reboot
# run scrcpy to see the screen, see https://github.com/Genymobile/scrcpy
scrcpy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment