Skip to content

Commit

Permalink
Fix root permissions on "newer" magisk
Browse files Browse the repository at this point in the history
  • Loading branch information
Astu04 authored Mar 5, 2024
1 parent 98ff409 commit 6ae32ed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion custom/ATVServices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,13 @@ if [ "$(magisk -V)" -le 23000 ]; then
fi
done
else
log -p i -t eMagiskATVService "Magisk version is higher than 23000. Not checking for magisk's policies."
if [ "$policy" != 2 ]; then
log -p i -t eMagiskATVService "$package current policy is $policy. Adding root permissions..."
packageUID=$(dumpsys package "$package" | grep userId | head -n1 | cut -d= -f2)
sqlite3 /data/adb/magisk.db "INSERT INTO policies (uid, policy, until, logging, notification) VALUES ($packageUID, 2, 0, 1, 1)"
else
log -p i -t eMagiskATVService "Root permissions for $package are OK!"
fi
fi

# Set mitm mock location permission as ignore
Expand Down

0 comments on commit 6ae32ed

Please sign in to comment.