Skip to content

Charging: Record the HyperOS 3 candidate mapping from a device contribution - #52

Merged
d4rken merged 1 commit into
mainfrom
docs/xiaomi-hyperos3-candidate
Aug 12, 2026
Merged

Charging: Record the HyperOS 3 candidate mapping from a device contribution#52
d4rken merged 1 commit into
mainfrom
docs/xiaomi-hyperos3-candidate

Conversation

@d4rken

@d4rken d4rken commented Aug 12, 2026

Copy link
Copy Markdown
Member

What changed

No user-facing behavior change. Documentation only: records the first HyperOS 3 data point — a user-contributed discovery report showing Xiaomi's charge protection on HyperOS 3 carries a third mode ("Battery protection") on the same setting key — in the device-qualification ledger, and scopes the now-outdated "no hard-cap mode exists" / "future HyperOS 3" statements to HyperOS 2.

Technical Context

  • Source: a contribution-wizard report (2026-08-07) from a Redmi Note 14 (tanzanite, Android 16, ro.mi.os.version.code=3): secure/security_pc_secure_protect_mode_key = 0/2/1 for Charge fully / Battery protection / Intelligent charging. Values 0/1 match HyperOS 2; value 2 is new.
  • Settings mapping only — no behavioral evidence and no cap percentage — so per the qualification protocol the gate is not widened; HyperOS 3 stays on the diagnostics-only lab adapter. The ledger entry lists what a qualification run still needs.
  • The existing unrecognized-value decode already handles value 2 safely (refuses sessions instead of clobbering); the .kt changes are KDoc/comment text only.

…bution

A Redmi Note 14 (tanzanite, Android 16, HyperOS 3) contribution report
shows secure/security_pc_secure_protect_mode_key carrying a third value
2 = "Battery protection" alongside the HyperOS 2 values (0 = charge
fully, 1 = intelligent). Docs and comments only: a candidate-mapping
entry in the qualification ledger's known gaps, and the "no hard-cap
mode exists" / "future HyperOS 3" statements scoped to HyperOS 2.
No behavior change; HyperOS 3 stays diagnostics-only pending physical
qualification.
@github-actions github-actions Bot added the enhancement New feature or request label Aug 12, 2026
@d4rken d4rken added documentation Improvements or additions to documentation ROM: HyperOS Xiaomi / Redmi / POCO device support Request to add charge-control support for a device/OEM api: 36 A16 (Baklava) and removed enhancement New feature or request labels Aug 12, 2026
@d4rken
d4rken merged commit ca5d6b3 into main Aug 12, 2026
12 checks passed
@d4rken
d4rken deleted the docs/xiaomi-hyperos3-candidate branch August 12, 2026 11:37
@kreza6173-pixel

kreza6173-pixel commented Aug 13, 2026

Copy link
Copy Markdown

@d4rken

Qualification Evidence for HyperOS 3 Battery
Protection Mode (Redmi Note 14 / tanzanite)
​Setting Key: secure/security_pc_secure_protect_mode_key = 2 (Battery Protection)
​Hard-cap Behavior: Confirmed! Charging officially stops at 80% while AC powered is true.
​Below is the full ADB diagnostic dump captured while plugged in at the 80% cap:

=== 1. PROTECT MODE KEY ===
2

=== 2. BATTERY DUMP ===
Current Battery Service state:
  AC powered: true
  USB powered: false
  Wireless powered: false
  Dock powered: false
  Max charging current: 12400000
 Time when the latest updated value of the Max charging current was sent via battery changed broadcast: +3h50m5s130ms
  Max charging voltage: 11000000
  Charge counter: 4274
  status: 2
  health: 2
  present: true
  level: 80
  scale: 100
  voltage: 4228
 Time when the latest updated value of the voltage was sent via battery changed broadcast: +4h6m8s668ms
 The last voltage value sent via the battery changed broadcast: 4232
  temperature: 364
  technology: Li-poly
  Charging state: 0
  Charging policy: 0
  Capacity level: 4
MiuiBatteryService first usage time:
  mSetBatteryUsageTimeCount=56
  mNtpTime=1779945046315
  mParseNtpTime=20260516

=== 3. RELEVANT LOGS ===
08-13 22:46:19.460  1971  1971 D BatterySaverPolicy: accessibility changed to false, updating policy.
08-13 22:46:21.243  1971  1993 E IMiCharge: MiCharge method 9 val = 369
08-13 22:46:21.249  1971  1993 E IMiCharge: MiCharge method 10 val = 8
08-13 22:46:25.502  1971  2062 I TouchCoverProtectionHelper: setDisplayListenerEnabled: false
08-13 22:46:26.161  1971  4435 D PowerManagerService: [xiaomi_power]acquireWakeLockInternal: lock=123971230, flags=0x80, tag="AODBatteryMeterView", ws=null, uid=1000, pid=2718
08-13 22:46:26.199  5612  5723 D IMiCharge: MiCharge get common method : getRawChargeCounter result : 
08-13 22:46:26.348  1971  4542 D PowerManagerService: [xiaomi_power]releaseWakeLockInternal: lock=123971230 [AODBatteryMeterView], flags=0x0
08-13 22:46:27.897  1971  2062 I TouchCoverProtectionHelper: setDisplayListenerEnabled: true
08-13 22:46:27.978  1971  2036 W BatteryStatsImpl: noteBluetoothScanStartedLocked deltaScanCount: 115 uid:10145
08-13 22:46:28.113  5612  5723 D IMiCharge: MiCharge get common method : getRawChargeCounter result : 
08-13 22:46:30.756  1971  2062 I TouchCoverProtectionHelper: setDisplayListenerEnabled: false
08-13 22:46:31.414  5612  5723 D IMiCharge: MiCharge get common method : getRawChargeCounter result : 
08-13 22:46:31.427  1971  1985 D PowerManagerService: [xiaomi_power]acquireWakeLockInternal: lock=37741381, flags=0x80, tag="AODBatteryMeterView", ws=null, uid=1000, pid=2718
08-13 22:46:31.626  1971  2544 D PowerManagerService: [xiaomi_power]releaseWakeLockInternal: lock=37741381 [AODBatteryMeterView], flags=0x0
08-13 22:46:39.205  1971  2062 I TouchCoverProtectionHelper: setDisplayListenerEnabled: true
08-13 22:46:39.344  1971  2036 W BatteryStatsImpl: noteBluetoothScanStartedLocked deltaScanCount: 116 uid:10145
08-13 22:46:39.460  5612  5723 D IMiCharge: MiCharge get common method : getRawChargeCounter result : 
08-13 22:46:42.650  1971  2036 E BatteryStatsService: note track volume change AudioToPower BatteryStatsservices 1000 2718 257 0.5011872 0.5011872
08-13 22:46:42.661  1971  2036 E BatteryStatsService: note StartAudioToPower BatteryStatsservices1000 2718 257 65 2
08-13 22:46:42.672  1971  2036 D BatteryStatsService: noteStartAudio uid is 1000
08-13 22:46:43.178  1971  2036 D BatteryStatsService: noteStopAudio uid is 1000
08-13 22:46:43.178  1971  2036 E BatteryStatsService: note StopAudioToPower BatteryStatsservices1000 2718 257 65 2
08-13 22:46:45.384  1971  2036 W BatteryStatsImpl: noteBluetoothScanStartedLocked deltaScanCount: 117 uid:10145
08-13 22:46:51.254  1971  1993 E IMiCharge: MiCharge method 9 val = 369
08-13 22:46:51.255  1971  1993 E IMiCharge: MiCharge method 10 val = 8
08-13 22:46:53.231  1971  4542 W MiResource: Dump     debugName=/product/overlay/GoogleHealthFitnessFrameworkOverlay.apk
08-13 22:46:53.231  1971  4542 W MiResource: Dump     assetPath=/product/overlay/GoogleHealthFitnessFrameworkOverlay.apk
08-13 22:46:57.967  4143  4143 I putmethod.latin: ApkAssets: /system/framework/framework-res.apk,/vendor/overlay/FrameworkResOverlay/FrameworkResOverlay.apk,/vendor/overlay/FrameworkResOverlayExt/FrameworkResOverlayExt.apk,/product/overlay/CaptivePortalLoginFrameworkOverlay.apk,/product/overlay/CircleToSearchOverlay.apk,/product/overlay/GmsConfigOverlayASI_Infrastructure.apk,/product/overlay/GmsConfigOverlayCommon.apk,/product/overlay/GmsConfigOverlayComms.apk,/product/overlay/GmsConfigOverlayGSA.apk,/product/overlay/GmsConfigOverlayGeotz.apk,/product/overlay/GmsConfigOverlayPersonalSafety.apk,/product/overlay/GmsConfigOverlayPhotos.apk,/product/overlay/GoogleExtServicesConfigOverlay.apk,/product/overlay/GoogleHealthFitnessFrameworkOverlay.apk,/product/overlay/GooglePermissionControllerFrameworkOverlay.apk,/product/overlay/MiuiServiceOverlay/MiuiServiceOverlay.apk,/product/overlay/ModuleMetadataGoogleOverlay.apk,/product/overlay/framework-res__nosdcard__auto_generated_characteristics_rro.apk,/product/overlay/MiuiHomeLauncherResOverlay.apk,/product/overlay/AospFrameworkResOverlay.apk,/product/overlay/DevicesAndroidOverlay.apk,/product/overlay/AospFrameworkTelephonyResOverlay.apk,/system_ext/framework/framework-ext-res/framework-ext-res.apk,/product/overlay/MiuiFrameworkResOverlay.apk,/product/overlay/MiuiFrameworkTelephonyResOverlay.apk,/system_ext/app/mediatek-res/mediatek-res.apk,/data/app/~~5xNurexKUCDVTUvYUSXCoA==/com.google.android.inputmethod.latin-QThyis9TONGtPEllbCgtgg==/base.apk,/data/app/~~5xNurexKUCDVTUvYUSXCoA==/com.google.android.inputmethod.latin-QThyis9TONGtPEllbCgtgg==/split_brella_feature_split.apk,/data/app/~~5xNurexKUCDVTUvYUSXCoA==/com.google.android.inputmethod.latin-QThyis9TONGtPEllbCgtgg==/split_config.xxhdpi.apk,/data/app/~~5xNurexKUCDVTUvYUSXCoA==/com.google.android.inputmethod.latin-QThyis9TONGtPEllbCgtgg==/split_tenoranimation_feature_split.apk,/data/resource-cache/com.android.systemui-neutral-YQd4.frro,/data/resource-cache/com.android.systemui-accent-mPa5.frro,/data/resource-cache/com.android.systemui-dynamic-PbMV.frro,
08-13 22:46:57.968  4143  4143 I putmethod.latin: PG (0f): com.google.android.overlay.modules.healthfitness.forframework(7f dynamic), 
08-13 22:46:57.968  4143  4143 I putmethod.latin:   com.google.android.overlay.modules.healthfitness.forframework -> 13
08-13 22:46:57.969  4143  4143 W MiResource: Dump     debugName=/product/overlay/GoogleHealthFitnessFrameworkOverlay.apk
08-13 22:46:57.969  4143  4143 W MiResource: Dump     assetPath=/product/overlay/GoogleHealthFitnessFrameworkOverlay.apk
08-13 22:46:58.588  4143  4143 I putmethod.latin: ApkAssets: /system/framework/framework-res.apk,/vendor/overlay/FrameworkResOverlay/FrameworkResOverlay.apk,/vendor/overlay/FrameworkResOverlayExt/FrameworkResOverlayExt.apk,/product/overlay/CaptivePortalLoginFrameworkOverlay.apk,/product/overlay/CircleToSearchOverlay.apk,/product/overlay/GmsConfigOverlayASI_Infrastructure.apk,/product/overlay/GmsConfigOverlayCommon.apk,/product/overlay/GmsConfigOverlayComms.apk,/product/overlay/GmsConfigOverlayGSA.apk,/product/overlay/GmsConfigOverlayGeotz.apk,/product/overlay/GmsConfigOverlayPersonalSafety.apk,/product/overlay/GmsConfigOverlayPhotos.apk,/product/overlay/GoogleExtServicesConfigOverlay.apk,/product/overlay/GoogleHealthFitnessFrameworkOverlay.apk,/product/overlay/GooglePermissionControllerFrameworkOverlay.apk,/product/overlay/MiuiServiceOverlay/MiuiServiceOverlay.apk,/product/overlay/ModuleMetadataGoogleOverlay.apk,/product/overlay/framework-res__nosdcard__auto_generated_characteristics_rro.apk,/product/overlay/MiuiHomeLauncherResOverlay.apk,/product/overlay/AospFrameworkResOverlay.apk,/product/overlay/DevicesAndroidOverlay.apk,/product/overlay/AospFrameworkTelephonyResOverlay.apk,/system_ext/framework/framework-ext-res/framework-ext-res.apk,/product/overlay/MiuiFrameworkResOverlay.apk,/product/overlay/MiuiFrameworkTelephonyResOverlay.apk,/system_ext/app/mediatek-res/mediatek-res.apk,/data/app/~~5xNurexKUCDVTUvYUSXCoA==/com.google.android.inputmethod.latin-QThyis9TONGtPEllbCgtgg==/base.apk,/data/app/~~5xNurexKUCDVTUvYUSXCoA==/com.google.android.inputmethod.latin-QThyis9TONGtPEllbCgtgg==/split_brella_feature_split.apk,/data/app/~~5xNurexKUCDVTUvYUSXCoA==/com.google.android.inputmethod.latin-QThyis9TONGtPEllbCgtgg==/split_config.xxhdpi.apk,/data/app/~~5xNurexKUCDVTUvYUSXCoA==/com.google.android.inputmethod.latin-QThyis9TONGtPEllbCgtgg==/split_tenoranimation_feature_split.apk,/data/resource-cache/com.android.systemui-neutral-YQd4.frro,/data/resource-cache/com.android.systemui-accent-mPa5.frro,/data/resource-cache/com.android.systemui-dynamic-PbMV.frro,
08-13 22:46:58.589  4143  4143 I putmethod.latin: PG (0f): com.google.android.overlay.modules.healthfitness.forframework(7f dynamic), 
08-13 22:46:58.589  4143  4143 I putmethod.latin:   com.google.android.overlay.modules.healthfitness.forframework -> 13
08-13 22:46:58.590  4143  4143 W MiResource: Dump     debugName=/product/overlay/GoogleHealthFitnessFrameworkOverlay.apk
08-13 22:46:58.590  4143  4143 W MiResource: Dump     assetPath=/product/overlay/GoogleHealthFitnessFrameworkOverlay.apk
08-13 22:46:58.704   598   598 W ChargerLogger: type=1400 audit(0.0:13252): avc:  denied  { append } for  name="charge_logger_a.csv" dev="dm-58" ino=134252 scontext=u:r:hal_misys_vendor_default:s0 tcontext=u:object_r:vendor_data_file:s0 tclass=file permissive=0
08-13 22:47:04.060   598   598 W ChargerLogger: type=1400 audit(0.0:13255): avc:  denied  { append } for  name="charge_logger_a.csv" dev="dm-58" ino=134252 scontext=u:r:hal_misys_vendor_default:s0 tcontext=u:object_r:vendor_data_file:s0 tclass=file permissive=0
08-13 22:47:05.345  1971  2182 D BatteryStatsManagerStub: notifyEvent for resId=128 used 0ms
08-13 22:47:07.690  4143  4143 I putmethod.latin: ApkAssets: /system/framework/framework-res.apk,/vendor/overlay/FrameworkResOverlay/FrameworkResOverlay.apk,/vendor/overlay/FrameworkResOverlayExt/FrameworkResOverlayExt.apk,/product/overlay/CaptivePortalLoginFrameworkOverlay.apk,/product/overlay/CircleToSearchOverlay.apk,/product/overlay/GmsConfigOverlayASI_Infrastructure.apk,/product/overlay/GmsConfigOverlayCommon.apk,/product/overlay/GmsConfigOverlayComms.apk,/product/overlay/GmsConfigOverlayGSA.apk,/product/overlay/GmsConfigOverlayGeotz.apk,/product/overlay/GmsConfigOverlayPersonalSafety.apk,/product/overlay/GmsConfigOverlayPhotos.apk,/product/overlay/GoogleExtServicesConfigOverlay.apk,/product/overlay/GoogleHealthFitnessFrameworkOverlay.apk,/product/overlay/GooglePermissionControllerFrameworkOverlay.apk,/product/overlay/MiuiServiceOverlay/MiuiServiceOverlay.apk,/product/overlay/ModuleMetadataGoogleOverlay.apk,/product/overlay/framework-res__nosdcard__auto_generated_characteristics_rro.apk,/product/overlay/MiuiHomeLauncherResOverlay.apk,/product/overlay/AospFrameworkResOverlay.apk,/product/overlay/DevicesAndroidOverlay.apk,/product/overlay/AospFrameworkTelephonyResOverlay.apk,/system_ext/framework/framework-ext-res/framework-ext-res.apk,/product/overlay/MiuiFrameworkResOverlay.apk,/product/overlay/MiuiFrameworkTelephonyResOverlay.apk,/system_ext/app/mediatek-res/mediatek-res.apk,/data/app/~~5xNurexKUCDVTUvYUSXCoA==/com.google.android.inputmethod.latin-QThyis9TONGtPEllbCgtgg==/base.apk,/data/app/~~5xNurexKUCDVTUvYUSXCoA==/com.google.android.inputmethod.latin-QThyis9TONGtPEllbCgtgg==/split_brella_feature_split.apk,/data/app/~~5xNurexKUCDVTUvYUSXCoA==/com.google.android.inputmethod.latin-QThyis9TONGtPEllbCgtgg==/split_config.xxhdpi.apk,/data/app/~~5xNurexKUCDVTUvYUSXCoA==/com.google.android.inputmethod.latin-QThyis9TONGtPEllbCgtgg==/split_tenoranimation_feature_split.apk,/data/resource-cache/com.android.systemui-neutral-YQd4.frro,/data/resource-cache/com.android.systemui-accent-mPa5.frro,/data/resource-cache/com.android.systemui-dynamic-PbMV.frro,
08-13 22:47:07.691  4143  4143 I putmethod.latin: PG (0f): com.google.android.overlay.modules.healthfitness.forframework(7f dynamic), 
08-13 22:47:07.691  4143  4143 I putmethod.latin:   com.google.android.overlay.modules.healthfitness.forframework -> 13
08-13 22:47:07.692  4143  4143 W MiResource: Dump     debugName=/product/overlay/GoogleHealthFitnessFrameworkOverlay.apk
08-13 22:47:07.692  4143  4143 W MiResource: Dump     assetPath=/product/overlay/GoogleHealthFitnessFrameworkOverlay.apk
08-13 22:47:09.440   598   598 W ChargerLogger: type=1400 audit(0.0:13300): avc:  denied  { append } for  name="charge_logger_a.csv" dev="dm-58" ino=134252 scontext=u:r:hal_misys_vendor_default:s0 tcontext=u:object_r:vendor_data_file:s0 tclass=file permissive=0
08-13 22:47:09.486  1971  2182 D BatteryStatsManagerStub: notifyEvent for resId=128 used 0ms
08-13 22:47:09.492  1971  2182 D BatteryStatsManagerStub: notifyEvent for resId=128 used 0ms
08-13 22:47:14.832   598   598 W ChargerLogger: type=1400 audit(0.0:13343): avc:  denied  { append } for  name="charge_logger_a.csv" dev="dm-58" ino=134252 scontext=u:r:hal_misys_vendor_default:s0 tcontext=u:object_r:vendor_data_file:s0 tclass=file permissive=0
08-13 22:47:15.199 32173 32173 W dumpsys : Thread Pool max thread count is 0. Cannot cache binder as linkToDeath cannot be implemented. serviceName: battery

d4rken added a commit that referenced this pull request Aug 14, 2026
…tion ledger (#61)

* Charging: Record the HyperOS 3 cap-percent follow-up in the qualification ledger

A GitHub follow-up (PR #52 comment / issue #48) from the tanzanite
contributor claims mode 2 hard-caps at 80% with a dumpsys snapshot at
the cap. Recorded as a cap-percent candidate (80) only: a single
snapshot with status=2 (charging) and no hold/current observation is
not hold evidence, and how the mode was set is unstated, so daemon
enforcement of external writes stays unproven. The requested follow-up
runs (sustained hold, both-direction external-write test) are listed
in the issue #48 thread.

* Charging: Record the second HyperOS 3 data point (marblein, no hard-cap mode)

A Poco F5 contribution report (HyperOS 3.0.2 / Android 15) shows only
the two HyperOS-2-style modes on security_pc_secure_protect_mode_key,
answering the ledger's open question: the tanzanite hard-cap value 2 is
not HyperOS-3-wide but model- and/or Android-16-dependent, so a future
HyperOS 3 gate cannot infer it from the version code alone. Caveats
recorded: one wizard row withheld by the contributor, prior root with
FDE.ai charge-limit control.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: 36 A16 (Baklava) device support Request to add charge-control support for a device/OEM documentation Improvements or additions to documentation ROM: HyperOS Xiaomi / Redmi / POCO

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants