Even when you’re not actively using your phone, some apps keep services running in the background and silently eat battery life. This tutorial shows you how to spot those services, understand why they’re running, and safely stop or limit them – all without rooting your device.
Build number seven times.adb) on your PC or Mac.adb shell dumpsys.Open Settings > Battery > Battery usage. Switch the view to ‘App usage since last full charge’ (or similar wording, varies by OEM). Note the apps that appear in the top‑10 list with a high ‘Active’ or ‘Background’ time.
Take a screenshot for reference – you’ll compare this later with the service list.
adb devices
You should see your device’s serial number listed as device.adb shell dumpsys activity services > services.txt
This creates a services.txt file in the current folder.services.txt in a text editor and search for the package names you noted in Step 1.The dump lists each service’s Process, PID, Running state, and most importantly the WakeLock statistics that indicate how often the service prevented the device from sleeping.
Running for 2h45m. Long runtimes are red flags.ServiceRecord{... com.example.app/.MyService} tells you the exact class the app uses.Match these metrics with the apps you saw in the battery‑usage screen. The service with the highest wake‑lock count is usually the primary drain.
Depending on how essential the service is, choose one of the following approaches.
When to use: The service is not needed for core functionality (e.g., a news app that constantly refreshes). Force‑stopping will stop it until you manually open the app again.
This tells Android’s Doze and App Standby mechanisms to keep the app’s services dormant unless you actively launch the app.
Many apps expose their own background sync options. Open the app, navigate to its Settings, and look for toggles such as:
Disable anything you don’t need. This often eliminates the service without affecting the app’s primary features.
dumpsys activity services command and verify the wake‑lock count has not increased.If the numbers are still high, you may have missed a secondary service belonging to the same app or a different app entirely. Repeat Steps 1‑3 to hunt down the next offender.
When you first enable USB debugging, the phone shows a prompt asking you to Allow USB debugging. Tap Allow and optionally tick “Always allow from this computer”. If the prompt never appears, reconnect the USB cable and toggle USB debugging off/on.
Filter the file directly from the terminal instead of opening it in a generic editor:
adb shell dumpsys activity services | grep -i "com.example.app"
This returns only the lines relevant to the target package.
Some system apps (e.g., “Google Play Services”) automatically restart after a reboot. In those cases, use Option B (background restriction) or, if you’re comfortable, disable the specific sub‑service via adb shell pm disable‑user. Warning: Disabling core Google services can break push notifications or location features.
The Android System entry aggregates many low‑level services. To dig deeper, run:
adb shell dumpsys batterystats --reset
Then let the phone run for a few hours and repeat the dumpsys batterystats command to get a more granular breakdown. This is an advanced step; most users will find a specific third‑party app responsible.
If you’ve exhausted the steps above and still see excessive drain, the issue may lie in a system‑level bug or a misbehaving firmware component. In that case, consider flashing a newer firmware (if available) or contacting the device manufacturer’s support channel.
By systematically gathering data, pinpointing the offending service, and applying the appropriate restriction, you can regain several hours of battery life without rooting or installing third‑party power‑saving apps.









