Force Google Play services to respect battery optimization.
GmsForge is a Magisk/KernelSU/APatch module that optimizes Google Play services (com.google.android.gms) to prevent idle battery drain.
- XML Patching: Removes GMS from power-save system whitelists during installation.
- Runtime Enforce: Removes GMS from the active whitelist via
dumpsyson every boot. - Device Admin Disable: Disables GMS device administrator receivers on every boot.
| Requirement | Details |
|---|---|
| Android | 6.0+ (API 23+) |
| Root | Magisk v20.4+, KernelSU, or APatch |
- Download the latest release ZIP from the repository.
- Open Magisk, KernelSU, or APatch manager.
- Install the ZIP via the Modules tab.
- Reboot your device.
Check optimization status anytime using the built-in diagnostic tool (requires root):
su
gmscFor help and additional commands:
gmsc --helpIf chat notifications are delayed, exclude your messaging apps from battery optimization in your device's Settings → Battery → Battery Optimization.
The module disables GMS device admin receivers, which can affect Find My Device. To re-enable them manually:
su
pm enable com.google.android.gms/com.google.android.gms.mdm.receivers.MdmDeviceAdminReceiver(Note: This is reset upon reboot by the module's late boot service).
- Developer: dyokism
- License: MIT