Signature

Get current running app id and activity

Feb 08, 2015

Sometimes you may want to check what’s the app id for current running application, and also you want to know what’s the current visible activity name.

Here you go:

adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'

References:

Android Debug Bridge