1. adb operation gpio state
1)To show GPIO status:
adb shell "cat /sys/devices/virtual/misc/mtgpio/pin"
2)To change GPIO status:
adb shell "echo "-w=99:0 1 0 0 0 1 0" >/sys/devices/virtual/misc/mtgpio/pin"
3) Modify the mode (the first bit from left to right)
echo -wmode 95 1> pin (95 is gpio num, 1 is mode)
4) Modify pull select (select pull up and pull down. The second bit from left to right)
echo -wpsel 95 1> pin (95 is gpio num, 1 is pull up, 0 is pull down
5) Modify Dout (set output value. 4th bit from left to right)
echo -wdout 95 1> pin (95 is gpio num, 1 is output high, 0 is output low)
6) Modify pull enable (the fifth bit from left to right)
echo -wpen 95 1> pin (95 is gpio num, 1 is pull enable, 0 is pull disable)
7) Modify direction (choose input or output. 6th bit from left to right)
echo -wdir 95 0> pin (95 is gpio num, 1 is output, 0 is input)
8) Modify ies (set input enable. 7th bit from left to right)
echo -wies 95 1> pin (95 is gpio num, 1 is enable input, 0 is disable input)
9) Modify smt (set smt. 8th bit from left to right)
echo -wsmt 95 0> pin (95 is gpio num, 1 is enable smt, 0 is disable smt)
2. The camera debugging effect is related
1) Close tsf
adb shell setprop debug.lsc_mgr.manual_tsf 0
2) Open the shading log
adb shell setprop debug.lsc_mgr.log 1023
adb shell setprop debug.tsfcore.enable 1
adb shell setprop debug.lsc_mgr.enable 1
3. Keep the UART log output
adb shell setprop persist.uartconsole.enable 1
4. Debug Vibrator
Turn on the vibration function for 1 second: adb shell "echo 1000> / sys / devices / virtual / timed_output / vibrator / enable"
5. Open mtkLog
adb shell am start -n com.mediatek.mtklogger/com.mediatek.mtklogger.MainActivity