Skip to content

Instantly share code, notes, and snippets.

@pantos27
Last active May 30, 2024 12:55
Show Gist options
  • Save pantos27/a19762b1edd3f785733bb343990a891f to your computer and use it in GitHub Desktop.
Save pantos27/a19762b1edd3f785733bb343990a891f to your computer and use it in GitHub Desktop.
get current activity wit ADB
adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp|mObscuringWindow'
@umkhanqta
Copy link

not working for Android API 30

@pantos27
Copy link
Author

pantos27 commented Sep 3, 2020

not working for Android API 30

Thanks for the heads up. I've updated the script to work with API 29 and above

@umkhanqta
Copy link

umkhanqta commented Sep 3, 2020

I used
adb shell dumpsys window displays | grep -E 'mCurrentFocus|mFocusedApp
is it OK

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