adb 启动应用/ 调起 Activity

adb 启动应用/ 调起 Activity

启动应用/ 调起 Activity

指定Activity名称启动

命令格式:

adb shell am start [options]

例如:

adb shell am start -n com.tencent.mm/.ui.LauncherUI

表示调起微信主界面。

adb shell am start -n org.mazhuang.boottimemeasure/.MainActivity --es "toast" "hello, world"

表示调起 org.mazhuang.boottimemeasure/.MainActivity 并传给它 string 数据键值对 toast - hello, world。 不指定Activity名称启动(启动主Activity) 命令格式:

adb shell monkey -p

-c android.intent.category.LAUNCHER 1

例如:

adb shell monkey -p com.tencent.mm -c android.intent.category.LAUNCHER 1

表示调起微信主界面。

posted @ 2022-05-24 17:08  木子墨墨  阅读(3810)  评论(0)    收藏  举报