Revision [181]

This is an old revision of MagiskInstallationIssues made by didgeridoohan on 2018-02-05 15:37:43.

 


Installation Issues


Installation in 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 Manager 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.

Where's my boot image for the Manager to patch

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

If you're unsure on how to go about acquiring the stock boot image for your device, ask for help in your device's forum.

Invalid image not signed

If you see something like this in the install log when flashing a Magisk zip, it simply means that your boot image isn’t signed. It’s perfectly normal and nothing to worry about.
java.lang.ClassCastException: org.bouncycastle.asn1.DERApplicationSpecific cannot be cast to org.bouncycastle.asn1.ASN1Sequence
	at com.topjohnwu.crypto.SignBoot$BootSignature.<init>(Unknown Source)
	at com.topjohnwu.crypto.SignBoot.verifySignature(Unknown Source)
	at com.topjohnwu.magisk.utils.BootSigner.main(Unknown Source)
Invalid image: not signed


Keeping dm-verity and forced encryption

The Manager 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 Manager. The first time you install (or if you just want to update Magisk through the recovery) run one or both of the following commands in a terminal emulator or in your recovery's terminal before installing:
echo KEEPVERITY=true>>/data/.magisk
echo KEEPFORCEENCRYPT=true>>/data/.magisk

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

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.

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.

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.

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).

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).

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.

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).
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki