Installation Issues


Can't install from the Magisk app
When trying to install/update either the app or Magisk in the Magisk app v8+, some users experience that nothing happens. Usually this is caused by having a custom hosts file, or similar, that is blocking the CDN used by the Magisk app (JSDelivr). The solution is to whitelist that URL.

Installation through recovery fails

If installation through recovery fails, make sure to save the recovery log (see Asking for help) and share that in the support thread together with all and any details you can provide.

If your custom recovery is a bit outdated, this might be the reason why the installation fails. Try letting the Magisk app patch your devices boot image and then flash this to your device, either in recovery or through fastboot/download mode, Odin or similar. See the release thread for instructions.

Cannot mount /vendor

If you get this message, "Cannot mount /vendor", when trying to install Magisk through TWRP it usually means you have a Treble device but the TWRP version you have installed is not Treble compatible. Simply find an updated Treble compatible TWRP for your device.

Where's my boot/recovery image for the Magisk app to patch

When trying to patch the boot or recovery image of your device with the Magisk app, you will first have to get a copy of the stock image, place this on your internal storage where it will be accessible for the app and then select it according to the instructions. After that you can flash the patched image to your device, either in recovery or through fastboot/download mode, Odin or similar

Most of the time you can find the stock boot or recovery image in your factory image/firmware package/ROM. Unzip it and look for the boot.img file. If you're unsure on how to go about acquiring the stock boot/recovery image for your device, ask for help in your device's forum.

On some devices you won't find an image file in the firmware, but a payload.bin file that you need to unpack to get to the boot image. A web search is your friend and this is a great time to practice your Google-Fu, but XDA member ipdev has a good description and example here: https://forum.xda-developers.com/t/magisk-general-support-discussion.3432382/post-84572491
If you want to try doing it on your device you can test something like this: https://forum.xda-developers.com/t/tutorial-android-ota-payload-dumper-on-android.4061799/
If you need tools for other operating systems (or have other reasons why the above examples don't work) they're just a web search away...

Another way, if you have access to TWRP for your device, is that you can make a backup of your boot image in TWRP and then simply rename that backup file to .img.
It is also possible to dump the boot partition directly from the recovery terminal, by entering the following:
dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img

That will save the device boot image to the internal storage, ready for you to patch.

If you for some reason want to install Magisk by patching the boot or recovery image but you already have Magisk installed you might be able to find a copy of the image in /data/magisk_backup_<sha1 checksum>. Before patching, Magisk saves a copy of the untouched image there. Note that it's compressed, so you need to unpack it before flashing to your device.

If you're trying to find a stock boot image because you're moving from SuperSU to Magisk, there might be a backup of the stock boot image in /data that you can use.

Invalid image: not signed

If you see a message in the install log, stating "Invalid image: not signed", that simply means that your boot image isn’t signed. It’s perfectly normal and nothing to worry about.

Working with dm-verity and forced encryption

Since Magisk app v8.0.0 the advanced settings/install options for dm-verity and forced encryption won't be available on most modern devices (see Advanced Settings/Install Options for details). The tools are still there and may be accessed through various means.

Keeping dm-verity and forced encryption
If your device supports it, the app will auto-detect if your device is encrypted and if it’s recommended to keep dm-verity enabled and the “Preserve forced encryption” and “Preserve dm-verity” will then be enabled by default. If these options aren’t enabled, you can keep dm-verity and forced encryption by checking the options for this before installing a new version of Magisk through the app.

If you install through recovery (either for the first time or as an update) run one or both of the following commands in a terminal emulator or in your recovery's terminal before installing:
echo KEEPVERITY=true>>/cache/.magisk
echo KEEPFORCEENCRYPT=true>>/cache/.magisk

If you can't access /data (TWRP can't decrypt, etc) you can instead use either /data/.magisk or/system/.magisk, but please note that using /system/.magisk isn't systemless.

Some devices need to keep dm-verity enabled to work properly. One example is some Huawei devices that might otherwise experience weird behaviour or bootloops.

Disabling dm-verity and forced encryption
If you on the other hand want to disable either dm-verity or forced encryption, you can go about it the same way as described above. If you're using the .magisk file method, just change KEEPVERITY and/or KEEPFORCEENCRYPT in the commands to false:
echo KEEPVERITY=false>>/data/.magisk
echo KEEPFORCEENCRYPT=false>>/data/.magisk

If you can't access /data (TWRP can't decrypt, etc) you can instead use either /cache/.magisk or/system/.magisk, but please note that using /system/.magisk isn't systemless.

If disabling verity through Magisk doesn't help, you can try the following command (provided that your device has a vbmeta.img):
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img


Moving from another systemless root solution to MagiskSU

If you wan't to install Magisk but already have a systemless root solution installed (SuperSU, phh's superuser) you'll have to first remove that.

SuperSU
With SuperSU, most of the times you can simply use the full unroot option in the SuperSU app and let it restore your stock boot image, alternatively use the full unroot option and then flash the stock boot image before installing Magisk. When moving from SuperSU to Magisk, you might have a backup of the stock boot image in /data (compressed).

unSU script
Otherwise, and this applies to any other root solution as well, you an use osm0sis unSU script (in recovery) and then flash your device's/ROM's stock boot image before installing Magisk, or you can dirty flash your ROM.

Prerooted ROM
If your ROM is prerooted it's quite likely that you can still use the boot image from the ROM zip. Many ROMs simply flash a root zip at the end of the ROM installation. If this doesn't work you'll have to check with your ROM developer on how to find an unpatched boot image that work with your ROM. Also see "Boot image patched by other programs" below.

If you're using TWRP you can flash the boot.img file pretty much the same way you would with a zip (Install - Install Image - navigate to the image file - choose "Boot" - swipe).

Dirty flash
Another option is to simply dirty flash your full factory image/firmware package/ROM. As long as it isn't pre-rooted this will remove any traces of root and you can flash Magisk. Depending on your setup/device you have to flash Magisk straight away to prevent dm-verity to trigger, TWRP being replaced by stock recovery, etc.

Boot image patched by other programs

If the installation (or uninstallation) through recovery fails with a message about the boot image being patched by other programs you need to follow the instructions given with the message. You most likely have some other systemless root solution (SuperSU, phh's superuser) or there's something else that have added it's patches to the boot image that will interfere with Magisk and cause the installation/uninstallation to fail. Magisk is not compatible with with any other root solution (SuperSU compatibility was removed in Magisk v13.1). If you're already rooted, first unroot (osm0sis unSU script is good for this). Also see "Moving from another systemless root solution to MagiskSU" above.

You'll have to restore a stock boot image without any other patches before installing/uninstalling Magisk. If you're using TWRP you can simply flash the boot.img file pretty much the same way you would with a zip (Install - Install Image - navigate to the image file - choose "Boot" - swipe).

When moving from SuperSU to Magisk there might be a backup of the stock boot image in /data (compressed) that you can use.

The boot image can usually be found in your device's factory image/firmware file. If you're using a custom ROM it's found in the ROM zip. Also see "Where's my boot image for the Magisk app to patch" above.

If your ROM is prerooted it's quite likely that you can still use the boot image from the ROM zip. Many ROMs simply flash a root zip at the end of the ROM installation. If this doesn't work you'll have to check with your ROM developer on how to find an unpatched boot image that work with your ROM. Also see "Moving from another systemless root solution to MagiskSU" above.

Of course, you can also use a ROM that does not come pre-rooted (IMHO, the preferred way).

If you have a completely stock boot image installed and still get this message, there's likely some kind of incompatibility between your device/ROM and Magisk (see Asking for help for info on what to provide when asking for support).

Process error

If there's a "process error" when installing Magisk it is usually caused by the app not having storage permission. It might also be fixed by clearing data for the app.

Additional setup failed

If you get a message when opening the Magisk app after installing or updating Magisk, that additional setup is required and that it fails, try uninstalling the Magisk app and install it again manually.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki