1. log of charge process
log keyword healthd (android built-in keyword)
healthd: battery l=76 v=4069 t=27.0 h=2 st=2 c=-31 cc=0 ct=8 chg=a
Log interpretation
-
l: Battery percentage
-
v: Battery voltage 3.4V~4.4V
< 3.3V light flashes, black screen, xbl stage
3.3V~3.6V lights flash, the screen is black, and the screen has battery frame and small lightning icon, uefi stage
3.6V charger only mode
-
t: Current battery temperature (obtained from the thermistor in the battery)
0 Below: no charging 0-5 Degree: 0.3C C Can battery capacity 5-15 Degree: 900 mA When the current (temperature) is too low, in order to protect the battery, we will limit the current in the software 15-45 Degree: normal temperature range 45-60 Degree: limit current 60 Degree above: direct shutdown without charging
Note: battery l=46 v=0 t=-2.2 h=2 st=3 c=0 chg=a - 2.2 at startup is the default value and can not be care
-
h:health battery health status, 2 is good
BATTERY_HEALTH_UNKNOWN = 1, unknown BATTERY_HEALTH_GOOD = 2, normal BATTERY_HEALTH_OVERHEAT = 3,Battery temperature too high BATTERY_HEALTH_DEAD = 4,Low battery power (this generally means that the battery has to be precharged, or in extreme cases) BATTERY_HEALTH_OVER_VOLTAGE = 5,Battery overvoltage protection BATTERY_HEALTH_UNSPECIFIED_FAILURE = 6, BATTERY_HEALTH_COLD = 7,Battery temperature too low BATTERY_HEALTH_COOL = 8,Low battery temperature
-
st: indicates the state of charge
st=1 unknown st=2 State of charge st=3 No charger st=4 The charger is plugged in st=5 Full charge POWER_SUPPLY_STATUS_UNKNOWN = 0, //st=1 POWER_SUPPLY_STATUS_CHARGING, //st=2 POWER_SUPPLY_STATUS_DISCHARGING, //st=3 POWER_SUPPLY_STATUS_NOT_CHARGING, //st=4 POWER_SUPPLY_STATUS_FULL, //st=5
There is a process of identification when the charger is just inserted
healthd: battery l=22 v=3699 t=25.0 h=2 st=3 c=233 chg=
healthd: battery l=22 v=3699 t=25.0 h=2 st=3 c=233 chg=
healthd: battery l=22 v=3699 t=25.0 h=2 st=4 c=233 chg=a
healthd: battery l=22 v=3699 t=25.0 h=2 st=4 c=233 chg=a
healthd: battery l=22 v=3699 t=25.0 h=2 st=4 c=233 chg=a
healthd: battery l=22 v=3710 t=25.0 h=2 st=4 c=228 chg=a
healthd: battery l=22 v=3710 t=24.7 h=2 st=4 c=228 chg=a
healthd: battery l=22 v=3710 t=24.7 h=2 st=4 c=228 chg=a
healthd: battery l=22 v=3710 t=24.7 h=2 st=4 c=228 chg=a
healthd: battery l=22 v=3710 t=24.7 h=2 st=2 c=228 chg=a
healthd: battery l=22 v=3710 t=24.7 h=2 st=2 c=228 chg=a
-
c: Indicates charging current
Positive discharge, negative charge
- The current value C is an average value, which is negative at the moment of pulling out and can last for a period of time
- Charging current will enter the battery and system for use
-
cc: number of charging cycles
-
ct: charger type
ct=8 QC2.0 ct=0 CDP ct=5 5V1A ct=12 float ct=10 PD
-
chg: state of charge
u express: usb a express: ac charge None means no charging
2. Identification of charge type
log keyword: smblib_update_usb_type
-
QC3.0 charger (3000ma)
QC3.0 Charger identification process: first identify as DCP HVDCP2 HVDCP3
PMI: smblib_update_usb_type: APSD=DCP PD=0
PMI: smblib_update_usb_type: APSD=HVDCP2 PD=0
PMI: smblib_update_usb_type: APSD=HVDCP3 PD=0
-
QC2.0 type identification (1500ma)
smblib_update_usb_type: APSD=HVDCP2
-
Laptop port type identification (1500ma)
smblib_update_usb_type: APSD=CDP
-
5V1A type identification (1000ma)
smblib_update_usb_type: APSD=DCP
usb type recognition error 5:5:dcp 5v 2A
Line 115784: [ 2.790581] SMBCHG: smbchg_change_usb_supply_type: Type 5: setting mA = 1800
-
Desktop computer type identification (500ma)
smblib_update_usb_type: APSD=SDP
-
Float type identification (1000ma)
smblib_update_usb_type: APSD=FLOAT
- Caused by slow insertion or half insertion
- Data line D+/D - caused by welding problems;
- The user uses a FLOAT charger;
- The fast charging device is incorrectly identified as FLOAT
-
OCP type identification (1800ma)
smblib_update_usb_type: APSD=OCP
- It's really an OCP charger (standard charger for Apple phones)
- Fast charging occasionally is incorrectly identified as OCP
-
PD type identification
3 Charge current limiting log
-
thermal
SMBCHG: smbchg_system_temp_level_set: thermal level is 0, batt temp is 312
- thermal level: 0 indicates normal
thermal level: (1, 2, 3, 4, 5, 6) indicates that the larger the value, the slower the charging and the smaller the current - XO represents the temperature of the motherboard, and thermal is the temperature of the limited motherboard
ICL VOTERS Who charges with whose current
[ 11.464787] smblib_screen_on_work: screen_on set ICL 1600000 mA
[ 11.464892] USB_PSY_VOTER: val: 100000
[ 11.464915] FB_SCREEN_VOTER: val: 1600000
[ 11.464945] USB_ICL: current vote is now 100000 voted by USB_PSY_VOTER,2,previous voted 100000
Indicates that the current is set to 100 mA
<6>[ 8.287221] USB_PSY_VOTER: val: 100000
<6>[ 8.287225] USB_ICL: current vote is now 100000 voted by USB_PSY_VOTER,2,previous voted 500000
4 USB identification type log
usb Type identification log 4: usb sdp(500ma) 6: cdp(1500ma) 5: dcp 5v 2A 8: QC2.0 12: float 10: PD 9: Normal charger as standard( QC3.0)
SMBCHG: smbchg_change_usb_supply_type: Type 4: setting mA = 500
SMBCHG: smbchg_change_usb_supply_type: Type 5: setting mA = 1800
-
CMD window to view USB identification type
The connection of mobile phone and computer is the same wifi even adb tcpip 5555 adb connect wifiIP address /sys/class/power_supply/usb # cat real_type
5 other exception logs
-
The charger is broken and disconnected repeatedly
When the plug-in is triggered repeatedly, it indicates that the charger is broken.
SMBCHG: src_ detect_ handler: chip->usb_ present = 0 usb_ present = 1 src_ detect = 1 hvdcp_ 3_ det_ ignore_ UV = 0, indicating insertion
SMBCHG: src_ detect_ handler: chip->usb_ present = 1 usb_ present = 0 src_ detect = 0 hvdcp_ 3_ det_ ignore_ UV = 0, indicating pull-out
-
USB unplugged log
<6>[ 289.780635] SMBCHG: power_ok_handler: triggered: 0x00 <6>[ 289.782017] SMBCHG: src_detect_handler: chip->usb_present = 1 usb_present = 0 src_detect = 0 hvdcp_3_det_ignore_uv=0 <6>[ 289.782039] SMBCHG: usbin_uv_handler: chip->usb_present = 1 rt_sts = 0x01 hvdcp_3_det_ignore_uv = 0 aicl = 1500 <6>[ 289.782076] SMBCHG: hwaicl_disable: 1 voting for 0 - off <6>[ 289.782097] SMBCHG: usb_suspend: 6 voting for 0 - off <6>[ 289.782118] SMBCHG: handle_usb_removal: triggered <6>[ 289.782147] SMBCHG: smbchg_change_usb_supply_type: Type 4: setting mA = 500 <6>[ 289.782166] SMBCHG: usb_icl: 0 voting for 500 - on <6>[ 289.782183] SMBCHG: usb_icl: effective vote is now 500 voted by 0 <6>[ 289.782201] SMBCHG: smbchg_set_usb_current_max: USB current_ma = 500 <6>[ 289.782303] SMBCHG: smbchg_set_usb_current_max: usb type = 4 current set to 500 mA <6>[ 289.783006] SMB1351 smb1351_parallel_set_chg_present: set slave present = 0 <6>[ 289.783062] SMBCHG: usb_icl: 4 voting for 0 - off <6>[ 289.783080] SMBCHG: usb_icl: 5 voting for 0 - off <6>[ 289.783097] SMBCHG: hwaicl_short_deglitch: 1 voting for 0 - off <6>[ 289.783257] SMBCHG: hvdcp_enable: 2 voting for 0 - on
-
Type-C mode is 0 means unplugging and 6 means charging
<3>[ 38.646775] usbhs_power_supply_event: enter
<3>[ 38.646781] usbhs_get_typec_mode: Type-C mode is 0
<3>[ 38.646785] usbhs_power_supply_event: typec mode 6 to 0
<6>[ 38.646789] usbpd usbpd0: USB Type-C disconnect
-
THERM-BALANCE
ensure main and slave Two charging charger When the chip is charged, Once the temperature is found to be too high (exceeding the set value), one chip converts the current to another During two-way charging, the heating temperature of the two-way charging shall be balanced to prevent the charging temperature of a certain way from being too high
Two way charging is parallel charge. Now charging on 8998845 is not one way charging. The early 8996660 does not support this function
-
CTM (Connector temp monitor)
stay typeC There are many ports pin Feet, cell phone will detect typeC Temperature of cool(0), hot(1), overheat(2), 0 Indicates normal
Each gear is reduced by 200mA. If it is overheat, directly set icl to 500mA
Further verification of CTM function, sys/class/power_supply/parallel/connector_health
echo 2 > sys/class/power_supply/parallel/connector_health
Write this value as overheat
-
soc_work
FG: soc_work_fn: adjust_soc: s 73 r 109130 i -463 v 4036 t 315 cc 0 m 0xbc FG: soc_work_fn: adjust_soc: s 73 r 119872 i -96 v 4006 t 317 cc 0 m 0xbc
s: Electric quantity
r: Internal resistance
i: Current
v: Voltage
t: Temperature
-
Insert log for typeC
typC insert:
PMI: smblib_handle_typec_cc_state_change: TypeC SOURCE_DEFAULT insertion
-
Logs pulled out by TypeC
TypeC none It was pulled out log
PMI: smblib_handle_typec_cc_state_change: IRQ: cc-state-change; Type-C NONE detected
PMI: smblib_handle_typec_cc_state_change: IRQ: cc-state-change; Type-C NONE detected
-
Bright screen charging log
smblib_screen_on_work: screen_on set ICL 1600000 mA
Will be on usb_icl voting charging current limit
-
CCFloat
CCFloat Means CCPin Broken or suspended
CC_FLOAT_VOTER: val: 500000
<6>[33646.869298] FB_SCREEN_VOTER: val: 1600000
USB_ICL: current vote is now 500000 voted by CC_FLOAT_VOTER,5,previous voted 500000
Detected CC pin Then, the following charging type is identified, and the charging type passes the following D+ D-Judging by the voltage on the, sink Means device,source Means host,Charger charging host,Mobile phone device CC pin It is used to detect the connection and distinguish the front and back of the insertion DFP and UFP,Master-slave A end Vbus D+ D- GND C end:There are 24 pin Charger identification D+ D-The voltage on the (given by the mobile phone) is actively boosted. There is a process of multiple identification and multiple boosting
-
Method of catching offline log
setprop persist.sys.offlinelog.kernel true setprop persist.sys.offlinelog.logcat true Log generation in/data/local/log
-
ntc
ntc abnormal ----It refers to abnormal thermistor
Author: the heart is simple, the world is simple_ e383
Link: https://www.jianshu.com/p/7739383c34c1
Source: Jianshu
The copyright belongs to the author. For commercial reprint, please contact the author for authorization, and for non-commercial reprint, please indicate the source.