-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This instruction is up-to-date with initrd-magisk v1.8+
Magisk will
stat
all partitions to getst_dev
for setup mirror directory. There is a problem if your/data
or/system
is 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.img
toinitrd_real.img
and putinitrd-magisk
asinitrd.img
.Or put
initrd-magisk.img
into Android-x86 directory. Search for kernel cmdlineinitrd /$SOURCE_NAME/initrd.img
in GRUB custom code and change it toinitrd /$SOURCE_NAME/initrd-magisk.img
-
Put
boot-magisk.img
into 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-magisk
will create new boot image. -
Remove initrd-magisk
- If you have
rusty-magisk
installed,initrd-magisk
will 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.img
so you might need to do again.
- Method 1
- Boot Android-x86 project with
initrd-magisk
andDEBUG=1
flag. If you have GearLock, you can boot into Recovery Mode and openVirtual Terminal Command
. - When root shell is showed up, type
unsu
command and press Enter to remove root. - Type
freboot
to 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.