Android通过命令启动APP的方法

1.首先手动启动APP,然后执行命令“adb shell dumpsys window | findstr mCurrentFocus”获取当前APP的activity

2. 执行命令adb shell am start-activity -S -W + "package name/activity name"

例如启动settings:

adb shell am start-activity -S -W com.android.settings/com.android.settings.Settings

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章