赞
踩
- adb对于安卓移动端来说,是个非常重要的调试工具。
- 本篇介绍常用的adb指令
adb shell am start {包名}/{启动activity}
如果不知道应用的启动activity,可以尝试使用下面方法:
- 使用adb指令“adb logcat -c”清空日志
- 再使用adb指令“adb logcat ActivityManager:I *:S”,这样会打印出设备上运行的activity信息。
- 启动应用
- 因为前面执行过清空日志的指令,所以很容易找到应用第一个启动的activity
adb shell am start com.tencent.qqmusic/com.tencent.qqmusic.activity.AppStarterActivity
adb shell am start -a android.intent.action.VIEW -d {URL}
adb shell am start -a android.intent.action.VIEW -d https://www.csdn.net/
adb shell am force-stop {包名}
adb shell am kill-all
adb shell am force-stop com.tencent.qqmusic
adb shell pm clear {包名}
adb shell pm clear com.tencent.qqmusic
adb shell pm list packages {选项} {关键字}
adb shell pm list packages samsung
adb详细教程(一)-下载安装与环境变量配置
adb详细教程(二)-开启手机开发者模式、通过adb连接安卓设备
adb详细教程(三)-使用adb安装app、卸载app
—————————————————————————————————
adb安装包我已上传到了本人运营的博客同名公众号【软件测试必备技能】。公众也会不定期会上传测试相关资料,有需要可以前往领取。
有需要可点击文章下方二维码,前往领取~
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。