adb shell 启动,停止 android 应用程序

作者: 光剑书架上的书 | 来源:发表于2017-05-12 15:26 被阅读395次

一、adb启动 应用程序

(1)查看app包名:
进入android操作系统

adb shell

在root@android:/ # 后边,输入

cd data/data

然后输入ls

这样就能看见android系统上安装的安装包 包名:
例如:

cn.com.conversant.swiftsync.android
com.android.backupconfirm
com.android.browser
com.android.calculator2
com.android.calendar
com.android.camera
...

(2)adb启动 应用程序

adb shell am start -n cn.com.conversant.swiftsync.android/cn.com.conversant.swiftsync.android.main.SplashActivity

备注:

adb shell am start -n 包名/Activity类的类名

包名和Activity类的类名一定要输入正确,可以用re-sign工具(在最后的弹出信息框会显示出包名和Activity类名)。

二、adb停止 应用程序

adb shell am force-stop  cn.com.conversant.swiftsync.android

备注:

cn.com.conversant.swiftsync.android 

为包名。

相关文章

网友评论

    本文标题: adb shell 启动,停止 android 应用程序

    本文链接:https://www.haomeiwen.com/subject/iioztxtx.html