Adb查看App信息常用命令

查看安装包名

#adb shell pm list package
package:com.android.cts.priv.ctsshim
package:com.android.providers.telephony

查看App安装目录

#adb shell pm -p com.android.bluetooth
package:/system/app/DsvBluetooth/DsvBluetooth.apk

#adb shell
msmnile_gvmq:/ $ pm list packages -f | grep com.android.bluetooth
package:/system/app/DsvBluetoothExt/DsvBluetoothExt.apk=com.android.bluetoothext
package:/system/app/DsvBluetooth/DsvBluetooth.apk=com.android.bluetooth

查看App版本号

#adb shell "dumpsys package com.android.bluetooth |grep versionName"
versionName=11

查看App信息

#adb shell dumpsys package com.android.bluetooth
Activity Resolver Table:
  Full MIME Types:
      vnd.android.cursor.item/vnd.android.btopp:
        52f5d93 com.android.bluetooth/.opp.BluetoothOppLauncherActivity filter 65fd1d0
          Action: "android.btopp.intent.action.OPEN"
          Category: "android.intent.category.DEFAULT"
          StaticType: "vnd.android.cursor.item/vnd.android.btopp"

  Base MIME Types:

终止进程

#adb shell am force-stop com.android.bluetooth

查看当前显示Activity

#adb shell "dumpsys window | grep mCurrentFocus"
  mCurrentFocus=null
  mCurrentFocus=Window{3e38ba7 u0 [包名]/[类名]

查看所有窗口信息

#adb shell
msmnile_gvmq:/ $ dumpsys window windows |grep "Window #"

你可能感兴趣的:(adb,android)