- Basics
- About Knox
- Knox licenses
- Knox white paper
- Sign up for Samsung Knox
- Latest release notes
- General Knox FAQ
- General Knox KBAs
- Submit a support ticket
- User Acceptance Testing
- For IT admins
- Knox Admin Portal
- Knox Suite
- Knox Platform for Enterprise
- Introduction
- How-to videos
- Before you begin
- Get started with UEMs
- Introduction
- Blackberry UEM
- Citrix Endpoint Management
- FAMOC
- IBM MaaS360
- Microsoft Intune
- MobileIron Cloud
- MobileIron Core
- Samsung Knox Manage
- SOTI MobiControl
- VMware Workspace ONE UEM
- Knox Service Plugin
- Release notes
- Migrate to Android 11
- FAQs
- Troubleshoot
- KBAs
- Knox Mobile Enrollment
- Knox Configure
- Mobile
- Wearables
- Shared Device
- FAQ
- KBAs
- Knox Capture
- Welcome
- Overview
- How-to guides
- Manage licenses
- Scanning profiles
- Apps and activities
- Scan engine settings
- Keystroke output rules
- Export configuration and deploy through EMM
- Set the camera scan trigger
- Connect a hardware scanner
- Configure the output path
- Use the scanner overlay
- Check a configuration in test mode
- Use intent output
- Knox Capture AR
- Get started
- How-to videos
- Release notes
- FAQ
- KBAs
- Troubleshoot
- Knox Capture: Scandit Edition
- Introduction
- How it works
- IT admins: Get started
- Getting started with Knox Capture
- Step 1: Launch Knox Capture
- Step 2: Create a scanning profile
- Step 3: Select apps and activities
- Step 4: Configure the scanner
- Step 5: Set keystroke output rules
- Step 6: Test apps in your configuration
- Step 7: Share your configuration
- Step 8: Deploy Knox Capture in Managed mode
- End users: Get started
- Features
- Knox Asset Intelligence
- Knox Manage
- Introduction
- How-to videos
- Get started
- Video: Getting started with Knox Manage
- Integration with Managed Service Provider
- Access Knox Manage
- Configure basic environments
- Create user accounts
- Create groups
- Create organization
- Set up devices and profiles
- Create a new profile
- Assign profiles to groups and organizations
- Enroll devices
- Shared Android device quickstart
- Non-shared Android device enrollment quickstart
- Android Management API device enrollment quickstart
- Apple User Enrollment quickstart
- View device information
- Apply profiles to organizations
- Set up Knox Manage deployment with a Knox Suite license
- Manage Chromebooks
- Manage Android devices with the Android Management API
- Manage Shared iPads
- Configure
- Licenses
- Organization
- Users
- Sync user information
- Groups
- Devices
- Content
- Applications
- Profile
- Knox E-FOTA
- Certificates
- Advanced settings
- Monitor
- Kiosk devices
- Knox Remote Support
- Active Directory
- Microsoft Exchange
- Mobile Admin
- Appendix
- Release notes
- Features
- FAQ
- KBAs
- Knox E-FOTA
- Introduction
- How-to videos
- Get started
- Features
- EMM integration
- Appendix
- Release notes
- FAQ
- KBAs
- Troubleshoot
- Knox E-FOTA On-Premises
- Legacy Knox E-FOTA products
- Knox Guard
- Introduction
- How-to video
- Get started
- Using Knox Guard
- Dashboard
- Manage devices
- Device management
- Accept or reject devices
- Upload devices
- Delete devices
- Complete device management
- Send notifications
- Enable or disable SIM control
- Download devices as CSV
- View device log
- View device deletion log
- Start and stop blinking reminder
- Lock and unlock devices
- Update lock message
- Send relock timestamp
- Turn on/off relock reminder
- Manage policies
- Manage licenses
- Manage resellers
- Manage admins and roles
- Activity log
- Knox Deployment App
- Release notes
- FAQ
- KBAs
- Support
- Knox Guard REST API
- Samsung Care+ for Business
- For Knox Partners
- Knox Deployment Program
- Knox MSP Program
How to check if the Prevent applications from being stopped policy is enforced on an app
Environment
- Knox Configure (KC)
- Android Debug Bridge (ADB) Toolkit
- Knox-enabled devices
Overview
If you applied the Prevent applications from being stopped policy to a device in Knox Configure (KC), this knowledge base article shows you how to check if an application is active, or if it is sleeping in Doze mode.
This method is especially useful for devices running an Android OS version below 9, as there is no way to verify the application's running state in Settings.
Prerequisites
This guide assumes you are using a Windows computer with the following installed:
How do I verify if an app is running on my device?
To check the running state of an app on your device:
- Navigate to Settings and enable Max power saving mode. The message "Security policy restricts you from stopping this application" appears.
- Tap the Recent applications view.
If an app appears in the list, the Prevent applications from being stopped policy is applied to it.
How do I verify if an app is in sleep/Doze mode with ADB?
On your device:
- Navigate to Settings > About phone > Software information.
- Tap Build Number 7 times to enable Developer options.
- Navigate to the Settings menu again. Under Developer options, enable USB Debugging.
On your computer:
- Connect the device to your computer via USB. When a prompt appears on the computer asking if you want to allow access to the device's data, click Allow. If this is the first time the device is connected, an additional prompt with the computer's RSA key fingerprint appears. Click OK.
- On the device, run the application you want to test on the phone. In this example, we are using the Google Chrome app (com.android.chrome).
- In the Windows Start Menu search bar, type
cmd
and select Windows Command Prompt.
In the command prompt:
Change your current directory to where you extracted your ADB files. To do so, paste in the line below and replace the file path:
cd <insert_file_path_to_adb.exe_here>
Then, run the following ADB command to initiate the ADB connection between device and computer, and simulate the device being unplugged from USB:
adb shell dumpsys battery unplug
Ensure that the app you are testing is running in the background. To get the app's activity status, enter the following ADB command:
adb shell am get-inactive com.android.chrome
"Idle=false" is printed on a new line, indicating that the application is actively running and not in sleep/Doze mode.
Run the following ADB command to set the application to sleep or Doze mode:
adb shell am set-inactive com.android.chrome true
Then, run the earlier command to get the status of the app again:
adb shell am get-inactive com.android.chrome
If the result is Idle=true
, the app was successfully put to sleep. If the result is Idle=false
, there is a device policy preventing the app from entering sleep/Doze mode.
For example, this command prompt window demonstrates what you see if this policy is not enforced on the device:
After testing is complete, run the following command to establish the USB connection again:
adb shell dumpsys battery reset