Skip to content

Instantly share code, notes, and snippets.

@thomascrepain
Last active September 26, 2019 09:12
Show Gist options
  • Save thomascrepain/2b6e6384417766ab1d131a63c843b180 to your computer and use it in GitHub Desktop.
Save thomascrepain/2b6e6384417766ab1d131a63c843b180 to your computer and use it in GitHub Desktop.
Android Debug Bridge (adb) cheat sheet - much used but not remembered
source: http://adbshell.com/commands
# Link to phone
adb devices
adb shell
# Download file from phone
adb pull /sdcard/path/to/file
# Download multiple files from phone
adb shell 'ls /sdcard/DCIM/Camera/*' | tr -d '\r' | sed -e 's/^\///' | xargs -n1 adb pull
# Take screenshot and download
adb shell screencap -p /sdcard/screenshot.png; adb pull /sdcard/screenshot.png; adb shell rm /sdcard/screenshot.png
# Record screen (stop: Ctrl + C) and download
adb shell screenrecord --verbose /sdcard/screen.mp4; adb pull /sdcard/screen.mp4; adb shell rm /sdcard/screen.mp4
# Display & control android screen on computer
# 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