Skip to content

Instantly share code, notes, and snippets.

@109021017
Created February 3, 2016 09:32
Show Gist options
  • Save 109021017/43e7f5ad1361ad9caa3e to your computer and use it in GitHub Desktop.
Save 109021017/43e7f5ad1361ad9caa3e to your computer and use it in GitHub Desktop.
A shell script log the current android top activity
oldActvity=""
displayName=""
currentActivity=`adb shell dumpsys window windows | grep -E 'mCurrentFocus'`
while true
do
if [[ $oldActvity != $currentActivity && $currentActivity != *"=null"* ]]; then
displayName=${currentActivity##* }
displayName=${displayName%%\}*}
echo $displayName
oldActvity=$currentActivity
fi
currentActivity=`adb shell dumpsys window windows | grep -E 'mCurrentFocus'`
done
@bonebizz21
Copy link

content://media/external/file/113141

@bonebizz21
Copy link

content://media/external/file/113141

@bonebizz21
Copy link

content://media/external/file/113141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment