adb命令启动app及查找系统版本号

以查找com.web.app为例。

获取应用的包名/activity名称:

1)打开应用

2)输入命令adb shell dumpsys activity activities

      affinity=com.web.app

      intent={act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.web.app/.WelcomeActivity}

 

查找包名:adb shell pm list packages | grep bq

package: com.web.app

 查找Main Activity:adb shell "cmd package resolve-activity --brief  package: com.web.app|tail -n 1"

 

 % adb shell pm dump com.web.app| grep -A 1 MAIN

android.intent.action.MAIN:

        a88942c com.web.app/.WelcomeActivity filter a90f3a9

--

          Action: "android.intent.action.MAIN"

          Category: "android.intent.category.LAUNCHER"

 

从设备获取apk:adb shell pm list packages -f | grep bq

package:/data/app/com.web.app-5YAAo-bMk33qItMJ8_3o8w==/base.apk=com.web.app

 

adb获取android系统版本:% adb shell getprop ro.build.version.release

adb获取android系统api版本:

adb shell getprop ro.build.version.sdk

获取手机相关制造商信息:

adb shell getprop | grep "model\|version.sdk\|manufacturer\|hardware\|platform\|revision\|serialno\|product.name\|brand"

adb命令启动app及查找系统版本号

上一篇:UVALive3971组装电脑


下一篇:Database Designer