当前位置:   article > 正文

使用adb命令管理应用_adb shell pm install

adb shell pm install
第一步:上传应用
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 包名
  • 1
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
修改IP地址
adb shell ifconfig eth0 192.168.4.223 netmask 255.255.255.0
  • 1

查看IP地址

adb shell netcfg
  • 1

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

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

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

设置主页面

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

安全

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

手机无线信息

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

更多页面

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 日期和坝上旅游网时间设置
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

adb拉取tombstones文件

adb pull /data/tombstones D:\
  • 1

adb拉取anr文件

adb pull /data/anr/traces.txt
  • 1
本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/320546
推荐阅读
相关标签
  

闽ICP备14008679号