mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-15 18:30:21 +00:00
Stop embedding executables
This commit is contained in:
@@ -71,13 +71,14 @@ export KEEPFORCEENCRYPT=true
|
||||
echo "KEEPVERITY=$KEEPVERITY" > config
|
||||
echo "KEEPFORCEENCRYPT=$KEEPFORCEENCRYPT" >> config
|
||||
echo "PREINITDEVICE=$(./magisk --preinit-device)" >> config
|
||||
# For API 28, we also patch advancedFeatures.ini to disable SAR
|
||||
# Manually override skip_initramfs by setting RECOVERYMODE=true
|
||||
# For API 28, we also manually disable SystemAsRoot
|
||||
# Explicitly override skip_initramfs by setting RECOVERYMODE=true
|
||||
[ $API = "28" ] && echo 'RECOVERYMODE=true' >> config
|
||||
cat config
|
||||
|
||||
./magiskboot compress=xz magisk magisk.xz
|
||||
./magiskboot compress=xz stub.apk stub.xz
|
||||
./magiskboot compress=xz init-ld init-ld.xz
|
||||
|
||||
./magiskboot cpio ramdisk.cpio \
|
||||
"add 0750 init magiskinit" \
|
||||
@@ -85,12 +86,13 @@ cat config
|
||||
"mkdir 0750 overlay.d/sbin" \
|
||||
"add 0644 overlay.d/sbin/magisk.xz magisk.xz" \
|
||||
"add 0644 overlay.d/sbin/stub.xz stub.xz" \
|
||||
"add 0644 overlay.d/sbin/init-ld.xz init-ld.xz" \
|
||||
"patch" \
|
||||
"backup ramdisk.cpio.orig" \
|
||||
"mkdir 000 .backup" \
|
||||
"add 000 .backup/.magisk config"
|
||||
|
||||
rm -f ramdisk.cpio.orig config magisk*.xz stub.xz
|
||||
rm -f ramdisk.cpio.orig config *.xz
|
||||
if $IS_RAMDISK; then
|
||||
./magiskboot compress=gzip ramdisk.cpio "$OUTPUT_FILE"
|
||||
else
|
||||
|
@@ -221,7 +221,7 @@ else
|
||||
# Android 15 Beta
|
||||
run_test 35 google_apis
|
||||
# Run 16k page tests
|
||||
run_test VanillaIceCream google_apis_ps16k
|
||||
run_test 35 google_apis_ps16k
|
||||
fi
|
||||
|
||||
"$avd" delete avd -n test
|
||||
|
@@ -20,6 +20,7 @@
|
||||
# magiskinit binary The binary to replace /init.
|
||||
# magisk binary The magisk binary.
|
||||
# magiskboot binary A tool to manipulate boot images.
|
||||
# init-ld binary The library that will be LD_PRELOAD of /init
|
||||
# stub.apk binary The stub Magisk app to embed into ramdisk.
|
||||
# chromeos folder This folder includes the utility and keys to sign
|
||||
# (optional) chromeos boot images. Only used for Pixel C.
|
||||
@@ -161,6 +162,7 @@ $BOOTMODE && [ -z "$PREINITDEVICE" ] && PREINITDEVICE=$(./magisk --preinit-devic
|
||||
# Compress to save precious ramdisk space
|
||||
./magiskboot compress=xz magisk magisk.xz
|
||||
./magiskboot compress=xz stub.apk stub.xz
|
||||
./magiskboot compress=xz init-ld init-ld.xz
|
||||
|
||||
echo "KEEPVERITY=$KEEPVERITY" > config
|
||||
echo "KEEPFORCEENCRYPT=$KEEPFORCEENCRYPT" >> config
|
||||
@@ -177,13 +179,14 @@ fi
|
||||
"mkdir 0750 overlay.d/sbin" \
|
||||
"add 0644 overlay.d/sbin/magisk.xz magisk.xz" \
|
||||
"add 0644 overlay.d/sbin/stub.xz stub.xz" \
|
||||
"add 0644 overlay.d/sbin/init-ld.xz init-ld.xz" \
|
||||
"patch" \
|
||||
"$SKIP_BACKUP backup ramdisk.cpio.orig" \
|
||||
"mkdir 000 .backup" \
|
||||
"add 000 .backup/.magisk config" \
|
||||
|| abort "! Unable to patch ramdisk"
|
||||
|
||||
rm -f ramdisk.cpio.orig config magisk*.xz stub.xz
|
||||
rm -f ramdisk.cpio.orig config *.xz
|
||||
|
||||
#################
|
||||
# Binary Patches
|
||||
|
Reference in New Issue
Block a user