Skip to content

How to get current focus APP by ADB on Android

Using following codes to find out current focus APP:

adb shell dumpsys window | grep mCurrentFocus

Then outputs:

mCurrentFocus=Window{eec6080 u0 com.hihonor.deskclock/com.android.deskclock.AlarmsMainActivity}

Now, We can see that com.hihonor.deskclock is the current focus APP in this case.

Leave a Reply