You import a phone running a China ROM because the hardware lands months before any global release, then discover a dealbreaker: the moment you lock the screen or swipe an app away, WhatsApp, Telegram, Gmail, and Messenger simply stop notifying you. The message arrives fine if you happen to have the app open. Close it, and it might as well not exist until you manually reopen it.
This isn't a defective unit. It isn't specific to Xiaomi either, even though Xiaomi gets blamed for it most often. It happens on Huawei, Honor, Oppo, Realme, OnePlus's China units, and Vivo just as reliably — a German push-notification vendor's own support forum lists Huawei, Asus, and Xiaomi under the exact same fix category, because the underlying cause is identical across brands. Below is what's actually happening at the OS level, and a permanent, no-root way to fix it using ADB.
Why This Happens: Notifications on China ROMs Were Never Designed for Google Push
Every Android app you use outside China relies on Firebase Cloud Messaging (FCM), Google's push infrastructure. When the app is closed, Google Play Services keeps one persistent, low-power socket open in the background. A message arrives, Google wakes the specific app for a split second, and your notification appears — even if the app hasn't been opened in days.
China ROMs are built assuming that socket doesn't exist, because Google services are blocked inside mainland China. Domestic ROMs rely on proprietary push channels instead (Xiaomi's Mi Push, Huawei's HMS Push, Oppo/Vivo's joint push alliance). To stop hundreds of apps from each holding their own background connection and draining the battery, every major Chinese OEM ships a separate, aggressive background-process killer layered on top of stock Android. When you swipe an app out of Recents on a China ROM, that killer doesn't just pause the app — it force-stops it, which also kills whatever Google Play Services listener was keeping it reachable. Until you manually reopen the app, nothing gets through.
There's a second, OEM-agnostic layer making this worse on any phone running Android 12 or newer, regardless of brand. Google itself added a background-process cap called the Phantom Process Killer, which by default terminates background child processes once more than 32 are running system-wide, as documented in Google's own Issue Tracker thread on the feature. Unlike per-app battery optimization, this limit can't be turned off from the Settings app on stock Android 12 — XDA Developers confirmed it applies globally across all apps combined, not per app, which is exactly why fixing autostart permissions for one messaging app often isn't enough on its own.
China ROM vs Global ROM: What Actually Changes
| Behavior | Global ROM | China ROM |
|---|---|---|
| Google Play Services socket | Left running by default | Force-stopped when app is swiped away |
| Autostart / background permission | Usually pre-allowed for known messaging apps | Blocked by default for every third-party app |
| Swipe from Recents | Pauses the app | Hard force-stop, killing background listeners |
| Region/account services | Points to global Google/OEM servers | Points to domestic servers; Google services are an add-on, not native |
| OS language on first boot | Ships with your local language pack | Chinese only until you add a language pack manually |
This is also why buying a China-unit phone at a discount is such a common move in import-heavy markets: Chinese brands already account for the majority of smartphone shipments in several large markets — a Frost & Sullivan analysis cited by Tele.net.in put China-origin brands at 71% of India's smartphone market share even before counting grey-import China ROM units bought purely for the cheaper price or earlier chipset access. The notification bug is the single most common regret reported by that exact buyer.
What You Need Before You Start
No computer, no root, no bootloader unlock. Two free tools installed directly on the phone:
- Shizuku — runs privileged ADB-level commands using Android's built-in Wireless Debugging, no PC required. Get it from the Play Store or GitHub Releases.
- aShell You — a local ADB command runner that connects to Shizuku. Download the APK from GitHub Releases.
Step 1: Pair Shizuku Over Wireless Debugging
- Connect to Wi-Fi.
- Open Settings > About phone and tap the OS/build number 7 times to unlock Developer options.
- Go to Settings > Additional settings > Developer options and turn on Wireless debugging and USB debugging (most China ROMs require both toggled on before ADB will accept permission changes).
- Open Shizuku, tap Pairing, then Developer options > Wireless debugging > Pair device with pairing code.
- Enter the 6-digit code shown in Shizuku's notification.
- Back in Shizuku, tap Start. You should see "Shizuku is running."
Step 2: Authorize aShell You
- In Shizuku, open Authorized Applications and toggle aShell You on.
- Open aShell You. A green badge in the top corner confirms it has shell-level access.
Step 3: Run the Universal Notification Fix Script
This is brand-agnostic: it raises Android's background process cap, exempts Google Play Services from Doze restrictions, and loops through every third-party app on the device granting it background-run and wake-lock permission. Paste it into aShell You's command box and run it:
settings put global miui_app_battery_saver 0
settings put secure miui_app_battery_saver 0
settings put system miui_app_battery_saver 0
device_config put activity_manager max_phantom_processes 2147483647
dumpsys deviceidle whitelist +com.google.android.gms
cmd appops set com.google.android.gms RUN_IN_BACKGROUND allow
cmd appops set com.google.android.gms RUN_ANY_IN_BACKGROUND allow
cmd appops set com.google.android.gms WAKE_LOCK allow
for pkg in $(pm list packages -3 | cut -d: -f2); do
dumpsys deviceidle whitelist +$pkg
cmd appops set $pkg RUN_IN_BACKGROUND allow
cmd appops set $pkg RUN_ANY_IN_BACKGROUND allow
cmd appops set $pkg WAKE_LOCK allow
done
The miui_app_battery_saver lines are harmless no-ops on non-Xiaomi phones; the dumpsys deviceidle and cmd appops loop is what actually does the work, and it's standard AOSP command syntax that runs identically on any Android 12–15 device. It takes 5–10 seconds to process every installed app.
Step 4: OEM-Specific Settings the Script Can't Reach
ADB removes the software-level lock, but every China ROM still gates a few things through its own UI that ADB can't toggle. Set these manually for your messaging apps:
| Brand / ROM | Where to look |
|---|---|
| Xiaomi (MIUI / HyperOS) | Security app > Boost speed > Lock apps; Settings > Apps > Manage apps > [app] > Autostart |
| Oppo / Realme (ColorOS) | App info > Allow Auto Start-up; App info > Battery usage > Run in background — confirmed across models by community-sourced reports on dontkillmyapp.com |
| Vivo (OriginOS / FuntouchOS) | i Manager > App manager > Autostart; Settings > Battery > Background power consumption management |
| Huawei / Honor (EMUI / MagicOS) | Settings > Battery > App launch > [app] > Manage manually > enable all three toggles |
Then, on any brand: open the app, pull up Recents, and lock or pin its card (long-press until a padlock icon appears). Locked apps survive the OEM's own recents-cleaning sweep even after the ADB permissions are applied.
Verifying It Worked
Open your phone's dialer and enter *#*#426#*#* to bring up Google Play Services' FCM Diagnostics screen. Look for connected=mtalk.google.com and Is client connected: true. If both show, your device is holding an active socket to Google's push servers regardless of what the OEM's battery manager is doing elsewhere.
What This Fix Doesn't Do
It's worth being upfront about the limits here rather than promising a silver bullet:
- It doesn't survive every OTA update. A major MIUI/HyperOS, ColorOS, or FuntouchOS version bump can silently reset autostart and battery-saver flags, so re-running the script after a big update is normal maintenance, not a sign the fix failed.
- It won't fix apps blocked at the network level. Some Google-dependent services are still throttled by regional routing on a China ROM even with permissions fully open; a VPN or switching to the phone's global firmware addresses that separately.
- It's a permission change, not root. You're not bypassing Android's security model, just telling the existing
deviceidleandappopssubsystems to stop restricting apps you already trust. This means it's reversible and doesn't void anything the way flashing a custom ROM would. - Battery life takes a small hit. You're deliberately disabling the exact mechanism designed to save power. On a China ROM this trade-off is usually worth it since the default is unusably aggressive, but don't apply the loop to every installed app if you only need it for two or three messaging apps — edit the script to target specific package names instead of using
pm list packages -3if battery matters more to you than convenience.
Frequently Asked Questions
Do these ADB changes survive a phone restart?
Yes. cmd appops, dumpsys deviceidle, and settings put write directly to Android's persistent settings database. Shizuku itself stops running after a reboot and needs to be manually restarted, but the permissions it applied stay in place.
Does this work on phones that were never rooted, and won't it trip banking-app root detection?
Correct on both counts. Shizuku uses Android's own Wireless Debugging (ADB) permission system, the same one developers use to install apps from a PC. It doesn't modify system partitions or gain root, so root-detection checks in banking or OTT apps don't flag it.
My phone is Huawei/Honor and doesn't have Google Play Services at all — will this help?
No. This fix restores the FCM background socket, which only exists if Google Play Services is installed and signed in. If you're on a Huawei/Honor unit running HMS instead of GMS, the notification problem and its fix are different — the apps need to support HMS Push directly, which is outside what ADB permissions can change.
Is there a Xiaomi-specific version of this with more detail on HyperOS's extra battery layers?
Yes — Xiaomi's MIUI/HyperOS adds several extra layers (App Battery Saver, MIUI Optimizations, the Security app's own whitelist) on top of everything covered here, and it's worth a dedicated walkthrough. See the Xiaomi-specific notification fix guide for the exact menu paths and an extended script that also handles HyperOS's Sleep Standby mode.
This script and the OEM settings table above solve the problem for any Chinese ROM. If you're specifically on a Xiaomi, Redmi, or Poco device, though, HyperOS layers on additional restrictions worth knowing about individually — that's the next post in this series.
No comments yet — be the first to share your thoughts.