Skip to content

dyokism/GmsForge

Repository files navigation

English | Bahasa Indonesia

GmsForge

Force Google Play services to respect battery optimization.

License Android Version Root

Overview

GmsForge is a Magisk/KernelSU/APatch module that optimizes Google Play services (com.google.android.gms) to prevent idle battery drain.

How It Works

  • XML Patching: Removes GMS from power-save system whitelists during installation.
  • Runtime Enforce: Removes GMS from the active whitelist via dumpsys on every boot.
  • Device Admin Disable: Disables GMS device administrator receivers on every boot.

Requirements

Requirement Details
Android 6.0+ (API 23+)
Root Magisk v20.4+, KernelSU, or APatch

Installation

  1. Download the latest release ZIP from the repository.
  2. Open Magisk, KernelSU, or APatch manager.
  3. Install the ZIP via the Modules tab.
  4. Reboot your device.

Usage

Check optimization status anytime using the built-in diagnostic tool (requires root):

su
gmsc

For help and additional commands:

gmsc --help

Troubleshooting

Delayed Messaging Notifications

If chat notifications are delayed, exclude your messaging apps from battery optimization in your device's Settings → Battery → Battery Optimization.

Find My Device

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 & License

About

Force Google Play services to respect battery optimization on Android.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages