Advertisement
metalx1000

Disable Android Permissions Revoking if unused

Dec 13th, 2023
1,445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.44 KB | None | 0 0
  1. #found in comments at https://billauer.co.il/blog/2022/09/android-12-opt-out-hibernation/
  2. # use ADB SHELL
  3.  
  4. # Disable pause App Activity if unused
  5. for uid in `pm list packages -U -3 | awk '{ print $3}' FS=:`
  6. do
  7.     appops set $uid AUTO_REVOKE_PERMISSIONS_IF_UNUSED ignore
  8. done
  9.  
  10. # enable pause App Activity if unused
  11. for uid in `pm list packages -U -3 | awk '{ print $3}' FS=:`
  12. do
  13.     appops set $uid AUTO_REVOKE_PERMISSIONS_IF_UNUSED allow
  14. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement