- *BASICS*
- The Knox Ecosystem
- White Paper
- Samsung Knox Portal
- Knox Cloud Services
- General Knox Support
- Knox Licenses
- *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
- Introduction
- How-to videos
- Get started
- Features
- Register resellers
- Add an admin
- Create profiles
- Google device owner support
- MDM compatibility matrices
- Device users
- Activity log
- Enroll and unenroll devices
- Configure devices
- Provide KME feedback
- Use the Knox Deployment App (KDA)
- Recover Google FRP locked devices using KME
- Role-based access control (RBAC)
- Release notes
- FAQs
- Troubleshoot
- KBAs
- On-Premise
- Knox Configure
- Mobile
- Wearables
- Shared Device
- KBAs
- Knox Capture
- Introduction
- How it works
- How-to videos
- 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
- Release notes
- FAQs
- Troubleshoot
- 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
- 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
- View applications
- Add applications
- Introduction
- Add internal Android and iOS applications
- Add internal Windows applications
- Add public applications using Google Play Store
- Add public applications using iOS App Store
- Add public applications using Managed Google Play
- Add public applications using Managed Google Play Private
- Add public applications using Managed Google Play Store Private Web
- Add public applications using Microsoft Store
- Add Chrome OS applications
- Assign applications
- Introduction
- Assign internal Android and iOS apps
- Assign iOS App Store applications
- Assign Google Play applications
- Assign Managed Google Play applications
- Assign Managed Google Play Private applications
- Assign Managed Google Play public web apps
- Assign Windows applications
- Assign Chrome OS applications
- Manage applications
- Volume Purchase Program for iOS
- Profile
- Knox E-FOTA
- Certificates
- Advanced settings
- Monitor
- Kiosk devices
- Knox Remote Support
- Active Directory
- Microsoft Exchange
- Mobile Admin
- Appendix
- Release notes
- Features
- FAQs
- KBAs
- Knox E-FOTA
- Introduction
- How-to videos
- Get started
- Features
- EMM integration
- Appendix
- Release notes
- FAQs
- 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
- Introduction
- Accept or reject devices
- Upload devices
- Delete devices
- Complete payment
- Send payment overdue notification
- 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
- FAQs
- KBAs
- Support
- Samsung Care+ for Business
- *FOR RESELLERS*
- Knox Deployment Program
- *FOR MANAGED SERVICE PROVIDERS*
- 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