Scripts fixes and improvements

- ensure all scripts use $NVBASE $MAGISKBIN $POSTFSDATAD and $SERVICED where appropriate
- simplify new grep_cmdline() using xargs and more sed
- show correct active sepolicy $RULESDIR on devices with no encryption
- add support for Android 12 .capex (compressed apex) files
This commit is contained in:
osm0sis
2021-11-17 22:53:33 -04:00
committed by John Wu
parent fef44bd24f
commit 68ac409bfd
3 changed files with 28 additions and 23 deletions

View File

@@ -114,20 +114,20 @@ else
mount -t tmpfs -o 'mode=0755' tmpfs /dev/avd-magisk
fi
# Magisk stuffs
mkdir -p /data/adb/magisk 2>/dev/null
unzip -oj app-debug.apk 'assets/*' -x 'assets/chromeos/*' -d /data/adb/magisk
mkdir /data/adb/modules 2>/dev/null
mkdir /data/adb/post-fs-data.d 2>/dev/null
mkdir /data/adb/services.d 2>/dev/null
# Magisk stuff
mkdir -p $MAGISKBIN 2>/dev/null
unzip -oj app-debug.apk 'assets/*' -x 'assets/chromeos/*' -d $MAGISKBIN
mkdir $NVBASE/modules 2>/dev/null
mkdir $POSTFSDATAD 2>/dev/null
mkdir $SERVICED 2>/dev/null
for file in magisk32 magisk64 magiskinit; do
chmod 755 ./$file
cp -af ./$file $MAGISKTMP/$file
cp -af ./$file /data/adb/magisk/$file
cp -af ./$file $MAGISKBIN/$file
done
cp -af ./magiskboot /data/adb/magisk/magiskboot
cp -af ./busybox /data/adb/magisk/busybox
cp -af ./magiskboot $MAGISKBIN/magiskboot
cp -af ./busybox $MAGISKBIN/busybox
ln -s ./magisk64 $MAGISKTMP/magisk
ln -s ./magisk $MAGISKTMP/su