A persistent and frustrating challenge in enterprise mobility is ensuring that mission-critical security applications remain active. You deploy a state-of-the-art Mobile Threat Defense (MTD) solution to your corporate fleet, only to discover that devices are falling out of compliance. The culprit? Aggressive OEM battery optimization protocols--often referred to as "app killers"--or savvy end-users manually force-stopping the application to save battery or bypass monitoring.
To maintain a zero-trust security posture, your MTD apps must run silently and continuously in the background, 24/7. When Android background execution limits terminate these apps, your enterprise network becomes vulnerable to phishing, malicious payloads, and man-in-the-middle attacks. Historically, solving this required complex, custom JSON scripting and constant battles with manufacturer-specific battery settings.
Discover how to leverage the latest Android Management API (AMAPI) role-based privileges within Nomid MDM to make your Mobile Threat Defense tools completely tamper-proof. As an official Android Enterprise Partner, Nomid MDM provides a seamless, UI-driven approach to bypass aggressive OS restrictions, ensuring your security stack remains invincible across Healthcare, Retail, Education, and Logistics deployments.
Understanding the Android App Killer Problem
Before you can effectively stop Android app killers, you must understand how the Android operating system manages resources. To maximize battery life, Android employs several aggressive power-saving features, most notably Doze mode and App Standby Buckets. While excellent for consumer devices, these features wreak havoc on enterprise security tools.
When a device is unplugged and stationary, Doze mode restricts background CPU and network activity. Furthermore, App Standby Buckets categorize apps based on user interaction. Because MTD apps are designed to be invisible to the user, the OS often categorizes them in the "Rare" or "Restricted" buckets, severely limiting their ability to scan for threats or report back to the MDM console.
Compounding this OS-level behavior is user tampering. If an employee notices an app consuming battery, they can navigate to the device settings and tap "Force Stop." Once force-stopped, an application cannot restart itself until the user manually launches it again. For Android Enterprise MTD protection to be effective, you must neutralize both the OS-level battery optimization and the user-level ability to terminate the app.

The Nomid MDM Solution: AMAPI Role-Based Privileges
The modern solution to this challenge lies within the Android Management API (AMAPI). Google introduced AMAPI role-based privileges (specifically via DelegatedScope) to allow IT Asset Managers to grant elevated, system-level permissions to specific applications without requiring those apps to be the Device Policy Controller (DPC).
Combined with precise MDM battery optimization exemption policies and strict application lockdown settings, Nomid MDM ensures your force-installed Android apps become truly tamper-proof security apps. Whether you are deploying ruggedized scanners in a logistics warehouse or Samsung Knox-enabled tablets in a clinical healthcare setting, this configuration guarantees your MTD solution will survive reboots, user interference, and aggressive OS resource management.

Step-by-Step Tutorial: Making MTD Apps Tamper-Proof in Nomid MDM
Follow these precise steps within your Nomid MDM console to configure, deploy, and protect your Mobile Threat Defense application using AMAPI role-based privileges. This tutorial assumes you have already linked your managed Google Play account to your Nomid MDM tenant.
Step 1: Force-Install the MTD Application
To ensure the MTD app is present on the device immediately upon Zero-Touch Enrollment, you must configure it as a force-installed application. This prevents the user from uninstalling it.
- Log in to your Nomid MDM Administrator Console.
- Navigate to Apps > App Catalog in the left-hand navigation menu.
- Click Add App and search for your specific MTD solution (e.g., Lookout, Zimperium, or Microsoft Defender) in the Managed Google Play iframe.
- Approve the application and its required permissions, then click Sync.
- Navigate to Policies > Device Profiles and select the profile assigned to your target devices.
- Under the Applications tab, locate your MTD app and change the Deployment Type to Force Installed (AMAPI equivalent: installType: FORCE_INSTALLED).
- Save the profile.
Expected result: The MTD application will now automatically download and install on all devices assigned to this profile without requiring user interaction, and the "Uninstall" button will be disabled on the device.
Warning: Force-installed applications will consume network data upon initial device provisioning. If you are deploying via Zero-Touch Enrollment over cellular networks in logistics or field-service environments, ensure your data plans account for this initial payload.
Step 2: Apply the MDM Battery Optimization Exemption
Next, you must instruct the Android OS to ignore this specific application when applying Doze mode and App Standby limits.
- While still in the Device Profiles section of Nomid MDM, edit your target profile.
- Navigate to the Advanced App Configurations tab.
- Locate the Battery Optimization Exemptions section.
- Click Add Exemption and select your MTD application from the dropdown list.
- Toggle the setting to Exempt from Optimization. (This leverages the AMAPI batteryOptimization: EXEMPTED policy).
- Save your changes.
Expected result: The Android OS will no longer suspend the MTD app's background processes, ensuring continuous threat scanning regardless of the device's battery level or standby state.
Step 3: Assign AMAPI Role-Based Privileges (Delegated Scopes)
This is the critical step to stop Android app killers. By delegating the Security Admin scope, you give the MTD app the authority to monitor system-level events without being killed by the OS.
- In the Nomid MDM console, navigate to Security > Delegated Privileges.
- Click Create New Delegation.
- Select your target Device Profile.
- In the Target Application field, select your MTD app.
- In the Delegated Scopes list, check the box for Security Admin (AMAPI equivalent: DELEGATED_SCOPE_SECURITY_ADMIN).
- Optional: If your MTD app performs phishing protection via local VPN, also check the box for Network Activity Admin (AMAPI equivalent: DELEGATED_SCOPE_NETWORK_ACTIVITY_LOGS).
- Click Apply Delegation.
Expected result: The MTD application now possesses elevated, system-level privileges. The OS recognizes it as a critical security component, vastly reducing the likelihood of unexpected termination by OEM-specific memory management protocols.
Note: Not all MTD apps are built to accept all AMAPI delegated scopes. Consult your specific MTD vendor's documentation to ensure you are only delegating the scopes their application is programmed to utilize.
Step 4: Lock Down App Info Settings to Prevent User Tampering
Even with OS-level protections in place, a user might still try to navigate to the device settings and hit "Force Stop" or clear the app data. You must block access to these settings.
- Navigate to Policies > Device Profiles and open your target profile.
- Go to the Device Restrictions tab.
- Scroll down to the Application Management section.
- Locate the setting labeled Allow User to Modify App Settings and toggle it to Disabled (AMAPI equivalent: modifyAppSettingsDisabled: true).
- To be completely thorough, locate Allow User to Force Stop Apps and toggle it to Disabled.
- Click Publish Profile to push these changes to your fleet.
Expected result: When a user navigates to Settings > Apps > [MTD App], the "Force Stop", "Uninstall", and "Clear Data" buttons will be greyed out and unclickable. The app is now fully tamper-proof.
Verifying Tamper-Proof MTD Protection
After pushing the updated Nomid MDM profile to your devices, you must verify that the configuration successfully stops Android app killers and prevents user tampering. Grab a test device that has received the updated profile and perform the following checks:
- The Force Stop Test: Navigate to Settings > Apps > [Your MTD App]. Verify that the "Force Stop" and "Uninstall" buttons are greyed out.
- The Battery Optimization Test: Navigate to Settings > Battery > Battery Optimization (menu paths vary by OEM). Search for your MTD app. It should say "Not Optimized" and the user should be unable to change this status.
- The Reboot Test: Restart the device. Do not open the MTD app manually. Log into your MTD vendor's web console and verify that the device checks in and reports its health status within 5 minutes of booting up. This confirms the app is launching automatically in the background.
If the device passes all three tests, your AMAPI role-based privileges and MDM battery optimization exemptions are functioning perfectly.

Troubleshooting FAQ
Why is my MTD app still going to sleep on Samsung devices?
Samsung devices utilize a proprietary battery management system alongside native Android Doze. While Nomid MDM's battery exemption policy handles the native Android side, you may need to leverage our deep Samsung Knox integration. In the Nomid MDM console, navigate to your profile's OEMConfig section, add the Knox Service Plugin (KSP), and explicitly whitelist the MTD app package name in the Knox battery optimization settings.
The "Security Admin" delegated scope is failing to apply. What went wrong?
AMAPI will reject a delegated scope if the target application is not force-installed or if the application manifest does not declare support for that specific management role. Ensure that Step 1 (Force Install) is fully completed and synced before applying Step 3. Additionally, verify with your MTD vendor that their current app version supports AMAPI delegated scopes.
Can users bypass this by booting into Safe Mode?
How do I update the MTD app if I have locked down app modifications?
Locking down the "Modify App Settings" restriction prevents the user from changing app states; it does not prevent the MDM from updating the app. Nomid MDM will continue to silently push updates to the MTD application via Managed Google Play in the background, adhering to your configured Maintenance Window policies.
The device shows as "Non-Compliant" in Nomid MDM after applying these settings. Why?
This usually occurs if the MTD app requires the user to open it once to grant local device permissions (like Location or Storage) before it can activate. To fix this, use Nomid MDM's App Permission Policies to silently auto-grant all required runtime permissions to the MTD app. Set the permission policy to GRANT for the specific MTD package name so no user interaction is required.
Conclusion
Stopping Android app killers and ensuring the continuous operation of your security stack is no longer a guessing game of OEM-specific workarounds. By leveraging AMAPI role-based privileges, battery optimization exemptions, and strict application management restrictions, you can transform standard mobile deployments into hardened, zero-trust endpoints.
Nomid MDM abstracts the complexity of Android Management API JSON scripting, allowing IT Asset Managers to deploy tamper-proof MTD solutions with just a few clicks. Whether you are securing patient data in Healthcare or protecting point-of-sale systems in Retail, implementing these steps guarantees your Mobile Threat Defense applications will execute flawlessly in the background.
Ready to experience lightning-fast device deployment and unparalleled security control? Log into your Nomid MDM console today to configure your delegated privileges, or contact our Android Enterprise integration specialists to optimize your fleet's security posture.
Written by
David Ponces
Enjoying this article?
Get more insights on mobile device management delivered to your inbox.
