Is there a way to get the details of the current activity that is running via adb.
In Eclipse with Android device attached go to Window menu > Show View > Other ... use filter text "Windows" to pull up Android > Windows ... show this. The top item in the list is the current activity.
This example demonstrates How to get current activity name in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.
Step 1: Download “APK Info” app from Google Play Store on your android mobile. Step 4: Click the option “Detailed Information” option. It would show the detailed log for the app. Step 5: Then to find the appActivity name of the app, scroll down to the sub-section “Activities”.
I prefer parsing results of dumpsys window windows
over dumpsys activity
adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'
Keyguard or Recent tasks list used to not show up as Activities but you were able to see them with mCurrentFocus
. I have explained why in this answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With