1、电源测试
----------------------------------------------------
1)查看电源状态:
adb shell dumpsys battery
Current Battery Service state:
(UPDATES STOPPED -- use 'reset' to restart)
mBootCompleted: true
AC powered: false
USB powered: false
Wireless powered: false
Max charging current: 0
Max charging voltage: 0
Charge counter: 2767936
status: 2
health: 2
present: true
level: 81
scale: 100
voltage: 4071
temperature: 359
technology: Li-ion
batterySWSelfDischarging: false
batteryMiscEvent: 0
batteryCurrentEvent: 0
mSecPlugTypeSummary: 0
LED Charging: true
LED Low Battery: true
current now: -2
charge counter: 2767936
Adaptive Fast Charging Settings: true
USE_FAKE_BATTERY: false
SEC_FEATURE_BATTERY_SIMULATION: false
FEATURE_WIRELESS_FAST_CHARGER_CONTROL: true
mWasUsedWirelessFastChargerPreviously: false
mWirelessFastChargingSettingsEnable: true
LLB CAL: 20180118
LLB MAN:
LLB CURRENT: YEAR2018M6D27
LLB DIFF: 22
BatteryInfoBackUp
mSavedBatteryAsoc: 95
mSavedBatteryMaxTemp: 473
mSavedBatteryMaxCurrent: 3000
mSavedBatteryUsage: 19972
FEATURE_SAVE_BATTERY_CYCLE: true
2)模拟未充电模式:
adb shell dumpsys battery unplug
通过命令1看是否生效
重置电源充电状态:adb shell dumpsys battery reset
3)省电模式:
adb shell settings put global low_power 1
4)API:
PowerManager.isPowerSaveMode()
PowerManager.ACTION_POWER_SAVE_MODE_CHANGED
2、后台限制
-------------------------------------------