Skip to content

Instantly share code, notes, and snippets.

@robot9706
Last active May 13, 2020 14:28
Show Gist options
  • Select an option

  • Save robot9706/c506a6d0c4c76ad5fdaf2967071bb36f to your computer and use it in GitHub Desktop.

Select an option

Save robot9706/c506a6d0c4c76ad5fdaf2967071bb36f to your computer and use it in GitHub Desktop.
List all packages with APK locations:
pm list packages -f
Create a backup of an app (including /data/data files):
adb backup -f backup.bak -noapk [package name]
Get foreground app:
dumpsys window windows | grep -E 'mCurrentFocus' | cut -d '/' -f1 | sed 's/.* //g'
Take screenshot:
adb exec-out screencap -p > screen.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment