当前位置:网站首页>App移动端测试【4】apk的操纵
App移动端测试【4】apk的操纵
2022-07-03 15:30:00 【Leo_Eagle】
apk的安装与卸载
1. 安装apk
1.1 默认安装
C:\Users\Leo>adb connect 127.0.0.1:62001
already connected to 127.0.0.1:62001
C:\Users\Leo>adb install G:\weixin703android1400.apk
Performing Push Install
[ 34%] /data/local/tmp/weixin703android1400.apk
1.2 覆盖安装
C:\Users\Leo>adb install -r G:\weixin703android1400.apk
1.3 指定设备安装(覆盖)
C:\Users\Leo>adb –s 127.0.0.1:62001 install -r G:\weixin703android1400.apk
2. 卸载apk
注意:卸载apk需要进入到shell里面(adb shell)
2.1 首先进入到/data/app/下。
C:\Users\Leo>adb shell
[email protected]:/ # cd /data/app/
2.2 执行删除命令(退出shell模式,在cmd下通过adb uninstall删除apk)
adb uninstall
C:\Users\Leo>adb shell
[email protected]:/ # cd /data/app/
[email protected]:/data/app # ls
com.tencent.mm-2
com.tencent.mobileqq-1
[email protected]:/data/app # adb uninstall com.tencent.mm
/system/bin/sh: adb: not found
C:\Users\Leo>adb uninstall com.tencent.mm
格式:
adb uninstall com.tencent.mm
adb uninstall | -k com.tencent.mm 说明:-k卸载软件但是配置及缓存文件保存。
注意:
在/data/app/目录下查询的包末尾都带数字,但是adb uninstall *** 的时候末尾的『-1或-n』等要抹掉。
如adb uninstall com.tencent.mm
com.tencent.mm-2
com.tencent.mobileqq-1
3. 查看设备上面的安装应用
C:\Users\Leo>adb -s 127.0.0.1:62001 shell
[email protected]:/ # pm list package
或
C:\Users\Leo>adb shell pm list package
测试精讲视频
如果你觉的文章读的不过瘾,可以查看详细的视频教程。
学习路线如下




边栏推荐
- Halcon and WinForm study section 1
- Relationship between truncated random distribution and original distribution
- 【云原生训练营】模块七 Kubernetes 控制平面组件:调度器与控制器
- 在MapReduce中利用MultipleOutputs输出多个文件
- XWiki安装使用技巧
- socket. IO build distributed web push server
- Reentrantlock usage and source code analysis
- C language brush questions ~leetcode and simple questions of niuke.com
- Concurrency-02-visibility, atomicity, orderliness, volatile, CAS, atomic class, unsafe
- Jvm-03-runtime data area PC, stack, local method stack
猜你喜欢

视觉上位系统设计开发(halcon-winform)-4.通信管理

视觉上位系统设计开发(halcon-winform)-3.图像控件

WinDbg analysis dump file

Characteristics of MySQL InnoDB storage engine -- Analysis of row lock

Unityshader - materialcapture material capture effect (Emerald axe)

【云原生训练营】模块八 Kubernetes 生命周期管理和服务发现

Summary of JVM knowledge points

Leasing cases of the implementation of the new regulations on the rental of jointly owned houses in Beijing

String functions that you need to know

百度智能云助力石嘴山市升级“互联网+养老服务”智慧康养新模式
随机推荐
Redis single thread problem forced sorting layman literacy
Tensorflow realizes verification code recognition (III)
Solve the problem that pushgateway data will be overwritten by multiple push
Idea does not specify an output path for the module
String functions that you need to know
Nppexec get process return code
Atlas atlas torque gun USB communication tutorial based on mtcom
Popular understanding of ovo and ovr
Using Tengine to solve the session problem of load balancing
Reentrantlock usage and source code analysis
Calibre LVL
C language brush questions ~leetcode and simple questions of niuke.com
《微服务设计》读书笔记(下)
在MapReduce中利用MultipleOutputs输出多个文件
Chapter 04_ Logical architecture
PyTorch crop images differentiablly
函数栈帧的创建和销毁
需要知道的字符串函数
Win10 enterprise 2016 long term service activation tutorial
Kubernetes - yaml file interpretation