栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

adb常用命令

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

adb常用命令

adb.bat文件

查看当前APP的包名和活动

adb shell dumpsys window | findstr mCurrentFocus

启动APP

adb shell am start com.tal.kaoyan/com.tal.kaoyan.ui.activity.SplashActivity

强制停止APP

adb shell am force-stop com.tal.kaoyan

清理缓存

adb shell pm clear com.tal.kaoyan

卸载APP

adb uninstall com.tal.kaoyan

进入安卓系统

底层是Linux系统,支持Linux命令 exit退出

adb shell 

/data/app APP安装包不是应用商店下载的安装包,不能删除。

/data/data APP安装目录  APP性能相关占用内存

/sdcard存储卡目录  文件管理器

 不进入Android系统直接执行命令

【场景】测试微信时,想测试给好友发送一张超过100M的图片,但测试的手机上没有这么大的图片文件,需要从电脑上发送给手机 

adb push C:UsersadminDesktopkaoyan.mp4 /sdcard/  如果有中文需要加引号

 

adb pull /sdcard/adb.exe d:toolsa.exe

adb install D:toolskaoyan3.1.0.apk
adb shell sleep 5
::启动首页
adb shell am start -n com.tal.kaoyan/.ui.activity.SplashActivity
adb shell sleep 5
::点击‘取消’  根据坐标点击APP相应位置
adb shell input tap 460 710
adb shell sleep 1
::点击‘跳过’
adb shell input tap 650 53
adb shell sleep 1
::点击‘用户名’
adb shell input tap 158 287
adb shell sleep 1
adb shell input text yang10879897
adb shell sleep 1
::点击‘密码’
adb shell input tap 137 353
adb shell sleep 1
adb shell input text yang168168
adb shell sleep 1
::点击‘登录’按钮
adb shell input tap 358 484
adb shell sleep 5

:: 截屏并保存
adb shell screencap -p /sdcard/sc.png
adb pull /sdcard/sc.png d:toolssc.png

:: 停止APP
adb shell am force-stop com.tal.kaoyan
adb shell sleep 1
:: 清理缓存
adb shell pm clear com.tal.kaoyan
adb shell sleep 5
:: 卸载APP
adb uninstall com.tal.kaoyan

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/882733.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号