1. 展讯平台电池温度
1.1 打开温度调试
adb shell "cat /sys/class/power_supply/battery/debug_jeita_enable"
adb shell "echo 1 > /sys/class/power_supply/battery/debug_jeita_enable"
1.2 温度值模拟设置
adb shell "cat /sys/class/power_supply/battery/debug_jeita"
adb shell "echo 1000 > /sys/class/power_supply/battery/debug_jeita"
备注
debug_jeita_enable设置值:900,则对应温度 temperature为 -100,即 -10 摄氏度
debug_jeita_enable设置值:990,则对应温度 temperature为 -10,即 -1 摄氏度
debug_jeita_enable设置值:1000,则对应温度 temperature为 0,即 0 摄氏度
debug_jeita_enable设置值:1010,则对应温度 temperature为 10,即 1 摄氏度
debug_jeita_enable设置值:1100,则对应温度 temperature为 100,即 10 摄氏度
1.3 查看电池广播 adb shell dumpsys battery
C:\Users\fadi.su>adb shell dumpsys battery
Current Battery Service state:
AC powered: false
USB powered: true
Wireless powered: false
Max charging current: 500000
Max charging voltage: 5000000
Charge counter: 2325000
status: 2
health: 2
present: true
level: 93
scale: 100
voltage: 4312
temperature: 0
technology: Li-ion
2. MTK平台的温度调试
2.1 MTK adb shell 查看电池温度
adb shell "cat /sys/devices/platform/battery/Battery_Temperature"
2.2 MTK adb shell 设置电池温度
adb shell "echo 55 > /sys/devices/platform/battery/Battery_Temperature"