Created
June 2, 2020 12:21
-
-
Save shakalaca/c9c77c3916be6af041ef8d333128aaf1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Download magisk.zip and unzip | |
* Rename x86/magiskboot to x86/magiskboot.real | |
* Add x86/magiskboot | |
* Add x86/mboot (https://github.com/shakalaca/MagiskOnIntelDevices/raw/master/mboot) | |
* ZIP and update from MagiskManager custom channel (modify https://raw.githubusercontent.com/topjohnwu/magisk_files/canary/debug.json) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/system/bin/sh | |
if [[ "$1" == "unpack" ]]; then | |
./mboot -u -f $2 | |
./magiskboot.real decompress ramdisk.cpio.gz ramdisk.cpio | |
elif [[ "$1" == "repack" ]]; then | |
BOOTIMAGE=$2 | |
NEW_IMAGE="${2%/*}/new-boot.img" | |
./magiskboot.real compress ramdisk.cpio ramdisk.cpio.gz | |
./mboot -f $BOOTIMAGE | |
mv -f $BOOTIMAGE $NEW_IMAGE | |
rm -f bootstub cmdline.txt hdr kernel parameter sig ramdisk.cpio.gz | |
else | |
./magiskboot.real "$@" | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment