Skip to content

Instantly share code, notes, and snippets.

@cvan
Created September 16, 2020 02:02
Show Gist options
  • Save cvan/07590e84c15c602692160832ac7437cb to your computer and use it in GitHub Desktop.
Save cvan/07590e84c15c602692160832ac7437cb to your computer and use it in GitHub Desktop.
useful adb commands

connectivity

  • adb devices

screenshots

FN=screenshot_$(date +%F_%T).png adb shell screencap -p $FN
adb pull /sdcard/$FN ~/Downloads/
FN=screenvideo_$(date +%F_%T).mp4 adb shell screenrecord /sdcard/$FN
adb pull /sdcard/$FN ~/Downloads/

pull all

adb pull /sdcard/ ~/Downloads/

shell

  • adb shell
  • adb shell 'pm list packages -f'
  • FN=props_$(date +%F_%T).ini adb shell getprop > $FN
  • adb shell setprop

logs

https://developer.android.com/studio/debug/am-logcat

  • adb logcat | grep -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment