Skip to content

Instantly share code, notes, and snippets.

@shakalaca
Created June 2, 2020 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shakalaca/c9c77c3916be6af041ef8d333128aaf1 to your computer and use it in GitHub Desktop.
Save shakalaca/c9c77c3916be6af041ef8d333128aaf1 to your computer and use it in GitHub Desktop.
* 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)
#!/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