ADB pm disable-user overridden by Esper Agent on reboot; pm hide/pm unhide leaves app stuck
Android
When you use ADB commands to disable or hide apps on an Esper-managed device, the Esper Agent may override those changes on reboot. This article explains why this happens and how to manage app states correctly through the Esper Console.
Understand the issue
The Esper Agent maintains its own app-state registry that is separate from Android's PackageManager state. On each device reboot, the Agent reconciles all managed apps to their last known state, which can override any changes you made using ADB commands.
Two specific issues can occur:
-
Apps re-enable after reboot: When you run
pm disable-user --user 0 <package>, the app disables during that session, but the Agent re-enables it on the next reboot because the Agent's internal registry still shows the app as enabled. -
Apps stuck in Hidden state: When you run
pm hidefollowed bypm unhide, the app can become stuck in a hidden state after reboot. The Agent's cached state isn't updated by thepm unhidecommand, so it reconciles back to hidden on reboot.
Before you begin
ADB pm commands are not a supported method for managing app states on Esper-enrolled devices. Always manage app states through the Esper Console or API instead.
Fix apps that re-enable after reboot
- In the Esper Console, go to Devices & Groups and select your target device or group.
- Open Blueprint and select the active Blueprint.
- In the Apps section, verify the app is completely removed from the Blueprint (not just unpinned from a version, but fully deleted from the app list).
- Save and apply the Blueprint by clicking Apply Blueprint.
- After the Blueprint pushes successfully, disable the app through the Esper Console: navigate to the app and set its state to Disabled. This updates the Agent's internal registry through the managed channel.
- Reboot the device and verify the app remains disabled using
adb shell pm list packages -d.
Recover apps stuck in Hidden state
- In the Esper Console, go to Devices & Groups and select the affected device.
- Open the Apps tab and locate the stuck package.
- Explicitly set the app state to Enabled through the Esper Console. This forces the Agent to write a fresh state entry to its internal cache.
- If the app remains stuck, remove it from the Blueprint entirely and push the updated Blueprint.
- Once removed, re-add the app to the Blueprint with your desired state and push again.
Best practices for managing apps on Esper devices
- Use the Esper Console or API to manage all app states — never use ADB
pmcommands for disable, hide, or unhide operations. - Do not use
pm disable-user,pm hide, orpm unhideon Esper-managed devices, as these commands bypass the Agent's Apps & Configuration layer and can corrupt its internal state cache. - If you need to manage app versions, use the Blueprint's version pinning controls rather than shell commands.
Still need help?
If you continue to experience issues with app state management, contact Esper Support. When you submit a ticket, include the device serial number and the package names affected.
Please sign in to leave a comment.
Comments
0 comments