【追风筝的人】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 的路径 11、清除应用缓存 12、adb logcat //将log信息直接输出到屏幕 //将log输出到特定的文件中 adb logcat -b 13、adb shell dumpsys –获取系统数据
adb shell pm path
adb shell pm clear
adb logcat [options] [filter-specs]
当然可以像 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
adb logcat *:I >C:\Users\z00017938\Desktop\log\log_I.log
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
adb shell dumpsys [options]