跳到主要内容
KernelSU 模块

Smart Bypass Charging

不可变 Release 已同步

Advanced Smart Charging & Gaming Bypass Charging controller with Material 3 WebUI.

介绍

⚡ Smart Bypass Charging

Version KernelSU Magisk License

Smart Bypass Charging is an all-in-one battery health, wattage controller, and gaming bypass charging module for KernelSU, APatch, and Magisk. It protects your battery from heat and degradation by pausing charging at custom limits, regulating charging speed, and providing automatic Bypass (Idle) Mode during gaming.


⚠️ Risk Notice & Disclaimer

IMPORTANT — PLEASE READ BEFORE USE: This module functions by directly writing to kernel power supply and battery charging control sysfs / procfs nodes (such as /sys/class/power_supply/battery/*).

  • Kernel charging implementations vary widely across OEMs, PMICs, and custom kernels. Writing to charging control nodes may cause unexpected charging behavior, inaccurate battery percentage reporting, failure to resume charging until reboot, or PMIC/charger resets on certain devices.
  • Always monitor your device temperature and charging state during initial use.
  • If charging does not resume after unplugging, disable or remove the module and reboot your device to restore default kernel states.
  • You are using this module at your own risk. The developer is not responsible for any hardware, battery, or device issues resulting from its use.

✨ Key Features

  • 📊 Live Power & Health Telemetry: Real-time dashboard displaying live charging Wattage (W), Current (mA), Voltage (V), Temperature (°C), Battery Health (%), and Charge Cycle Count.
  • 🔥 Force Bypass & 🎮 Auto-Bypass in Games:
    • Force Bypass Mode: One-tap toggle to pause battery charging at any level and power the phone directly from the charger (AC/Idle power).
    • Auto-Bypass in Games: Automatically activates Bypass Mode when a configured game is launched in the foreground and resumes normal operation when closed.
  • 🎚️ Charging Speed / Wattage Controller: Control charging current on the fly with 3 presets:
    • ⚡ Fast (Max): Unthrottled hardware fast charging.
    • ⚖️ Balanced (~10W / 2000mA): Moderate speed with reduced heat.
    • 🌙 Cool Night (~5W / 1000mA): Slow, cool overnight charging to maximize battery longevity.
  • 🛡️ Smart Charging Limits & 100% Override:
    • Set custom Stop Charging (e.g., 80%) and Resume Charging (e.g., 75%) thresholds.
    • 🔋 Charge to 100% Once: One-tap toggle to temporarily allow a full 100% charge until the next unplug.
  • 🌡️ Smart Thermal Auto-Pause: Automatically pauses charging if battery temperature reaches ≥42°C and safely resumes once it cools down to ≤38°C.
  • 🧠 Universal Auto-Detection Engine: Probes, verifies, and caches the working kernel charging switch for your device (and caches failure on unsupported kernels to prevent continuous sysfs polling).
  • 🎨 Native Material Design 3 WebUI: Clean Android 14 / KernelSU styled interface with automatic Light & Dark Mode support.
  • 🔔 Smart System Notifications: Real-time alerts for Charger Connect/Disconnect, Bypass Activation, Limit Reached, and Thermal Pause events.

🔒 Security & Transparency

  • 100% Auditable Shell & Web Code: Built entirely with plain-text POSIX shell scripts (customize.sh, service.sh) and a static HTML/CSS/JS WebUI (webroot/index.html).
  • Zero Binaries & Zero Network Calls: Contains no prebuilt binaries/blobs and makes zero external network requests.
  • Clean Storage: No clutter on /sdcard. All configurations (config.conf, games.conf, active_switch.conf) are stored strictly inside /data/adb/modules/smart_bypass_charging/.

📱 How to Access Settings (WebUI)

  • For KernelSU / APatch Users:

    1. Open the KernelSU / APatch Manager app and go to the Modules tab.
    2. Tap on the Smart Bypass Charging card to launch the built-in Material 3 WebUI.
  • For Magisk Users:

    1. Download and install the standalone KSUWebUI APK.
    2. Open KSUWebUI, grant root access, and select Smart Bypass Charging.

📦 Installation

  1. Download the latest .zip package from the Releases page.
  2. Flash the zip in KernelSU, APatch, or Magisk Manager.
  3. Reboot your device.

🤝 Credits & Inspiration

  • Inspired by the universal switch mechanisms of ACC (Advanced Charging Controller).
  • Developed by mhmithu.

📄 License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0-only) — see the LICENSE file for details.

历史版本

v1.1.2

最新 Smart Bypass Charging v1.1.2

版本代码 112 v1.1.2

下载

Changelog

🛠️ Bug Fixes & Core Improvements

  • Multi-Stage Fuel Gauge Polling: Added a 3-step settling check (up to 6s) during initial switch detection so high-wattage fast-charging devices (Xiaomi/Qualcomm/OEM kernels) have enough time for current_now sensors to drop before validating bypass state.
  • Accurate Bypass & Idle Verification:
    • Aligned the current threshold in is_charging_paused() to < 100mA (100000 uA) to accurately detect hardware idle/bypass mode.
    • Explicitly rejected Discharging battery status and removed input_suspend nodes so forced battery discharging is never misidentified as bypass charging.
    • Removed non-stopping night_charging node and prioritized constant_charge_current for reliable OEM compatibility.
  • Switch Probe Failure Caching: If no compatible charging control node is found on a device, service.sh now caches NONE in active_switch.conf instead of re-probing sysfs nodes every 2 seconds. (Automatically resets on a fresh reboot to support kernel updates).
  • Standard Magisk & KernelSU Installer: Replaced the custom update-binary with the official Magisk util_functions.sh installer (install_module) for 100% compatibility across Magisk, KernelSU, and APatch.
  • Safety Documentation: Added a detailed Hardware & Kernel Risk Notice in README.md explaining how sysfs power-supply node manipulation works.

v1.1.1

  • Fixed (Installer): Replaced the custom 6-line update-binary with the official standard Magisk util_functions.sh installer for full Magisk & KernelSU compatibility.
  • Fixed (Bypass Detection): Corrected current threshold to 50000 uA (50mA), removed input_suspend, and explicitly rejected Discharging status so battery discharge is never misidentified as valid bypass/idle mode.
  • Fixed (Switch Probing): Cached probe failure (NONE in active_switch.conf) when no compatible kernel switch is found, preventing continuous sysfs re-probing every 2 seconds on unsupported devices.
  • Docs: Added a clear Risk Notice & Disclaimer in README.md regarding writing directly to kernel charging control sysfs nodes.

v1.1.0

  • Fixed: Resolved 14W (3A) fast charging ceiling cap issue on first charger plug-in.
  • New: Added Charging Speed Controller (Fast Max, Balanced 10W, and Cool Night 5W modes).
  • New: Added Live Power & Health Telemetry in WebUI (Live Wattage, Current mA, Voltage, Battery Health %, and Cycle Count).
  • New: Added Smart Thermal Auto-Pause (Automatically pauses charging at >=42°C and resumes at <=38°C).
  • New: Added Auto-Bypass in Games (Automatically activates bypass mode when a configured game is in the foreground).
  • New: Added Charge to 100% Once toggle.

v1.0.1

  • Added Universal Auto-Detection Engine for charging & bypass switches.
  • Added Material Design 3 WebUI (Auto Light/Dark theme).
  • Added Force Bypass Mode for gaming and Smart Charging Limits.
  • Added Smart Notifications (Plug/Unplug, State changes, and >=42°C Overheating warning).

v1.0.0 (Initial Release)

  • Initial stable release with Universal Auto-Detection Engine and Material 3 WebUI.

文件 1

Smart-Bypass-Charging-v1.1.2.zip 10.8 KiB

SHA-256 5877cf6ad64daee3003227f6144f045b306e026d89d0700d6780e63c9ea5e524 · Attestation

透明度

Tag
v1.1.2 不可变 Release
Tag commit
a4c87a1aba0f
内容 commit
a4c87a1aba0f
SHA-256
5877cf6ad64daee3003227f6144f045b306e026d89d0700d6780e63c9ea5e524
最近同步到变更

自行复核

KernelSU 模块不对模块签名,也不审计模块代码。SHA-256 只证明下载内容与本索引一致。可使用 GitHub CLI 自行复核:

gh release verify v1.1.2 -R mhmithu/Smart-Bypass-Charging
gh release verify-asset v1.1.2 Smart-Bypass-Charging-v1.1.2.zip -R mhmithu/Smart-Bypass-Charging