/** * Test Case: Simulate a "High Security" corporate environment. * Useful for checking if your app crashes when permissions are revoked or hardware is disabled. */ @Test public void enforceHighSecurityProfile() // 1. Disable the Camera to test secure content handling // (Does your app handle the "Camera disabled by admin" exception gracefully?) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) dpm.setCameraDisabled(adminComponent, true); assertTrue("Camera should be disabled", dpm.getCameraDisabled(adminComponent));

: Since many enterprise testing labs are air-gapped or have restricted Play Store access, having the direct APK file (test dpc 2.0.6 apk) allows for sideloaded installation without an internet connection.

For , there is almost no reason to install this APK. It does not "unlock" hidden phone features in a way that benefits daily use and can lead to frustration if a policy is accidentally enabled. Developer Score: 4.5/5 Consumer Score: 1/5

// Note: You must replace this with your actual DeviceAdminReceiver component // If using Test DPC, this points to the Test DPC receiver class. adminComponent = new ComponentName("com.afwsamples.testdpc", "com.afwsamples.testdpc.DeviceAdminReceiver");

| Test Case | Expected | Actual | Status | |------------------------------------|--------------------------------------|--------------------------------------|--------| | Device compliance check | Reports to MDM every 4h | Reporting interval ~4h – acceptable | ✅ Pass | | Offline grace period (24h) | Mark non-compliant after 24h offline | Correctly flagged after 24h | ✅ Pass | | Root detection | Device marked non-compliant | Detected rooted test device (Magisk) | ✅ Pass |

Report Form

"*" indicates required fields