Battery Life Optimization

Universal GMS Doze Magisk Module

Eliminate Android's single largest source of idle battery drain. Universal GMS Doze removes hardcoded power whitelist exemptions from Google Play Services, allowing your smartphone to enter deep Doze sleep mode while keeping real-time push notifications 100% active.

Why Does Google Play Services Drain Battery by Default?

In stock Android, Google embeds a configuration file at /system/etc/sysconfig/google.xml containing <allow-in-power-save package="com.google.android.gms" />. This exemption prevents Android's battery-saving Doze mode from ever suspending Google Play Services' location polling, analytical telemetry, and background services. Universal GMS Doze strips this exemption systemlessly.

Key Benefits & Battery Impact

  • Overnight Idle Drain Reduction: Lowers standby battery consumption from ~1.5–3.0%/hr down to ~0.3–0.5%/hr.
  • Instant Notification Delivery: High-priority Firebase Cloud Messaging (FCM) push notifications (WhatsApp, Telegram, Signal, Gmail, Banking OTPs) continue waking the device instantly.
  • Zero User Maintenance: Once installed, the module operates silently across every reboot with zero configuration required.

Installation & Setup Walkthrough

  1. Download the latest Universal GMS Doze module zip from GitHub (gloeyisk Releases).
  2. Open the Magisk App -> Modules -> Install from storage -> select the downloaded zip.
  3. Reboot your device.
  4. Verify Doze state via ADB shell:
    Doze Verification Command
    $adb shell dumpsys deviceidle

Technical Architecture & Idle Power State Analysis

Android's native power management engine consists of two discrete Doze states: Light Doze (which restricts network access and periodic sync jobs during short idle periods) and Deep Doze (which suspends alarms, maintenance windows, and kernel wakelocks when the device is stationary with the display turned off).

Under stock OEM firmware, Google Play Services (com.google.android.gms) registers dozens of background broadcast receivers and location provider listeners that continuously reset the kernel's idle timer. By systemlessly overlaying /system/etc/sysconfig/google.xml, Universal GMS Doze strips the hardcoded allow-in-power-save and allow-in-data-usage-save declarations. The Android Power Manager Service (PMS) is then permitted to transition the system into uninterrupted deep sleep states (mState=IDLE).

Power State Metric Stock Android Firmware With Universal GMS Doze
Overnight Idle Discharge 1.5% – 3.0% per hour 0.2% – 0.5% per hour
Deep Sleep Transition Time Delayed 30 to 60 minutes Immediate upon screen timeout
FCM High-Priority Push Instant delivery Instant delivery (Uncompromised)
Background Telemetry Wakelocks Active 24/7 in background Suspended during display sleep

Troubleshooting & Notification Optimization

If critical messaging applications (e.g. WhatsApp, Signal, or work collaboration apps) experience delayed notifications when your phone is left idle for multiple hours, verify that battery optimization is set to "Unrestricted" for those specific apps under Android Settings → Apps → Special App Access → Energy Saver / Battery Optimization. This allows their high-priority cloud intents to break through device idle sleep without requiring Play Services to run unchecked.

Source & Verification Standard

Checked against official upstream repository gloeyisk/universal-gms-doze on Magisk v30.7 (February 23, 2026).