Overview
Playing high-framerate mobile games or compiling code while connected to a fast charger creates significant battery stress. Standard smartphone charging circuits push thousands of milliamperes into the lithium-ion cell simultaneously while the SoC draws heavy current. This combined thermal load rapidly pushes device temperatures past 42°C, prompting the Android thermal HAL to aggressively drop screen refresh rates and throttle CPU/GPU frequencies.
Developed by AbhishekTor55, Charging Bypass introduces automatic, display-synchronized hardware charge gating. Operating across Android 14, 15, and 16, the module monitors display state events via kernel broadcast listeners. When the screen is ON, it signals the kernel battery driver to suspend incoming charge current, allowing the device to run directly off external power. Once the screen is turned OFF, charging automatically resumes.
How the Hardware Gating Operates
The module runs an event-driven background listener linked to system display state triggers:
- Screen ON Event:
- The daemon detects that the display panel has turned on.
- It targets standard kernel power supply control nodes (such as
/sys/class/power_supply/battery/charging_enabled,input_suspend, or vendor-specific step-charging interfaces). - Charge current into the chemical cell is halted; the power delivery circuit satisfies SoC demands without filling the battery, eliminating battery heat.
- Screen OFF Event:
- The user finishes gaming, locks the phone, or the display times out.
- The daemon immediately resets the charging nodes to their active stock state (
charging_enabled = 1). - Normal fast charging resumes at factory speeds.
Installation & Verification
- Download the
charging-bypass-v1.0.zippackage from GitHub releases. - Open Magisk or KernelSU Manager and install the module from internal storage.
- Reboot your device.
- Plug your phone into its wall charger or PC USB cable.
- With the screen active, monitor the charging status icon and current draw:
- The system will show connected power, but the battery percentage will remain static and battery temperature will drop.
- Verify live switching behavior in the activity log:
cat /sdcard/charging_bypass.log
Compatibility & Hardware Notes
- Android OS: Built and tested specifically for Android 14, Android 15, and Android 16 custom ROMs (such as AOSP and LineageOS builds on devices like Miatoll).
- Kernel Node Prerequisites: Devices whose OEM kernels lack standard sysfs charging control interfaces cannot accept userspace charging suspension commands.
