1. Home
  2. Knowledge Base
  3. SureMDM
  4. How to Revert an Application’s Runtime Permissions to the Default State in SureMDM
  1. Home
  2. Knowledge Base
  3. Android Management
  4. How to Revert an Application’s Runtime Permissions to the Default State in SureMDM

How to Revert an Application’s Runtime Permissions to the Default State in SureMDM

Purpose

Managing application runtime permissions is a common requirement in enterprise mobility environments, especially when permissions may have been modified over time. Manually restoring these permissions on individual devices can be inefficient and error-prone.

The purpose of this article is to explain how to revert an application’s runtime permissions back to their default state when permissions have been modified earlier. SureMDM provides this capability using a Run Script command, allowing administrators to reset all runtime permissions for a specific application efficiently.

Prerequisites

  • Device enrolled in Fully Managed or Work Profile mode.
  • Package name of the target application
  • Android device that supports runtime permissions

Steps 

  1. Log in to the SureMDM Console
  2. Navigate to Jobs -> New Job -> Android -> Run Script
  3. Enter the Job Name and Enter the below Script

!#suremdm

setDefaultRuntimePermission(Package name,*)

  • Package name: Replace this with the full package name of the application (e.g., com.example.app).   
  • *  : This wildcard signifies that all runtime permissions for the specified package will be reset to their default state.
  1. Click on Save to create the job.

Note: This functionality is supported on devices enrolled in Fully Managed and Work profile mode.

Expected Results

  • All runtime permissions for the specified application are reset to their default system-defined state.
  • Any previously granted or denied runtime permissions are reverted.
  • The job executes successfully on devices enrolled in Fully Managed or Work Profile mode.

Conclusion

Reverting runtime permissions to their default state helps administrators maintain consistent permission behavior across managed devices. Using the Run Script command in SureMDM provides a simple and effective way to reset all runtime permissions for an application when required.

Need more help? Here’s how to get help from our experts. 

CONTACT US

Was this helpful?
YesNo
Updated on January 2026
Need Support?
Can't find the answer you're looking for?
Contact Support