常用adb 命令

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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值