aapt&adb笔记

aapt

查看安装包信息aapt list apk路径
* aapt list xxx/app-debug.apk

查看apk文件信息并保存到本地(> 重定向符)

* aapt list xx/app-debug.apk > /Users/user/Desktop/apk.txt
查看apk权限aapt dump (code) apk路径
* aapt dump permissions /Users/jalon/Downloads/huai/app/build/outputs/apk/debug/app-debug.apk
code说明:
*      strings          Print the contents of the resource table string pool in the APK.
badging Print the label and icon for the app declared in APK.
permissions Print the permissions from the APK.
resources Print the resource table from the APK.
configurations Print the configurations in the APK.
xmltree Print the compiled xmls in the given assets.
xmlstrings Print the strings of the given compiled xml assets.

adb

 

 安装apk包到手机 adb install -r apk路径
* adb install -r xxx/app-debug.apk

安装包复制到手机 adb push apk路径 手机路径
* adb push xxx/debug/app-debug.apk  /sdcard
 保存到本地 (adb pull 手机文件 pc路径)
* adb pull sdcard/screenshot.png /Users/user/Desktop/file

 删除文件
  1. adb remount
  2. adb shell
  3. cd sdcard
  4. remove *.apk(remove 文件名)
 查看系统盘符
* adb shell df
 打印Log( | grep + 筛选条件)
* adb shell
* logcat | grep "custominfo"

 在终端中只打印TAG = xyz的日志
* adb logcat -s xyz
 日志保存到手机
* adb logcat -f sdcard/log.txt
 查看已安装的应用
* adb shell pm list package -f | grep "qq"
截屏
* adb shell screencap -p /sdcard/screenshot.png

模拟按键输入(3:home)

* adb shell input keyevent 3
模拟滑动输入(x1 y1 x2 y2)
* adb shell input touchscreen swipe 18 999 18 666


 



转载于:https://www.cnblogs.com/cnman/p/10624586.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值