Linux:
adb shell dumpsys activity | grep "mFocusedActivity"
Windows:
adb shell dumpsys activity | findstr "mFocusedActicity"
adb shell dumpsys window w | grep \/ | grep name=