【追风筝的人】ADB常用命令使用总结

0、修改计算云的写权限命令

chown -R 用户管理组:用户 /mnt/disk/honor_zh,例如:

chown -R zhanghui:zhanghui /mnt/disk/honor_zh

1、adb shell
(1)进入到shell,可以进行设备信息管理、查看等操作
(2)有些命令的执行需要root权限,所以如果执行失败请确认设备是否执行了root操作
    # - -root
    $ -- 普通用户


2、adb remount
将设备修改为可读可写


提示remount成功。

3、adb pull 源路径  目的路径
(1)将文件从设备copy 到电脑
(2)使用前最好先执行adb remount
(3)使用举例:
    adb pull system/lib64/libwakeup_engine_jni.so C:\Users\z00017938\Desktop\qcom_wakeeup_so

4、adb push 源路径 目的路径
(1)将文件从电脑copy 到设备
(2)使用前最好先执行adb remount操作
(3)使用举例:
    adb push  C:\Users\z00017938\Desktop\qcom_wakeeup_so system/lib64/

5、adb reboot 或adb shell reboot
重启设备

6、adb -s device1 reboot
如果一台电脑连接多台手机,具体指定哪台手机重启需要指定设备号,device1--设备号

7、adb shell reboot -p
关机命令

8、查看android版本:
adb shell getprop ro.build.version.release

9、查看sdk版本:
adb shell getprop ro.build.version.sdk

10、打印 apk 的路径
adb shell pm path <package>

11、清除应用缓存
adb shell pm clear <package>

12、adb logcat
adb logcat [options] [filter-specs]

//将log信息直接输出到屏幕
当然可以像 Android Studio 一样只打印固定的日志
adb logcat *:V    lowest priority, filter to only show Verbose level
adb logcat *:D    filter to only show Debug level
adb logcat *:I     filter to only show Info level
adb logcat *:W   filter to only show Warning level
adb logcat *:E    filter to only show Error level
adb logcat *:F    filter to only show Fatal level
adb logcat *:S   Silent, highest priority, on which nothing is ever printed

//将log输出到特定的文件中
adb logcat *:I >C:\Users\z00017938\Desktop\log\log_I.log

adb logcat -b <Buffer>
adb logcat -b radio View the buffer that contains radio/telephony related messages.
adb logcat -b event View the buffer containing events-related messages.
adb logcat -b main default
adb logcat -c Clears the entire log and exits.
adb logcat -d Dumps the log to the screen and exits.
adb logcat -f test.logs Writes log message output to test.logs .
adb logcat -g Prints the size of the specified log buffer and exits.
adb logcat -n <count> *Sets the maximum number of rotated logs to <count>. *

13、adb shell dumpsys --获取系统数据
adb shell dumpsys [options]


14、adb shell getprop
获取 Android 系统服务属性

15、adb shell setprop
设置服务属性

16、adb shell logcat 命令,将log信息重定向到特定文件中
adb shell logcat ->D:\txt111.txt

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一只特立独行的程序猿

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值