1.查看某个摄像头的帧率信息
adb root
adb remount
adb shell
v4l2-ctl --device=/dev/video12 --list-formats-ext
注:video12可以根据指令ls /dev/video*来查看,通过插拔摄像头,观察少了哪个video
2.通过GPIO控制蜂鸣器或者风扇
如果知道是某个IO口,则直接进入目录下,否则得先export,以gpio23为例
adb root
adb shell
cd /sys/class/gpio
chmod 777 export
echo 23 > export
cd gpio23
echo out > direction
echo 1 > value//开启
echo 0 > value//关闭
3.获取CPU温度
adb root
adb shell
cat /sys/class/thermal/thermal_zone1/temp
注:结果要除以1000才是摄氏度
4.获取CPU频率
adb shell
cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq
5.设置无线永久调试
adb root
adb remount
adb shell
cd /system
cat build//
echo service.adb.tcp.port=5555 >> build.prop
exit
adb reboot
6.获取外界USB输入设备信息
adb shell
cat /sys/kernel/debug/usb/devices
7.获取mac地址
adb shell
cat sys/class/net/eth0/address
8.查看CPU占用情况,查看某个PID的线程情况
adb shell
top
top -H -p <pid>//pid通过上面top查看,列表的第一列就是PID
9.启动应用
adb shell
pm list packages
//然后知道了某一个包名
am start 包名
10.截屏
adb shell
screencap /sdcard/ss.png
11.录屏
adb shell screenrecord /sdcard/demo.mp4
停止录屏
adb shell am broadcast -a com.android.server.scrcmd.stoprecord
录屏时间设置 (不设置默认为180秒,三分钟)
adb shell screenrecord /sdcard/demo.mp4 --time-limit 60
录屏分辨率设置
adb shell screenrecord /sdcard/demo.mp4 --size 640x480
录屏比特率设置
adb shell screenrecord /sdcard/demo.mp4 --bit-rate 4000000
麦克风录制音频
adb shell screenrecord /sdcard/demo.mp4 --mic
系统音频录制音频
adb shell screenrecord /sdcard/demo.mp4 --external-audio