adb指令汇总(个人工作中用到的,持续更新)

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

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值