jpchen 发表于 2022-12-16 11:47:41

RK3588 android12.0 常用调试命令

ADB
------------------------------------------------------------------------------------
设置root权限
adb shell setprop persist.sys.root_access 3
adb root

ADC
------------------------------------------------------------------------------------
查看adc值
cat /sys/bus/platform/devices/fec10000.saradc/iio:device0/in_voltage6_raw

Audio
------------------------------------------------------------------------------------
查询声卡信息
cat /proc/asound/cards

CAN
------------------------------------------------------------------------------------
收发端关闭can0设备
ip link set can0 down

收发端设置比特率为250Kbps               
ip link set can0 type can bitrate 250000

发端打开can0设备         
ip link set can0 up

接收端执行candump,阻塞等待报文                              
candump can0

发送端执行cansend,发送报文               
cansend can0 123#1122334455667788

CPU
------------------------------------------------------------------------------------
查看系统clk信息当前cpu电压
cat /sys/kernel/debug/clk/clk_summary

查看cpu gpu ddr npu频率和电压表
cat /d/opp/opp_summary

查看当前cpu电压
cpu_lit
cat /sys/kernel/debug/regulator/vdd_cpu_lit_s0/voltage                        
cpu_big0
cat /sys/kernel/debug/regulator/vdd_cpu_big0_s0/voltage                  
cpu_big1
cat /sys/kernel/debug/regulator/vdd_cpu_big1_s0/voltage            

查看cpu 温度
cat /sys/class/thermal/thermal_zone0/temp

Display
------------------------------------------------------------------------------------
查看分辨率和图层信息
cat /d/dri/0/summary

修改分辨率
wm size 1920x1080

修改dpi
wm density 230

查看系统显示帧率
setprop debug.sf.fps 1
logcat | grep mFps

GPIO
------------------------------------------------------------------------------------
设置GPIO
echo 56 > /sys/class/gpio/export

查看GPIO模式
cat /sys/class/gpio/gpio56/direction

查看GPIO 拉高拉低
cat /sys/class/gpio/gpio56/value

Network
------------------------------------------------------------------------------------
查看网卡信息
ifconfig

PWM
------------------------------------------------------------------------------------
手动设置风扇转速
echo user_space > /sys/class/thermal/thermal_zone4/policy
echo 0 > /sys/class/hwmon/hwmon4/pwm1   范围(0~255)

Power
------------------------------------------------------------------------------------
设置进入深度休眠
echo mem > sys/power/state

Storage
------------------------------------------------------------------------------------
dd测试速度
echo 3 > /proc/sys/vm/drop_caches
busybox dd if=/dev/zero of=/mnt/media_rw/3596-1EF1/test bs=1048576 count=1024 conv=sync

echo 3 > /proc/sys/vm/drop_caches
busybox dd if=/mnt/media_rw/3596-1EF1/testof=/dev/null conv=sync

fio测试速度
fio 写入测试
echo 3 > /proc/sys/vm/drop_caches
fio -filename=/dev/block/sda1 -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=1M -size=10G -numjobs=10 -runtime=60 -group_reporting -name=mytest

fio 读测试
echo 3 > /proc/sys/vm/drop_caches
fio -filename=/dev/block/sda1 -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=1M -size=10G -numjobs=10 -runtime=60 -group_reporting -name=mytest

RTC
------------------------------------------------------------------------------------
设置alarm
echo +120 > /sys/class/rtc/rtc0/wakealarm

查看时间
cat /sys/class/rtc/rtc0/wakealarm





页: [1]
查看完整版本: RK3588 android12.0 常用调试命令