Android通过adb shell am broadcast发送广播 参数说明
1.获取输入命令
adb shell getevent
2.修改系统属性值
adb pull /system/build.prop .
#修改build.prop /system/build.prop
#cd 到 /system/
adb shell chmod 644 build.prop 手动修改权限 build.prop
adb shell sync
adb reboot
3.模仿 ota 升级
1.push update.zip to /data/update.zip(adb push D:\xxx\xxxxx.zip /data/update.zip)
2.adb shell "echo --update_package=/data/update.zip > /cache/recovery/command"
3.adb shell sync
4.adb reboot recovery
4 fatal 相关
adb logcat -v threadtime | grep -i fatal -A 20
exception 相关
adb logcat -v threadtime
adb logcat -v threadtime | grep -i exception -A 20
清除log 相关
adb logcat -c
运行时cup 相关
adb top -m 5
历史log 相关
adb shell logcat -d
kernel 相关
adb shell logcat -b kernel
全log
adb shell logcat
Memory 相关
adb shell dumpsys meminfo
bugreport 相关
adb shell bugreport
进程 相关
adb shell ps
dumpsys 设备信息
adb shell dumpsys
adb临时关闭Selinux
使用setenforce 命令进行设置:
adb shell setenforce 0 //设置成permissive 模式
adb shell setenforce 1 //设置成enforce 模式
adb 查看selinux命令
#有些需要 加上 -c
adb shell su -c dmesg | grep denied
adb shell dmesg | grep denied