日志
Android 系统的日志分为两部分,底层的 Linux 内核日志输出到 /proc/kmsg,Android 的日志输出到 /dev/log 查看日志 adb logcat [] ... [] ...
-
清空日志 adb logcat -c
-
内核日志 adb shell dmesg
查看设备信息、
-
设备型号 adb shell getprop ro.product.model
-
电池状况 adb shell dumpsys battery
-
屏幕分辨率 adb shell wm size
-
android_id adb shell settings get secure android_id
-
系统版本 adb shell getprop ro.build.version.release
-
IP地址 adb shell ifcongfig | grep Mask
-
CPU信息 adb shell c- at /proc/cpuinfo
-
内存信息 adb shell cata /proc/meminfo
关闭USB调试
- adb shell setttings put global adb_enabled 0
使用功能
-
屏幕截屏 adb exec-out screencap -p >sc.png
-
录制屏幕 adb shell screenrecord /sdcard/filename.mp4
-
重启手机 adb reboot
-
查看连接过的WIFI密码 adb shell su cat /data/misc/wifi/*.conf
-
使用Monkey进行压力测试 adb shell monkey -p -v 500
表示向 指定的应用程序发送 500 个伪随机事件。详细使用查看 官方文档developer.android.com/studio/test…
刷机相关
-
重启到Recovery模式 adb reboot recovery
-
查看进程 adb shell ps
-
查看实时资源占用情况 adb shell top
-
查看磁盘使用情况 adb shell df
-
查看内存使用情况 adb shell free