Test on 50,000+ Real Android and iOS Devices

Live and Automated Real Device Testing on 50,000+ iOS and Android Devices. No Need to Buy or Maintain Device Lab

Mobile App TestingMobile TestingTutorial

Low Power Mode Testing for iOS and Android Apps

Low power mode testing for iOS and Android: what each mode changes, how apps detect it, adb commands, and which Battery Saver steps automate on real devices.

Published on:

Your sync job passes on every device in the lab, and a support ticket still says data stopped updating overnight. Lab phones sit on chargers, so they never enter iOS Low Power Mode or Android Battery Saver, the two states where the operating system pauses background work on purpose. Low power mode testing runs your app in those states and checks what still works.

I ran the Android side on a real Samsung Galaxy S24 in TestMu AI's cloud to see what an automated test can switch on. From Appium I could fake an unplugged phone at a low battery level, but Battery Saver itself stayed off. The commands and the device output are in the cloud section below.

Overview

Low power mode testing runs your app with iOS Low Power Mode or Android Battery Saver switched on and checks that core flows still work while the operating system cuts background refresh, background network access, location and animation. Run it on real devices, because a charging lab phone never enters either mode.

What Each Mode Changes

  • iOS Low Power Mode: Apple's support page says it sets Auto-Lock to 30 seconds, turns off Background App Refresh, automatic downloads and email fetch, pauses iCloud Photos, and reduces brightness and some visual effects.
  • Android Battery Saver: On AOSP builds of Android 9 and later, Battery Saver puts apps into App Standby sooner, applies background execution limits to every app, blocks network access for background apps and may disable location with the screen off.
  • Safari frame rate: WebKit runs requestAnimationFrame at 30 fps in iOS Low Power Mode on purpose, so JavaScript animations and canvas content on iPhone websites slow down while the mode is on.

How to Test It

  • Detection APIs: iOS apps read ProcessInfo.isLowPowerModeEnabled and observe NSProcessInfoPowerStateDidChange. Android apps read PowerManager.isPowerSaveMode() and register for the ACTION_POWER_SAVE_MODE_CHANGED broadcast in code.
  • Battery Saver from Appium: No. In an Appium run on a TestMu AI real Galaxy S24, the lambda-adb executor accepted dumpsys battery unplug and set level 15 but rejected settings put global low_power 1, so Battery Saver stayed off.
  • Manual toggle: TestMu AI's Real Device Cloud has a Low Power Mode toggle for iPhones and iPads on iOS 16 or later and a Battery Saver toggle for Samsung and OnePlus phones, in manual app and browser sessions.

What Is Low Power Mode Testing?

Low power mode testing is mobile testing done with iOS Low Power Mode or Android Battery Saver switched on. It checks that core user flows still work, and that background work, network use and animation back off the way the platform expects instead of failing without a message.

Apple's Energy Efficiency Guide for iOS Apps says that in Low Power Mode the system may reduce CPU and GPU performance, pause discretionary and background activities including networking, and reduce screen brightness. It asks apps to help, for example by reducing animations, lowering frame rates and stopping location updates.

An app that assumes frequent background refresh or full-speed animation behaves differently in that state, and the test has to show whether the difference is graceful.

Users do not have to switch it on by hand every time. Apple's Low Power Mode support page says iOS turns Low Power Mode on below 20% battery when Adaptive Power is enabled, and turns it off once the device charges to 80% or higher.

The scope covers more than native apps:

  • Native apps - background refresh, scheduled jobs, location and downloads on iOS and Android.
  • Mobile websites and PWAs - animation timing and media in Safari and Chrome on the phone.
  • Hybrid apps - both layers, because the native shell and the WebView read power state through different APIs.

It belongs in the same release pass as the network, interruption and battery checks in a mobile app testing checklist.

Changes Made by iOS Low Power Mode and Android Battery Saver

The two modes have the same goal and different rules, and Apple lists the iOS changes on its support page.

Android describes Battery Saver in its Android 9 power management notes, which say the device manufacturer determines the precise restrictions imposed, and that on AOSP builds the system applies restrictions such as putting apps in app standby mode more aggressively.

A Samsung phone and a Pixel can therefore behave differently with the same setting, which is why the test matrix needs more than one Android brand.

AreaiOS Low Power Mode (Apple support page)Android Battery Saver (AOSP, Android 9+)What to check
Background workTurns off Background App Refresh and email fetchPuts apps into App Standby sooner; background execution limits apply to every appScheduled sync and refresh, and catch-up after the mode turns off
Network and downloadsTurns off automatic downloads; pauses iCloud PhotosBackground apps have no network accessUploads, downloads and prefetch started in the background
LocationNot listed on Apple's pageLocation services may be disabled when the screen is offGeofences and trip tracking with the screen locked
Display and motionReduces brightness; turns off some visual effectsOn Pixel devices, also turns on dark theme (Android dark theme guide); other devices may notContrast, theme assets and animation timing
Screen lockSets Auto-Lock to 30 secondsNot part of the AOSP listLong forms, video, timers and session timeouts
How the app knowsProcessInfo.isLowPowerModeEnabledPowerManager.isPowerSaveMode()The app's own reaction when the value changes

Mobile websites get one more change on iPhone.

WebKit bug 215745 reports requestAnimationFrame throttled to 30 FPS in low power mode on iOS 14, and Said Abou-Hallawa replied in the bug that this is intentional.

Code that counts animation frames instead of measuring elapsed time runs slower in that state, so check animation-driven pages, canvas content and scroll-linked effects on a real iPhone with the mode on.

How Does an App Detect Low Power Mode?

Both platforms expose the state to the app. Read it once at startup, subscribe to the change event, and test both values. Code that reads the state only at launch misses a change mid-session, which the mid-session toggle case further down checks.

Detect Low Power Mode on iOS

On iOS, read ProcessInfo.processInfo.isLowPowerModeEnabled and observe the NSProcessInfoPowerStateDidChange notification. Apple's energy guide tells apps to register for that notification and query the power state when it arrives. The guide also notes that the notification is posted on the global dispatch queue, so the sample below asks for delivery on the main queue before touching UI state.

import Foundation

final class PowerStateMonitor {
    private var observer: NSObjectProtocol?

    var isLowPowerMode: Bool {
        ProcessInfo.processInfo.isLowPowerModeEnabled
    }

    func start(onChange: @escaping (Bool) -> Void) {
        onChange(isLowPowerMode)
        observer = NotificationCenter.default.addObserver(
            forName: .NSProcessInfoPowerStateDidChange,
            object: nil,
            queue: .main
        ) { _ in
            onChange(ProcessInfo.processInfo.isLowPowerModeEnabled)
        }
    }

    func stop() {
        if let observer {
            NotificationCenter.default.removeObserver(observer)
        }
    }
}

Detect Battery Saver on Android

Android's PowerManager reference documents the matching pieces:

  • PowerManager.isPowerSaveMode() - returns true while Battery Saver is on. Added in API level 21.
  • ACTION_POWER_SAVE_MODE_CHANGED - broadcast when that value changes. It is only sent to registered receivers, so register for it in code, not in the manifest. Added in API level 21.
  • getLocationPowerSaveMode() - reports how location features behave while Battery Saver is on. Added in API level 28.
class PowerSaveMonitor(
    private val context: Context,
    private val onChange: (Boolean) -> Unit,
) {
    private val powerManager = context.getSystemService(PowerManager::class.java)

    private val receiver = object : BroadcastReceiver() {
        override fun onReceive(context: Context, intent: Intent) {
            onChange(powerManager.isPowerSaveMode)
        }
    }

    fun start() {
        onChange(powerManager.isPowerSaveMode)
        // Only delivered to receivers registered in code, never to manifest receivers
        context.registerReceiver(
            receiver,
            IntentFilter(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED)
        )
    }

    fun stop() = context.unregisterReceiver(receiver)
}

A web page cannot read either mode. MDN marks the Battery Status API as limited availability, and it reports charge level and charging state rather than Low Power Mode, so mobile web teams test the effect on a real device instead.

How to Turn On Low Power Mode for a Test

The method depends on where the device runs: in your hand, on your CI runner, or in a device cloud.

Local Devices and Emulators

On an iPhone, turn the mode on from the Battery settings or the Control Center button, using the path Apple's support page gives for your iPhone model. On an Android device or emulator you control, use adb:

adb shell dumpsys battery unplug              # stop reporting that the device is charging
adb shell settings put global low_power 1     # turn Battery Saver on

# ... run the test ...

adb shell settings put global low_power 0     # turn Battery Saver off
adb shell dumpsys battery reset               # restore real battery reporting

The unplug, low_power and reset commands come from Android's guide to testing power-related issues, which also covers App Standby buckets and background restrictions.

Run them in that order in your own scripts: unplug first, reset last, so the device never stays in a simulated battery state after the test.

TestMu AI Real Devices

On TestMu AI, the Low Power Mode on real devices toggle sits under Device Controls in a manual App Testing session. The same toggle is labeled Battery Saver Mode on Android. Per the TestMu AI docs:

  • Supported devices - every iPhone and iPad on iOS 16 or later, and Samsung and OnePlus devices on Android. The toggle is hidden on other devices.
  • What it changes - background app refresh stops, the display refresh rate caps at 60 Hz, automatic downloads pause and network behavior changes.
  • Auto-lock - on iOS the mode forces a 30-second auto-lock, so keep interacting with the device or it locks mid-test.
  • Conflicts - the toggle is hidden while Apple Pay or Device Passcode is active on the session.
  • Reset - the mode switches off when the session ends.
  • Availability - Beta, on the Real Device Plus Live plan, in manual sessions only. No Appium capability sets it yet.
  • Websites - the same toggle exists in real device Browser Testing, described in Low Power Mode for browser testing.

To measure what the mode costs as well as how the app behaves, run manual app profiling in the same session. It graphs CPU, memory, FPS and network use for the app, plus battery energy in joules on iOS. Both run on TestMu AI's Real Device Cloud, so you can compare a Samsung phone and an iPhone with the mode on without draining either first.

Note

Note: To run your app with Low Power Mode and Battery Saver on real iPhones, Samsung and OnePlus phones, start free with TestMu AI.

Battery Saver Commands on a Cloud Device: Test Results

To check whether a CI job can switch Battery Saver on by itself, I ran the Android commands from the previous section in an Appium session on a real Samsung Galaxy S24 running Android 14. TestMu AI's ADB commands for app automation run through a lambda-adb JavaScript executor, and the docs list dumpsys among the shell commands supported on real devices.

// Which battery and Battery Saver commands does a TestMu AI real Android device
// accept from an Appium session? Runs each one through the lambda-adb executor.
import { remote } from 'webdriverio';

const driver = await remote({
  protocol: 'https',
  hostname: 'mobile-hub.lambdatest.com',
  port: 443,
  path: '/wd/hub',
  logLevel: 'error',
  capabilities: {
    platformName: 'Android',
    'appium:automationName': 'UiAutomator2',
    'lt:options': {
      username: process.env.LT_USERNAME,
      accessKey: process.env.LT_ACCESS_KEY,
      deviceName: 'Galaxy S24',
      platformVersion: '14',
      isRealMobile: true,
      app: process.env.LT_APP_URL, // lt://APP... returned by the app upload API
      build: 'Low Power Mode Testing',
      name: 'Battery Saver commands on Galaxy S24',
      w3c: true,
    },
  },
});

const commands = [
  'dumpsys battery',
  'settings get global low_power',
  'dumpsys battery unplug',
  'dumpsys battery set level 15',
  'dumpsys battery',
  'settings put global low_power 1',
  'cmd power set-mode 1',
  'dumpsys power',
  'dumpsys battery reset',
];
const keep = /Battery Saver is currently|mBatteryLevelLow=|level: |USB powered: /;

try {
  for (const text of commands) {
    try {
      const out = String(await driver.execute('lambda-adb', { command: 'shell', text }));
      const lines = out.split('\n').map((l) => l.trim()).filter((l) => keep.test(l));
      console.log('[OK ]', text, lines.length ? '| ' + lines.join(' | ') : '');
    } catch (err) {
      console.log('[ERR]', text, '|', err.message.split('\n')[0]);
    }
  }
} finally {
  await driver.deleteSession();
}

The script's console output (WebdriverIO also logs each rejected call to stderr, left out here):

[OK ] dumpsys battery | USB powered: true | level: 86
[ERR] settings get global low_power | WebDriverError: unknown error when running "execute/sync" with method "POST"
[OK ] dumpsys battery unplug
[OK ] dumpsys battery set level 15
[OK ] dumpsys battery | USB powered: false | level: 15
[ERR] settings put global low_power 1 | WebDriverError: unknown error when running "execute/sync" with method "POST"
[ERR] cmd power set-mode 1 | WebDriverError: unknown error when running "execute/sync" with method "POST"
[OK ] dumpsys power | mBatteryLevelLow=true | Battery Saver is currently: OFF
[OK ] dumpsys battery reset
  • Accepted - the dumpsys reads, dumpsys battery unplug and dumpsys battery set level 15. Afterward the device reported USB powered: false, level: 15 and mBatteryLevelLow=true, which is what an app sees as a low, discharging battery.
  • Rejected - settings get and settings put global low_power, and cmd power set-mode 1, each with a WebDriver unknown error. These are the commands that switch Battery Saver on.
  • Battery Saver state - dumpsys power still printed Battery Saver is currently: OFF. A low battery level did not trigger it on its own, because the automatic Battery Saver schedule on that device was off (mSettingAutomaticBatterySaver=0 in the full dump).

On the public device I used, an automated test can cover the low-battery path but cannot switch Battery Saver on. Run the Battery Saver pass manually with the toggle, and keep the automated job for low-battery handling and for reading the power state back with dumpsys power. End every run with dumpsys battery reset, as the script does, so the device reports its real battery again.

Low Power Mode Test Cases to Run

Run each case with the mode off, then on, on at least one iPhone and one Samsung or OnePlus phone. The last cases toggle the mode while the app is open.

Test caseHow to run itPass when
Foreground syncSave and refresh data with the mode onData saves and refreshes; deferred work is labeled in the UI
Background catch-upBackground the app with the mode on, then turn the mode offPending sync runs once the mode is off or the app returns to the foreground
Push and openSend a push notification and open it with the mode onThe opened screen fetches fresh data instead of showing a stale cache
Animation timingPlay animated screens; on iPhone Safari, check canvas and requestAnimationFrame animationAnimations stay usable at the lower frame rate; no logic depends on a frame count
Auto-lockLeave a long form, video or timer idle past 30 seconds on iOSState survives lock and resume; the session does not expire early
Location with screen offStart a trip or geofence, then lock the Android screenLocation gaps are handled; the app does not report a false stop
Large downloadsStart a large download on iOS with the mode onThe UI shows a paused or waiting state the user can understand
Mid-session toggleTurn the mode on and off while a screen is openThe app reacts to the change event without a restart
ThemeTurn Battery Saver on a Pixel phoneDark theme assets and contrast are correct

The push case uses the same setup as push notification testing on real devices, with the mode switched on before the notification arrives.

Test your website on the TestMu AI real device cloud

How to Automate Low Power Mode Checks in CI

Most of the code that reacts to the mode can be tested without a phone. The rest splits by where the device runs:

  • Unit tests with an injected power state - wrap isLowPowerModeEnabled or isPowerSaveMode() behind a small interface, inject a fake, and assert both branches on every commit.
  • Emulators and devices you own - run the adb commands from Android's guide before the UI suite and reset them afterward.
  • Cloud real devices - automate the low-battery path with dumpsys battery set level, read the state back with dumpsys power, and schedule a manual toggle pass per release for Battery Saver and iOS Low Power Mode.
  • When to run the device pass - before each release, and whenever sync, push or location code changes.
interface PowerState {
    val isPowerSave: Boolean
}

class AndroidPowerState(context: Context) : PowerState {
    private val pm = context.getSystemService(PowerManager::class.java)
    override val isPowerSave: Boolean get() = pm.isPowerSaveMode
}

class SyncPolicy(private val power: PowerState) {
    fun intervalMinutes(): Long = if (power.isPowerSave) 60L else 15L
}

class SyncPolicyTest {
    private fun policy(saver: Boolean) = SyncPolicy(object : PowerState {
        override val isPowerSave = saver
    })

    @Test
    fun normalIntervalWhenSaverIsOff() = assertEquals(15L, policy(saver = false).intervalMinutes())

    @Test
    fun backsOffWhenSaverIsOn() = assertEquals(60L, policy(saver = true).intervalMinutes())
}

The same pattern works in Swift with a protocol that wraps ProcessInfo. If the same devices run screenshot tests, keep the power state identical between baseline and comparison runs, because a change in rendering conditions is one of the causes of visual testing false positives.

Conclusion

Start with the two flows users notice first when the battery is low, usually sync and notifications, and run them with the toggle on one iPhone and one Samsung phone in a manual TestMu AI session. While the mode is on, read dumpsys power from the ADB shell in manual sessions to confirm the state, then add the injected power-state unit tests so the branch logic stays covered on every commit.

Does sync still recover when the battery is low and the network is slow? TestMu AI's Real Device Cloud runs your Appium tests on real Android and iOS devices and can switch them to a 3G or offline profile mid-test with network throttling for Appium tests.

To run your first test, start free, or
for a full walkthrough of the product.

Author

...

Shubham Soni

Blogs: 11

  • Linkedin

Shubham Soni is a Senior Member of Technical Staff at TestMu AI, building the Real Device Cloud and real-time testing infrastructure. He optimized the WebRTC services that power live testing to sub-100ms latency with adaptive bitrate streaming, led a frontend migration from Angular to React that cut page load time from 5-6 seconds to 1-1.5 seconds, and contributes to the official Device SDK. He led a team of four to build an accessibility testing product covering manual and automated testing and mentored a team of six on a real-time testing product. He brings over eight years of experience and earlier scaled a cloud code platform to 200K+ monthly users. Shubham holds a B.Tech in Computer Science.

Reviewer

...

Sai Krishna

Reviewer

  • Linkedin

Sai Krishna is Director of Engineering at TestMu AI, where he leads agentic AI for quality engineering, building AI agents that autonomously drive mobile and conversational test automation. His current focus is Agent Testing and Model Context Protocol (MCP) support for mobile. He is a core contributor and member of the Appium open-source project and the creator of AppiumTestDistribution and appium-device-farm. With over 14 years of experience including more than 9 years at Thoughtworks as a Principal Consultant, he holds a BSc in Electronics and speaks regularly at TestMu and Appium Conf on Appium, mobile automation, and agentic AI in testing.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Low Power Mode Testing FAQs

Did you find this page helpful?

More Related Blogs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests