The android adb command gets the Activity on the current screen

The android adb command gets the Activity on the current screen

Use the adb command:

adb shell dumpsys activity activities

 

output, for example:

ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
Display #0 (activities from top to bottom):
  * Task{38ef601 #5281 type=standard A=10450:com.example.myapplication U=0 visible=true visibleRequested=true mode=fullscreen translucent=false sz=1}
    mResizeMode=RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION
    mHasBeenVisible=true
    mDexDocking=undefined
    isSleeping=false
    topResumedActivity=ActivityRecord{46a9fe8 u0 com.example.myapplication/.MainActivity} t5281}
    * Hist  #0: ActivityRecord{46a9fe8 u0 com.example.myapplication/.MainActivity} t5281}
      packageName=com.example.myapplication processName=com.example.myapplication
      launchedFromUid=10127 launchedFromPackage=com.sec.android.app.launcher launchedFromFeature=null userId=0       
      app=ProcessRecord{6143248 17697:com.example.myapplication/u0a450}
      Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.example.myapplication/.MainActivity bnds=[795,139][1041,474] }
      rootOfTask=true task=Task{38ef601 #5281 type=standard A=10450:com.example.myapplication U=0 visible=true visibleRequested=true mode=fullscreen translucent=false sz=1}
      taskAffinity=10450:com.example.myapplication
      mActivityComponent=com.example.myapplication/.MainActivity
      baseDir=/data/app/~~k6HJUDEleb5O5lC7hfnd_w==/com.example.myapplication-Ijc7ZXChoYAHUGpC-CPB9Q==/base.apk       
      dataDir=/data/user/0/com.example.myapplication
      stateNotNeeded=false componentSpecified=false mActivityType=standard
      compat={540dpi} labelRes=0x7f0f001c icon=0x7f0d0000 theme=0x7f100262

 

has been clearly informed

Display #0 (activities from top to bottom):

From top to bottom, #0 0 is the interface data displayed on the current screen.

 

Android adb shell dump all activities of the current mobile device_zhangphil's blog-CSDN blog adb command: adb shell dumpsys activity activites https://blog.csdn.net/zhangphil/article/details/120982891

 

Guess you like

Origin blog.csdn.net/zhangphil/article/details/129597475