u/DeadlyAquarium

[FIX] Massive Idle Battery Drain (PendingIntentClient Wakelock Loop) on S23/One UI - No Root/Wipe needed

If your S23 series drains 15-20% battery overnight and your idle drain is pure garbage, don't factory reset just yet. I was about to give up on this phone, but instead, I dumped my ADB batterystats, fed it to Gemini, and we dug into the exact mechanical failure causing this bullshit.

The Android System core (UID 1000) was holding a PendingIntentClient wakelock for 6+ hours while the screen was off. The CPU never went into Deep Sleep and was burning power doing absolutely nothing.

The Mechanics (First Principles of the Deadlock)

Instead of guessing which app caused it, here is exactly what fails on an architectural level between pure Android API and Samsung's software:

Component What's actually failing
The Intent A random app registers a background task (PendingIntent) with the Android API to be executed later, then goes to sleep.
The Conflict Samsung's aggressive One UI battery management steps in and puts that app to "deep sleep", physically modifying its AppOps permissions to block background execution.
The Infinite Loop The ActivityManagerService (AMS) wakes the CPU to execute the intent -> hits the One UI AppOps wall -> gets an execution error -> instead of dropping the task, it immediately throws the intent back to the top of the queue. The kernel loops this thousands of times per second. CPU runs at 100% in idle.

The Prerequisites (Tools you need)

You need a PC, a USB cable, and the official Google debugging tools.

  1. Download and install Samsung USB Drivers on your Windows PC.
  2. Download the official SDK Platform-Tools ZIP from Google's Android Developer site. Extract the folder to your C:\ drive (e.g., C:\platform-tools).
  3. Enable USB Debugging on your phone:
    • Go to Settings -> About phone -> Software information.
    • Tap "Build number" 7 times rapidly to unlock Developer Options.
    • Go back to main Settings -> Developer options (at the very bottom).
    • Turn ON USB debugging.

The Fix: Step-by-Step

Step 1: Establish the ADB Connection

  • Connect your phone to the PC via USB.
  • Open the extracted platform-tools folder on your PC.
  • Click on the address bar inside the folder, type cmd or powershell, and hit Enter.
  • Type the following command to start the ADB server:

Bash

.\adb devices
  • CRITICAL: Look at your phone screen immediately. A prompt will appear asking "Allow USB debugging?". Check "Always allow from this computer" and hit OK.
  • Run the .\adb devices command one more time. It should now show your device serial number and the word device next to it (if it says unauthorized, you missed the prompt on the phone).

Step 2: Invalidate Cache Pointers

Now, throw the kill command into the terminal to forcefully clear the Dalvik/ART temp files and broken intent pointers:

Bash

.\adb shell pm trim-caches 999999999999999999

Step 3: Nuke the AppOps Table (The Killshot)

Disconnect your phone. Go to Settings -> Apps -> Three-dot menu (top right) -> Reset app preferences.

Why? This completely resets all background restrictions and battery limits One UI placed on your apps. It takes off the muzzle so the stuck intent can finally execute or fail properly, breaking the deadlock.

Step 4: Reboot and Recharge

Restart your phone and charge it to 100% to start a fresh battery cycle.

My idle drain dropped back to ~1% per hour, and my SOT is back to 7-8 hours. The system is finally forced into Deep Sleep. Huge shoutout to Gemini for parsing the raw kernel logs with me and finding the bottleneck.

You're welcome.

reddit.com
u/DeadlyAquarium — 1 day ago