Skip to content

Instantly share code, notes, and snippets.

@ashdavies
Created November 18, 2023 16:43
Show Gist options
  • Save ashdavies/66b9770a82be59f064c9d7c8b592ca87 to your computer and use it in GitHub Desktop.
Save ashdavies/66b9770a82be59f064c9d7c8b592ca87 to your computer and use it in GitHub Desktop.
current.sh
#!/bin/sh
if test $# -lt 1; then
echo "usage: current SERIAL"
exit 1
fi
adb -s "$1" shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment