mirror of
https://github.com/Fox2Code/FoxMagiskModuleManager
synced 2024-10-30 15:20:15 +00:00
Prevent module install script from permanently disabling hidden APIs.
This commit is contained in:
parent
2a03093c4a
commit
1486c11782
@ -42,6 +42,17 @@ grep_get_prop() {
|
||||
}
|
||||
fi
|
||||
|
||||
# prevent old modules from disabling hidden_apis, please use LSPosed library instead.
|
||||
# See: https://github.com/LSPosed/AndroidHiddenApiBypass
|
||||
settings() {
|
||||
if [ "$1" == "put" ] && [ "$2" == "global" ] && ([ "$3" == "hidden_api_policy" ] || \
|
||||
[ "$3" == "hidden_api_policy_p_apps" ] || [ "$3" == "hidden_api_policy_pre_p_apps" ]); then
|
||||
true
|
||||
else
|
||||
"$(which settings)" "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ $MAGISK_VER_CODE -ge 20400 ]; then
|
||||
# New Magisk have complete installation logic within util_functions.sh
|
||||
install_module
|
||||
|
Loading…
Reference in New Issue
Block a user