1. Battery Service state (adb shell dumpsys battery) 정보
현재 폰의 배터리 상태를 알기 위해서 adb shell dumpsys battery 명령을 실행하면 아래와 같이 출력됩니다.
adb shell dumpsys battery
Current Battery Service state:
mBootCompleted: true
AC powered: false
USB powered: true
Wireless powered: false
Max charging current: 0
Max charging voltage: 0
Charge counter: 0
status: 2
health: 2
present: true
level: 84
scale: 100
voltage: 4063
temperature: 326
technology: Li-ion
batterySWSelfDischarging: false
batteryMiscEvent: 0
batteryCurrentEvent: 0
mSecPlugTypeSummary: 2
LED Charging: true
LED Low Battery: true
current now: 321
charge counter: 0
Adaptive Fast Charging Settings: true
USE_FAKE_BATTERY: false
SEC_FEATURE_BATTERY_SIMULATION: false
FEATURE_WIRELESS_FAST_CHARGER_CONTROL: true
mWasUsedWirelessFastChargerPreviously: true
mWirelessFastChargingSettingsEnable: true
LLB CAL:
LLB MAN: 20160426
LLB CURRENT: YEAR2018M9D15
LLB DIFF: 123
BatteryInfoBackUp
mSavedBatteryAsoc: 77
mSavedBatteryMaxTemp: 490
mSavedBatteryMaxCurrent: 2872
mSavedBatteryUsage: 176488
FEATURE_SAVE_BATTERY_CYCLE: true
위의 각 항목에 관해서 설명하면 (단말기 제조사에서 추가해준 항목 제외) 아래와 같습니다.
AC Powered
AC 어댑터 전원으로 충전여부
USB Powered
USB 전원으로 충전여부
Wireless powered
무선충전기 전원으로 충전여부
Max charging current
최대 충전 전류
status
1: 알수없음, 2: 충전중, 3: 방전중, 4: 충전완료후 충전중지, 5: 충전완료
health
1: 알수없음, 2: 좋음, 3: 과열, 4: 불량 5: 과전압, 6: 불특정 실패, 7: 저온
present
배터리 존재여부
level
현재 배터리 레벨 (아래 scale 이 100일 경우 배터리양은 [level %] 로 읽으면 됨, 위의 경우 배터리양이 14%)
scale
배터리 레벨의 최대값 (보통 100)
voltage
현재 배터리 전압 레벨 (단위: mV)
temperature
배터리 온도 (값을 10으로 나눠서 읽으면 됨, 위의 경우 28.9℃)
technology
배터리 종류
2. 커널 메시지(kmsg) 배터리 정보
커널 메시지중에 배터리 정보를 얻기위해서 cat /proc/kmsg | grep battery 명령을 실행하면 아래와 같이 출력됩니다.
위 로그는 배터리를 모니터링 하는 데몬인 healthd에서 출력합니다.
l=59현재 배터리 레벨
v=3878
배터리 전압 레벨 (단위 mv)
t=25.0
배터리 온도
h=2
Health (1: 알수없음, 2: 좋음, 3: 과열, 4: 불량, 5:과전압, 6: 불특정 실패, 7: 저온)
st=3
Status (1: 알수없음, 2: 충전중, 3: 방전중, 4: 충전완료후 충전중지, 5 충전완료)
c=-400
현재 전류 (단위: mA, 마이너스(-)는 방전상태를 의미)
chg=
충전기 종류 (' ': 충전상태아님, a: AC 어댑터 충전, u: USB 충전, w: 무선 충전)
조금이나마 도움이 되셨으면 아래 ♡공감 버튼을 눌러주세요.
'Android Dev > Performance' 카테고리의 다른 글
Bing Copilot, Bard, Notion AI, ChatGPT 코드 분석 비교 (0) | 2023.06.25 |
---|---|
메모리 누수(Memory Leak) 이야기 & LeakCanary 를 이용한 메모리 누수 검출 (1) | 2018.09.16 |