Skip to content

Commit

Permalink
Disable automatic permissions revoke
Browse files Browse the repository at this point in the history
On API>=30 an apps permissions will be automatically revoked if the app is unused for a while.
As ViPER4Android is an app which is destined to be configured once and then work "unused" for a long time,
it makes sense to disable this feature.

Thanks to @binarynoise for finding the correct APPOPS operation name.
  • Loading branch information
programminghoch10 committed Jun 11, 2023
1 parent f407e57 commit 4d742d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions magiskmodule/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ set_perm_recursive "$FOLDER" "$VIPERFXPREFSOWNER" sdcard_rw 771 660 u:object_r:s
}
# this disables battery optimization
[ $API -ge 30 ] && dumpsys deviceidle whitelist +$VIPERFXPACKAGE >/dev/null
# this disables automatic permissions revoke if unused
[ $API -ge 30 ] && appops set --uid $VIPERFXPACKAGE AUTO_REVOKE_PERMISSIONS_IF_UNUSED ignore

for packagedata in $(sed -e 's/^\s*#.*$//' -e '/^$/d' < "$MODPATH"/stockeqpackages.csv); do
package="$(echo "$packagedata" | cut -d'|' -f1)"
Expand Down

0 comments on commit 4d742d1

Please sign in to comment.