当前位置:网站首页>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
测试精讲视频
如果你觉的文章读的不过瘾,可以查看详细的视频教程。
学习路线如下
边栏推荐
- 秒杀系统3-商品列表和商品详情
- 求字符串函数和长度不受限制的字符串函数的详解
- Markdown file titles are all reduced by one level
- Tensorflow realizes verification code recognition (II)
- redis缓存穿透,缓存击穿,缓存雪崩解决方案
- Relationship between truncated random distribution and original distribution
- Characteristics of MySQL InnoDB storage engine -- Analysis of row lock
- The state does not change after the assignment of El switch
- Subclass hides the function with the same name of the parent class
- Chapter 04_ Logical architecture
猜你喜欢
Popular understanding of gradient descent
Kubernetes 进阶训练营 Pod基础
Halcon and WinForm study section 2
Detailed explanation of string function and string function with unlimited length
Digital image processing -- popular Canny edge detection
What is machine reading comprehension? What are the applications? Finally someone made it clear
Seckill system 2 redis solves the problem of distributed session
The markdown file obtains the pictures of the network and stores them locally and modifies the URL
视觉上位系统设计开发(halcon-winform)
秒殺系統3-商品列錶和商品詳情
随机推荐
【云原生训练营】模块八 Kubernetes 生命周期管理和服务发现
The method of parameter estimation of user-defined function in MATLAB
Kubernetes带你从头到尾捋一遍
PyTorch crop images differentiablly
视觉上位系统设计开发(halcon-winform)-6.节点与宫格
《微服务设计》读书笔记(下)
Backtracking method to solve batch job scheduling problem
Tensorflow realizes verification code recognition (I)
UnityShader——MaterialCapture材质捕捉效果 (翡翠斧头)
Kubernetes will show you from beginning to end
What are the composite types of Blackhorse Clickhouse, an OLAP database recognized in the industry
阿特拉斯atlas扭矩枪 USB通讯教程基于MTCOM
CString在多线程中的问题
Halcon and WinForm study section 2
do{}while()的妙用
Popular understanding of random forest
视觉上位系统设计开发(halcon-winform)-3.图像控件
The wonderful use of do{}while()
通过进程PID获取可执行文件路径(QueryFullProcessImageName)
XWiki Installation Tips