使用adb命令管理应用

第一步:上传应用
adb push <apk当前绝对路径> <apk上传路径>push
第二步:安装应用
adb shell pm install -t -r <apk所在路径>install
第三步:查看包名
adb shell pm list package -fpm
第四步:查看启动Activity类名
4-1:adb shell
4-2: dumpsys package <应用包名>
4-3:找到Category为Launcher的Activity在这里插入图片描述

在这里插入图片描述

第五步:启动应用
adb shell am start -n <应用包名>/<应用启动Activity绝对名称>在这里插入图片描述
第六步:卸载应用
adb uninstall <应用包名>

PS:工作中可能会遇到卸载system下的应用,如果使用上面的命令就行不通了,可以尝试一下下面的命令:adb shell pm uninstall --user 0 <应用包名>

卸载
adb uninstall 包名
adb卸载系统应用
//卸载:
adb shell pm uninstall --user 0 应用包名 

停用:
adb shell pm disable-user 应用包名 

启用:
adb shell pm enable 应用包名
adb停止应用进程:
adb shell am force-stop 应用包名

adb获取root权限:
adb root

adb重新挂载:
adb remount

adb查看系统版本:
adb shell getprop ro.build.version.release

adb查看内存使用:
adb shell 
cat /proc/meminfo
修改IP地址
adb shell ifconfig eth0 192.168.4.223 netmask 255.255.255.0

查看IP地址

adb shell netcfg

如何查看android设备属于什么架构的?

第一步:输入 adb shell 回车
第二步:cat /proc/cpuinfo 回车

adb命令打开手机设置页面:

设置主页面

adb shell am start com.android.settings/com.android.settings.Settings

安全

adb shell am start com.android.settings/com.android.settings.SecuritySettings

手机无线信息

adb shell am start com.android.settings/com.android.settings.RadioInfo

更多页面

com.android.settings.AccessibilitySettings 辅助功能设置
com.android.settings.ActivityPicker 选择活动
com.android.settings.ApnSettings APN设置
com.android.settings.ApplicationSettings 应用程序设置
com.android.settings.BandMode 设置GSM/UMTS波段
com.android.settings.BatteryInfo 电池信息
com.android.settings.DateTimeSettings 日期和坝上旅游网时间设置

adb拉取tombstones文件

adb pull /data/tombstones D:\

adb拉取anr文件

adb pull /data/anr/traces.txt
  • 5
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值