-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This instruction is up-to-date with initrd-magisk v1.8+
Magisk will
statall partitions to getst_devfor setup mirror directory. There is a problem if your/dataor/systemis a bind mount from linux driver, Magisk will wrongly mount entire your driver disk.Official Magisk will accidently handle this problem but this fix has not merged, you have to use Magisk Delta for now because Magisk Delta already has this fix.
-
In Android-x86 directory, rename
initrd.imgtoinitrd_real.imgand putinitrd-magiskasinitrd.img.Or put
initrd-magisk.imginto Android-x86 directory. Search for kernel cmdlineinitrd /$SOURCE_NAME/initrd.imgin GRUB custom code and change it toinitrd /$SOURCE_NAME/initrd-magisk.img -
Put
boot-magisk.imginto Android-x86 directory -
Boot into Android x86, install and open Magisk app. Enjoy ~~
-
Follow this guide to remove built-in root
In Android x86 directory will be like this:
- ...
- boot-magisk.img ← Boot image will be loaded by initrd-magisk
- data.img or data folder ← userdata will be stored inside this
- findme
- initrd.img (initrd-magisk.img) ←initial ramdisk will be loaded by kernel
- initrd_real.img (initrd.img) ← Original initrd image will be loaded by initrd-magisk
- install.img
- kernel
- ramdisk.img ← exist if using rootfs method for Android root directory
- system.img ← Android system files are stored inside this image
- ...
- Update Magisk app and do Direct Install.
There way to remove Magisk from system:
-
From Magisk app: Open Magisk app and do Uninstall Magisk → Complete uninstall (remove all magisk and its modules) or Restore boot image (remove magisk only).
-
Reset boot image: Remove
boot-magisk.img, the next bootinitrd-magiskwill create new boot image. -
Remove initrd-magisk
- If you have
rusty-magiskinstalled,initrd-magiskwill try to invalidate it. It's RECOMMENDED to remove it and do not use it. - If you update Android-x86 OTA, it might wipe out
initrd.imgso you might need to do again.
- Method 1
- Boot Android-x86 project with
initrd-magiskandDEBUG=1flag. If you have GearLock, you can boot into Recovery Mode and openVirtual Terminal Command. - When root shell is showed up, type
unsucommand and press Enter to remove root. - Type
frebootto restart the system.
- Method 2
Run these command in root shell (live Android system):
mount -o rw,remount $(magisk --path)/.magisk/mirror/system
mount -o rw,remount $(magisk --path)/.magisk/mirror/system_root
rm -rf $(magisk --path)/.magisk/mirror/system_root/system/*bin/su $(magisk --path)/.magisk/mirror/system/*bin/su
- KernelSU
Although KernelSU doesn't conflict with Magisk, it will execute real SU if it exists in PATH, you can get RIP of KernelSU by using another kernel.