Get current Activity name by adb shell

Categories: ANDROID like

Here is the command:

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

The output would be:

mCurrentFocus=Window{b6a99d1d0 u0 com.sec.android.app.launcher/com.sec.android.app.launcher.activities.LauncherActivity}

My activity name is: LauncherActivity


    Leave a Reply

    Your email address will not be published. Required fields are marked *