From de732e32486f6464429fd885927acdaaf8979f3a Mon Sep 17 00:00:00 2001 From: programminghoch10 <16062290+programminghoch10@users.noreply.github.com> Date: Sun, 25 Feb 2024 22:14:58 +0100 Subject: [PATCH] prepare stockeqpackages.csv during compile time --- .gitignore | 1 + compile.sh | 2 ++ magiskmodule/customize.sh | 4 ++-- magiskmodule/stockeqpackages.csv => stockeqpackages.csv | 0 4 files changed, 5 insertions(+), 2 deletions(-) rename magiskmodule/stockeqpackages.csv => stockeqpackages.csv (100%) diff --git a/.gitignore b/.gitignore index 55133b2..c48383d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ magiskmodule/ViperIRS.tar.gz magiskmodule/ViperVDC.tar.gz magiskmodule/module.prop magiskmodule/README.md +magiskmodule/stockeqpackages.csv diff --git a/compile.sh b/compile.sh index ae6cadd..ab4f0fa 100755 --- a/compile.sh +++ b/compile.sh @@ -44,6 +44,8 @@ setVersionVariables() { git clean -Xdfq magiskmodule/ +sed -e 's/^\s*#.*$//' -e '/^$/d' < stockeqpackages.csv > magiskmodule/stockeqpackages.csv & + setVersionVariables . cp -f README.md magiskmodule/README.md & diff --git a/magiskmodule/customize.sh b/magiskmodule/customize.sh index 8ca5360..eb420ee 100644 --- a/magiskmodule/customize.sh +++ b/magiskmodule/customize.sh @@ -187,7 +187,7 @@ set_perm_recursive "$FOLDER" "$VIPERFXPREFSOWNER" sdcard_rw 771 660 u:object_r:s # 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 +while IFS= read -r packagedata; do package="$(echo "$packagedata" | cut -d'|' -f1)" package_filename="$(echo "$packagedata" | cut -d'|' -f2)" package_friendlyname="$(echo "$packagedata" | cut -d'|' -f3)" @@ -212,7 +212,7 @@ for packagedata in $(sed -e 's/^\s*#.*$//' -e '/^$/d' < "$MODPATH"/stockeqpackag touch "$MODPATH"/system/"$package_apk_dir"/"$(basename "$package_apk")" done } -done +done < "$MODPATH"/stockeqpackages.csv ui_print "- Setting Permissions" set_perm_recursive "$MODPATH"/system root root 755 644 diff --git a/magiskmodule/stockeqpackages.csv b/stockeqpackages.csv similarity index 100% rename from magiskmodule/stockeqpackages.csv rename to stockeqpackages.csv