Adb查看App信息常用命令

文章展示了如何使用adbshell命令来获取Android设备上应用的详细信息,包括安装包名(如com.android.cts.priv.ctsshim和com.android.providers.telephony)、App的安装目录、版本号(如com.android.bluetooth的versionName为11)、App信息以及如何终止进程和查看当前显示的Activity等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

查看安装包名

#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 #"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值