Works on Android API 22 - 29 (except 28)
- For patching the ramdisk with magisk, your AVD must be already created
- Make sure you backup the untouched
ramdisk.img
from<sdk_home>/system-images/<platform>/*/ramdisk.img
. You will need it everytime you want to patch ramdisk with magisk (for the first time and also for subsequent magisk updates). - Clone this repository and copy the original
ramdisk.img
into the clone's folder. - Start the newly created AVD.
- Execute
patch.sh
orpatch.bat
to install Magisk on the ramdisk.img (you can executepatch.sh canary
orpatch.bat canary
to install latest canary Magisk on the ramdisk.img) - When finished, copy the patched
ramdisk.img
back to AVD directory. - Restart (cold start) emulator
- Recommended: update magisk manager
- Enjoy Magisk :)
Only test on Android 8.1
- Grab Magisk.zip and put in this directory.
- Bring up Android system and establish adb connection.
- Execute
prepare_image.sh
orprepare_image.bat
to grab initrd.img and ramdisk.img on hard drive. - Execute
patch_vbox.sh
orpatch_vbox.bat
to patch initrd.img and ramdisk.img - Execute
install_vbox.sh
orinstall_vbox.bat
to install patched images on hard drive. - Restart machine and enjoy Magisk :)
Reference: topjohnwu/Magisk#2551 (comment)