fsp_module/common/install.sh

19 lines
1.5 KiB
Bash
Executable File

cat > $MODPATH/0000fsp <<EOF
#!/system/bin/sh
DISABLE="/data/adb/modules/fsp_module/disable"
if ! test -e "\$DISABLE"; then
## Fix common SELinux non-permissive issues
/system/bin/magisk su -c "\$MODPATH/magiskpolicy --live 'allow untrusted_app_27 * * {*}' 'allow system_server * * {*}' 'allow system_suspend * * {*}' 'allow mtk_hal_nvramagent * * {*}' 'allow magisk * * {*}' 'allow system_app * * {*}' 'allow mnld * * {*}' 'allow platform_app * * {*}' 'allow untrusted_app * * {*}' 'allow untrusted_app_29 * * {*}' 'allow priv_app * * {*}' 'allow untrusted_app_30 * * {*}' 'allow untrusted_app_25 * * {*}' 'allow audioserver * * {*}' 'allow crash_dump * * {*}' 'allow su * * {*}' 'allow mediaserver * * {*}' 'allow hwservicemanager * * {*}' 'allow mtk_hal_c2 * * {*}' 'allow surfaceflinger * * {*}' 'allow mediaswcodec * * {*}' 'allow shell * * {*}' 'allow gsid * * {*}'"
## Fix SELinux Policies for ArrowOS
/system/bin/magisk su -c "\$MODPATH/magiskpolicy --live 'allow surfaceflinger * * {*}' 'allow vold * * {*}' 'allow radio * * {*}' 'allow installd * * {*}' 'allow ccci_mdinit * * {*}' 'allow vendor_init * * {*}' 'allow hal_fingerprint_oppo_compat * * {*}' 'allow init * * {*}' 'allow rild * * {*}' 'allow bip * * {*}' 'allow gsm0710muxd * * {*}' 'allow phhsu_daemon * * {*}' 'allow isolated_app * * {*}'"
fi
EOF
ui_print "- FSP boot script created"
install_script -p $MODPATH/0000fsp
install_script -l $MODPATH/0000fsp
ui_print "- FSP boot script copied necessary places"
ui_print "- Continuing to install"