1、默认打开应用权限
adb shell dumpsys activity appops on
2、对system分区进行操作
adb root
adb disable-verity
adb reboot
adb root
adb remount
3、复制文件夹到指定目录
src_files := $(shell ls $(LOCAL_PATH)/source/app )
PRODUCT_COPY_FILES += $(foreach file, $(src_files), \$(LOCAL_PATH)/source/app/$(file):system/app/$(file))
4、编bootimage
make bootimage -B -j24
5、查看SELinux权限错误log
adb shell
logcat | grep 'avc:'
6、Monkey命令(全模块)
adb shell "monkey --ignore-crashes --ignore-timeouts --throttle 500 --ignore-security-exceptions --monitor-native-crashes --ignore-native-crashes 10000 > sdcard/monkey.txt"
adb shell monkey --ignore-crashes --ignore-timeouts --ignore-security-exceptions --monitor-native-crashes --ignore-native-crashes --throttle 500 -v -v -v 999999999
7、Monkey命令(单模块)
adb shell monkey -p com.android.contacts --ignore-crashes --ignore-timeouts --ignore-security-exceptions --monitor-native-crashes --ignore-native-crashes --throttle 500 -v 10000 > sdcard/monkey.txt"
8、获取包名所在路径
adb shell pm path {package}
adb shell pm list packages -3
10、强行停止monkey
adb shell
ps | grep monkey
kill monkey对应pid
11、列出所有可以dump的选项
adb shell dumpsys -l
12、定位一个包属于哪个应用
adb shell pm path (包名)
13、冷冻GMS
*#*#741#*#*
14、查看当前正在运行的程序
dumpsys activity | grep "Running activities" -A 7
15、查看内存信息
adb shell dumpsys meminfo > meminfo.txt