Magisk - Installation and troubleshooting






Installation


Where to start

It’s always a good idea to read through, at least, the release thread for information about what Magisk is and how to install it. Other useful information can be found in the official Magisk Documentation over on GitHub and the support thread.

Known issues

There may be issues with certain devices, ROMs and/or apps and Magisk. Check the release thread for information about currently known issues.

Things to keep on your device

There are a couple of things that are good to keep on your device, making it easier to recover from any problems that might arise.


Installation

Installing Magisk is usually quite straightforward. Follow the installation instructions in the official Magisk Documentation. After that you can install Magisk Modules through the Manager or via a custom recovery (e.g. TWRP).

Note! On A/B devices it might be a good idea to not install TWRP, but only boot it through fastboot:
fastboot boot twrp.img

Actually installing TWRP may lead to issues booting the device if you also install Magisk, since the recovery resides in the boot image.







Installation Issues


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

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 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 (that you'll find in the Downloads directory on your internal storage) to your device, either in recovery or through fastboot/download mode, Odin or similar

Most of the time you can find the stock boot 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 image for your device, ask for help in your device's forum.

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 (compressed) that you can use.

Invalid image: not signed

If you see a messag 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.

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

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

Additional setup failed

If you get a message when opening the Magisk Managerm after installing or updating Magisk, that additional setup is required and that it fails, try uninstalling the Magisk Manager and install it again manually.







Uninstall


How to uninstall

If you somehow need to uninstall Magisk you have two options:
Magisk Manager
When booted to Android you can use the Magisk Manager to uninstall. Press Uninstall - Complete Uninstall. The Manager will download and run the uninstall script, uninstall itself, and then reboot. The stock boot image will be restored and all Magisk related files will be removed from your device. Be careful when using this option. As an example: if you have used Magisk to disable forced encryption and decrypted your device, that will now be enabled again and your device will encrypt when rebooting.

Recovery
When booted to a custom recovery, you can use the uninstall zip to uninstall Magisk. It uses the same uninstall script as mentioned above.

If experiencing issues, take a look at Uninstall Issues.

Note that with an update to Magisk, the Uninstall zip may also have been updated. Always keep the latest version on your device.







Uninstall Issues


Bootloop after uninstalling

Experiencing a bootloop after uninstalling Magisk, either through the Manager or with the uninstall zip, might mean that the boot image hasn't been restored correctly or that dm-verity otherwise triggers.

Try one of the following:

Uninstall zip doesn't work

If the uninstall zip doesn't work (reports an error, TWRP can't mount/decrypt /data, etc), first try rebooting TWRP. If that doesn't fix things, try booting back into Android and use the Manager to uninstall. If you can't boot, try enabling Core Only Mode (in case it's a Magisk module causing issues), see Disable all modules under Module causing issues.

It's also possible that a previous version of the uninstaller zip works, if the current one doesn't. You'll find earlier releases on GitHub.

Lastly, if nothing else works, restore a stock boot image for your device/ROM and see if the device boots (you might have to dirty flash your ROM). If the device boots, try installing Magisk again. The boot image backup might have been corrupted/be incompatible with the current uninstaller. After this you might be able to use the uninstaller to remove all traces of Magisk.







Updating

If there's an update to Magisk, you'll get a notification from the Magisk Manager (if you haven't turned it off, that is). You can update through the Manager or download the Magisk zip from the release thread or in the Manager, and flash in recovery. Make sure to read the release notes and the changelog, both can be found in the release thread. Any modules you have installed may have to be updated to conform with possible changes to Magisk.

Updating issues

If you're having problems updating to a newer version, start by disabling your modules, in case one or more of them are causing issues. This is easiest done by enabling Core Only Mode (see Disable all modules under Module causing issues). You can also try to uninstall Magisk and start over with a clean installation of the new Magisk version.

MagiskHide or SafetyNet fails after an update

If MagiskHide or SafetyNet starts failing after an update to either Magisk, the Manager or both it's usually fixed by toggling MagiskHide off and on (also see ”Test MagiskHide”).

Updating from v18.0 to v18.1+

When updating Magisk from v18.0 to v18.1+ there might be issues related to the Magisk Manager. Manager v6.1.0(165) that is bundled with Magisk v18.0 has a bug that manifests when updating to a newer Manager while it is hidden/repackaged. You will end up with two Managers installed (but not necessarily, keep reading), the old hidden one and the new updated one that won't have a working connection with the Magisk infrastructure. It'll simply state that Magisk isn't installed. And, you'll keep getting a notification about an update from the old Manager.

The new, unhidden Manager will likely eventually be uninstalled automatically by the old, repackaged one, since the new one isn't actually recognised as the real Manager. But, it is also a possibility that the new Manager can't be installed at all, in which case you might have to do some manual work to get things working. Take a look under "Can't install the Magisk Manager" for details.

The solution is to restore the Manager to its original package name before updating. Or if you've already updated you can just uninstall both Managers and install the latest version manually (you'll find it for download on GitHub).







Magisk Issues


Bootloop

If you end up in a bootloop when installing Magisk, flash the Magisk uninstaller zip in recovery (you migth also have to flash a clean boot image, which will help if there's something wrong with the boot image on your device) and start over (for bootloops occurring after installing a Magisk module, see "Module causing issues"). If the uninstaller fails, just flash your unmodified copy of the boot image and you should be good to go. There’ll probably be some leftover files and folders from Magisk laying around in /cache and /data/adb, but these can be removed manually.


It is also possible that the device is refusing to boot because you've added system apps or processes to the MagiskHide list. That's not a good idea... Only add the apps detecting root to the Hide list. Also see "System instabilities" below.

A/B devices (Pixel, etc)
Many users are reporting about bootloops on Pixel and other A/B devices. Often this is caused by having TWRP installed at the same time as installing Magisk. Since the recovery now resides in the boot image, having these two modifications to the same partition may cause issues. If you want to use TWRP, use fastboot to only boot it, don't install:
fastboot boot twrp.img


Custom kernel
If your system bootloops again and you're using a custom kernel, try starting over without installing that kernel. If there's still a bootloop your system might just not be compatible. One possibility is to try finding another custom kernel that is compatible.

Magisk update
If there’s just been a new Magisk release it’s also possible that there might be something with Magisk causing the issue. Just keep calm, restore your device like described above (also see Updating), but first make sure to provide proper logs (see "Asking for help/reporting bugs").

DM-verity and Forced encryption
Another thing to try if your device ends up in a bootloop when flashing Magisk, is to keep dm-verity and force encrypt enabled. By default Magisk might remove these flags from your boot image which on some setups have been reported to cause a bootloop. Keeping these flags is done by running the two following commands in your recovery's terminal before flashing the Magisk zip (or, if you're upgrading from a working version of Magisk, by checking the two options in the Magisk Manager before installing):
echo KEEPVERITY=true>>/data/.magisk
echo KEEPFORCEENCRYPT=true>>/data/.magisk


Module issues
A bootloop might also be because you’ve installed a module that Magic Mounts new files or folders to the root of /system. On some devices this will cause a bootloop. Contact the creator of the module you’re trying to install and let them know… Also see "Module Issues".

Special cases
Some devices need special modifications to the boot image to not bootloop with Magisk. Sony is one of these manufacturers, where you may need to disable RIC.

Magisk not installed

After installing Magisk, if the Manager still reports that Magisk is not installed, check if the Manager has been installed to the external or adoptable storage. This is known to cause all kinds of issues, so make sure that the Manager is installed to the internal storage and check again.

This might also be happen when the Magisk Manager update doesn't go as planned and you end up with two Managers installed. Something that might lead to issues... See "There are two Managers" for further details.

System instabilities

If your system suddenly becomes unstable, with reboots and system processes stopping, make sure you haven't added any system apps or processes to the MagiskHide list. Because of the way MagiskHide works, it will kill off some pretty important parts of the running system if this kind of apps/processes are on the list, causing all kinds of havok.

Only add the apps and processes that actually detect root to the MagiskHide list.

Apps are force closing


Apps on the MagiskHide list
If apps on the MagiskHide list are force closing, simply remove them from the list. You should only add the apps and processes that actually detect root. Adding anything else to the list, that doesn't need to be there, may cause instabilities in your system (also see "System instabilities" above) Note: It's not about the number of apps on the list, but which apps are added.

WebView issues
If a bunch of apps suddenly start force closing after installing Magisk, your ROM might have issues with WebView. More precisely with the signatures for Chrome and Google WebView. You can take a logcat when one of the apps crash and see if there's anything about WebView in there. The reason is that MagiskHide sets ro.build.type to "user" and this enables the signature check. Ask your ROM developer to fix the signature error... Meanwhile, you can fix it temporarily by disabling MagiskHide, use the Magisk module MagiskHide Props Config to revert the prop value, or use a boot script to revert the MagiskHide prop change (see "Reverting prop values set by MagiskHide").

It's also possible that removing and reinstalling Chrome stable or Google WebView (or simply installing one of them if it's not already installed) will fix the issue. If nothing else, installing Chrome Beta should work. After that you can go to Developer options -> WebView implementation and select the corresponding implementation.

It might also be possible to use Chromium. There are several Chromium installers available both in the Play Store and on F-Droid.

Other
If it's not an issue with MagiskHide or WebView, grab a logcat from the crash and post it together with lots of details in the support thread (also see "Asking for help/reporting bugs").

Developer options disappeared from settings

If Developer options suddenly disappeared from settings after installing Magisk, it's probably because MagiskHide changes ro.build.type from "userdebug" to "user" (known "safe" prop value). On some devices/ROMs this prop need to be set to "userdebug" to show the Developer options.

You can use the Magisk module MagiskHide Props Config to revert the prop value, use a boot script to revert the MagiskHide prop change, or temporarily disable MagiskHide (also see "Reverting prop values set by MagiskHide")

Or, there's a much better solution... You can ask your ROM developer to add this commit.

Wifi stopped working

If your Wifi stops working after installing Magisk, try reflashing your kernel.

Magisk isn't working

If you can boot up, but Magisk isn't working as expected (not detecting the Magisk installation, loss of root, etc), there are a few things you can try.

  1. Reboot. Sometimes this helps Magisk mount everything as it should.
  2. Try removing any installed modules to see if it's a faulty module causing issues. If that seems to fix it, install the modules one at a time to find which one causes issues.
  3. If nothing else works, try starting fresh with a new installation.
  4. If you still can't get things working, check here: "Asking for help/reporting bugs".








Magisk Manager Issues


Can't install the Magisk Manager

If the Magisk Manager doesn't get installed when you flash the Magisk zip, or that you're trying to install the apk manually and it doesn't work, you might first have to remove remnants of an old installation. This can be done through ADB. Start by uninstalling any currently installed Manager (especially if it's repackaged with a random package name) and then just run the following command from ADB Shell and you should be good to go:
adb uninstall com.topjohnwu.magisk


Clearing cache and data

If there are issues with the Magisk Manager, it's often a good idea to clear data for the app. All your granted superuser requests and apps added to the MagiskHide list will still be intact (since they're saved elsewhere).

Menus and buttons are missing

If there are a bunch of menus and buttons missing in the Manager (Install, SafteyNet check, Download, etc), and the main Manager window is only showing the currently installed version and the Uninstall button, you'll have to enable data or Wi-Fi and make sure that nothing is blocking data for the Manager. It needs internet access for these features to function.

Magisk Manager crashes/freezes

If you're having issues with the Magisk Manager force closing/crashing/freezing at any point, clear data for the Manager or uninstall it and install it again.

Theming
The Manager crashing might also be caused by using a theme engine to theme the Manager (Substratum, etc). Disable it and reapply after an update to the Manager.

Magisk Manager installed to external/adoptable storage
Installing the Magisk Manager to an external or adoptable storage is known to cause issues. Reinstall it to the internal storage.

Magisk Manager as a system app
Another reported reason for the Manager crashing is if you've for some reason added the Magisk Manager as a system app. If this is the case try de-systemising to see if that fixes the issue.

Trying to install modules in the Modules tab
If the Manager crashes when pressing the "+" button in the Modules tab, it's likely caused by your ROM not having a file explorer installed. Install one from F-Droid or the Play Store.

Cant' fix
If there still are issues, capture a logcat from the crash/freeze and post it in the support thread or as an issue on GitHub (just make sure to do it properly), with a detailed description of the problem (also see "Asking for help/reporting bugs").

There are two Magisk Managers

If there suddenly are two Magisk Managers in your app drawer, this might be caused by somehow installing a new Manager while having the old one repackaged (hidden) with a random package name. It can happen when updating Magisk, it happens if you install the Manager apk manually, or if you use the uninstaller zip in recovery while having a repackaged Manager installed, and then flashing a new Magisk zip. The uninstaller zip cannot uninstall the repackaged Manager (since it doesn't know the random package name), and you'll have to uninstall the old Manager manually. Or something else... If the duplicate Manager doesn't disappear after you open the one named just "Manager", best thing is probably just to uninstall both and install the Manager again (apk can be found on GitHub or in the Magisk zip's common folder). Aldo see "Can't hide the Magisk Manager" below.

Can't hide the Magisk Manager

It's also possible that you'll get two Managers installed when trying to hide (repackage) the Manager. If you have made the Manager a system app, or the ROM you're using has the Manager pre-installed as a system app, the repackaging feature can't uninstall the old Manager (because it's a system app) after having installed the new one with a random package name (the Manager might get stuck on "Hiding it now"). Remove the Manager from /system/app or /system/priv-app (depending on where you or the ROM creator have placed it). If the app comes pre-installed as a system app, please let your ROM creator know that it's a bad idea to include the Manager like this.

If your ROM doesn't come with the Magisk Manager installed as a system app, or you haven't made the Manager into a system app, or if the Manager can't be hidden/repackaged at all, please provide details and logs (see "Asking for help/reporting bugs").

Can't restore the Magisk Manager

If you can't restore the Magisk Manager, either that it gives an error or nothing happens at all, the easiest way is to simply uninstall the hidden/repackaged Manager and install the apk manually. The latest stable Manager apk can always be found on GitHub.

It might be necessary to remove any remnants of old installs through ADB before the Manager can install again (see "Can't instll the Magisk Manager" above).

Updating from Manager v6.1.0 to v7.0.0+ (Magisk v18.0 to v18.1+)

There's a bug in Manager v6.1.0 that will cause the update to a newer version to fail if you have Manager v6.1.0 hidden/repackaged. Before updating the Manager (or Magisk if updating by flashing the zip in recovery), restore the Manager to its original package name and things should work fine. See "Updating from v18.0 to v18.1+" for more details.







Module Issues


There are no modules

If the list of modules under "Downloads" is empty, clear the repo cache (in the Manager settings) and/or reload the modules list (pull down).

Modules are installed, but don't load

Make sure you haven't enabled "Magisk Core Only Mode" in the Manager settings. This option disables all modules and only keeps the core functions of Magisk active (MagiskSU and MagiskHide). If you do not have "Magisk Core Only Mode" enabled, there's likely something wrong with your Magisk installation and you need to figure out what. Post details and logs in the support thread (also see "Asking for help/reporting bugs").

Can't install modules

If there's an error installing a module, there's a couple of things to try.

Outdated template
It might be that you're trying to flash a module with an outdated module template. Usually Magisk supports one version backwards of the current module template. Most of the times you can tell that this is the issue by the error message telling you to install an older version of Magisk than the version you have installed. In other words, the module needs an update.

Zip is not a Magisk module
If the error states that it's not a Magisk zip, or invalid zip in TWRP, the zip is not packaged correctly. Open up the zip and you'll likely see a folder (probably named something like <nameofmodule>-master or similar, or something completely different). Take all the contents of that folder and repack it to the root of the zip and try flashing it again.

Magisk Manager storage permission
If the Manager does not have storage permissions there will be issues with module installation. It should automatically ask for permission when needed, but if this doesn’t work, give the permission manually.

Process error
If there's a "process error" when installing a module it is usually caused by the Manager not having storage permission (see above). It might also be fixed by clearing data for the Manager.

Corrupt zip
Also make sure that there’s nothing wrong with the zip file (corrupt, etc). Try downloading the zip again.

Magisk image not mounted properly
Sometimes the Magisk image is mounted read-only (run the command “mount | grep “/sbin/.magisk/img” in terminal to see if it’s rw or ro. This can cause issues with installing modules. A different kernel is one possible solution.

It can also be caused by your device having a faulty f2fs implementation (also see "Issues with f2fs" below), or that the Magisk image is corrupt. Easiest way to fix this the last scenario is to run the Magisk uninstaller and start from the beginning.

merge.img failed
If there's an error when installing a module along the lines of "mounting merge.img failed" your device might have issues with the file system, possibly a known f2fs bug (see below).

Issues with f2fs
There are some devices that have a faulty implementation of the f2fs file system. These may include Motorola, Lenovo and others. These devices can’t mount the Magisk image properly leading to issues with module installation and possibly superuser access. You might see something like this in the module installation log or the Magisk log:
mount /dev/block/loop->/sbin/.magisk/img failed with 13: Permission denied


Finding a kernel with the f2fs bug fixed is one solution and if possible probably the best one. Formating your /data partition as ext4 is another, but some devices won’t be able to boot if /data isn’t formated with f2fs. There’s also the F2FS Loopback Bug Workaround module by VR25 that you can try. It moves the Magisk image to the /cache partition instead of /data and may solve issues like this (won't work if /cache is f2fs).

If you see the above error but don't have /data formatted to f2fs, there might be something wrong with how the Magisk image is mounted (see "Magisk image not mounted properly" above).

Unable to extract zip
If you keep getting an error stating “Unable to extract zip” when installing modules you might have to to a complete reinstallation of Magisk.

Logs, etc
If the error occurs when installing a module through the Downloads section of the Magisk Manager, save an install log by clicking on the “Save log” button after the install script has run. If the error just states something along the lines "error when installing", try flashing the zip through recovery instead. If this also fails, save the recovery log and post in the support thread together with your Manager install log (also see "Asking for help/reporting bugs").

Module will be updated at next reboot

If you install a module and after reboot it doesn’t work or it works but there’s a message in the Magisk Manager modules section that states “module will be updated at next reboot”, try this:

If the module works, just navigate to the module folder under /sbin/.magisk/img and delete the “update” file. If it keeps happening when installing modules post the installation logs, Magisk log and possibly a logcat from the installation in the support thread (also see "Asking for help/reporting bugs").

If the module doesn’t work and hasn’t installed properly. Navigate to /sbin/.magisk/img, delete the module folder and try again. If it still doesn’t work post the installation logs, magisk_debug.log and possibly a logcat from the installation in the support thread (also see "Asking for help/reporting bugs").

Module causing issues (Magisk functionality, bootloop, loss of root, etc)

If you have a working Magisk installation, but a module causes Magisk, the Magisk Manager or your device to not function properly (bootloop, loss of root, etc), here's a couple of tips:

No custom recovery
First of all, if you do not have a custom recovery installed on your device, it might be good idea to have one handy so you can at least boot it. When rooting, a custom recovery often makes life so much easier. If you do have a custom recovery, you can skip this part and keep reading below.

If your device do not have a functioning custom recovery available, you might not have many options. The only way out of an issue that causes the device not to boot is to alter the Magisk image in some way (see more below). For this you need to access /data/adb, something that you need root access to do. Without a custom recovery, that's likely not going to happen... The only viable option in this case is to reset your device and wipe /data so that the Magisk image in /data/adb is removed. After that you can again set everything up to your liking and install Magisk again. Pro tip: always keep a backup of any important data, especially rooting and modifying your device.

Uninstall/delete/disable modules from recovery
This is my prefered method, manually removing the troublesome module through a custom recovery. Boot to recovery and flash the SUmount script. This mounts the Magisk image to /magisk and it can be accessed as any other directory. You now have a couple of options to remove the module:


If you create the "remove" or "disable" files, Magisk will take care of removing or disabling the module on the next reboot.

You can also keep a copy of the corresponding disable or remove files on your device and copy them to the module folder as needed.

Another option is to use the Magisk Module Uninstaller, by veez21, from the Collection of Magisk modules v2 or the Magisk Manager for Recovery Mode by VR25.

If you get an error in recovery when flashing SUmount script it might mean your Magisk image has become corrupted. Check the recovery log for details. Easiest way to fix this is to run the Magisk uninstaller and start from the beginning. It might also be possible to use fsck in terminal in recovery or through ADB. Google it (and check the recovery log for details).

Disable all modules
You can also disable all Magisk modules by enabling "Magisk Core Only Mode" in Manager settings. This keeps only the core functions of Magisk active (MagiskSU and MagiskHide). If you can't boot your device, this can be done by placing a file in /cache (/data/cache on A/B devices) named ".disable_magisk" (without quotation marks and with the leading dot). This will enable Core Only Mode and you can boot up your device, uninstall the troublesome module and then go into the Manager settings, disable Core Only Mode and reboot. In TWRP you can create the file through the TWRP terminal with the touch command, see below for an example.

The drawback to the this method is that it will disable all your Magisk modules, not just the one causing issues. If you don't want to do this, you can use the following method to uninstall only the troublesome module.

Delete the Magisk image
If nothing else works, deleting the Magisk image (/data/adb/magisk.img) should. If you do not have proper access to /data, this can also be done by wiping the /data partition which in turn means that you'd better have a backup of anything important...

Installing/disabling/uninstalling modules through the Manager or recovery

If you’re experiencing problems with installing, disabling or uninstalling a module through the Manager, simply try it through recovery instead. For disabling or uninstalling a module through recovery, see the described methods above under “Module causing issues”.







Root issues


<insert app name here> can’t detect root

Some apps may have troubles detecting root when using Magisk. Usually this means the app in question is looking for root in a specific location and needs to be updated to work with MagiskSU or otherwise can’t detect MagiskSU. Contact the developer.

You can try symlinking the su binary to the location where the troublesome app is looking for it. You'll need to mount /system rw to be able to create the symlink. This will alter your system partition and you will not be able to update through an OTA afterwards. If you need to keep /system intact and untouched, don't use this method.

Here’s an example on how to do this in terminal:
ln -s /sbin/su /system/xbin/su

Please note that doing this might have the effect of MagiskHide not being able to hide root. A workaround for this would be to make a Magisk module that places the symlink in the appropriate location (which would be a systemless modification).

Tasker and MagiskSU

Any version before Tasker v5.0 will have issues detecting MagiskSU. If you by any chance feel that you cannot update to v5+, you can use this Magisk module to enable Tasker root support. Reportedly, Secure Settings will also function with MagiskSU thanks to this module.

Another way is to use “Run Shell” in Tasker and use shell commands to do what you want, prefaced by “su -c”. Example (copy a boot script to service.d):
su -c cp /sdcard/testscript.sh /data/adb/service.d/testscript.sh


If the command doesn’t work, try putting quotation marks around the command, like so:
su -c "cp /sdcard/testscript.sh /data/adb/service.d/testscript.sh”


Magisk root detection has been fixed in Tasker v5.2. Previous to this version, there were issues with root detection if the Manager was hidden, but that should now be fixed. If you're still having issues with root and tasker, try the “su -c” workaround mentioned above.

Randomly losing root

Some devices seem to have issues with memory management where the Magisk Manager will not be kept in memory and as a result root management is lost. This can sometimes be fixed by clearing the Manager from memory (swipe it away from recent apps list) and opening it again. Make sure the Manager is removed from any battery optimisation.

If you can't find any way to get around this issue, try to capture a logcat of it actually happening (also see "Asking for help/reporting bugs") and post that together with a detail description in the general support thread. This is a recurring issue for some users and so far there have been very few useful logs provided.







Other things to try


Starting fresh

If you've been trying a lot of things and can't get Magisk to work properly it can be a good idea to start fresh. Start by uninstalling Magisk, flashing a clean boot image and installing Magisk again. If that doesn't work you could try wiping your device and starting out completely clean.

Older versions of Magisk

It is possible that an older version of Magisk may work if the latest does not. This is a last resort and should be considered unsupported. If the latest version of Magisk doesn’t work, but an earlier version does, please help fixing the issue by reporting it with all the necessary details (also see "Asking for help/reporting bugs").

Installation files for earlier releases of Magisk can be found on GitHub. If you need other versions, not available for download, the source code for these can be found in the same place, along with instructions on how to build Magisk.

Please note that there’s no guarantee that an older version of Magisk will work with the current Magisk Manager. Compatible apk's can be found inside the Magisk zip and all Manager releases can be found on GitHub.

Nothing works!

If nothing works and you just can't get Magisk to install/function properly on your device, check the troubleshooting section in the release thread for instructions on how to help topjohnwu fix any compatibility issues with your device. The best thing you can do if Magisk isn't compatible with your device is to provide as much details as possible and upload logs (recovery log, Magisk log, logcat, whatever is applicable) and a copy of your boot image in the release thread (also see "Asking for help/reporting bugs").

Snapshot releases

It's also possible that whatever problem you're facing has been fixed in code, but not yet released. For this you can use the the Canary bleeding edge build. It is a build by topjohnwu that is based on the latest (working) commits from GitHub. Keep in mind that it is a bleeding edge build and may be quite unstable. Only install of you know what you're doing!

There's also the unofficial beta snapshots (here's a direct link to the unofficial builds by kantjer). It's built directly from source and can sometimes be unusable. Keep an eye on the thread for current issues.







Asking for help/reporting bugs


Asking for help

If you can't fix the problem yourself, start by looking in the support thread where you might find that someone else have had this problem as well. Search for your device and/or problem. If you can't find anything (it's a big thread), search again. If you still can’t find anything, provide as much information as possible (in the support thread). For example:




Reporting a bug

When reporting a bug, make sure you have the latest Canary bleeding edge debug build installed on your device. Otherwise any bug you're reporting may already be fixed upstream. It will also have much more detailed logging enabled (see below).

Logs

Relevant logs include:







Verbose logging
When reporting about issues and bugs, it's useful to have more verbose logging. To get the most information possible, make sure to install the Canary bleeding edge debug build. It has debug logging active and will show much more useful information. The log is then saved just as the normal Magisk log, described above. When reporting about Magisk bugs, it is required to use the Canary bleeding edge debug build and the verbose logging.

The Magisk log is empty

If your Magisk log is empty, it's likely that you have Android logging disabled. Try enabling it.

Could also mean it's fully somehow. Try grabbing a logcat and see what happens (see above).

If you're here because MagiskHide, SafetyNet, Google Pay, etc, isn't working. This is why... Android logging need to be enabled for MagiskHide to work (also see "Requirements").

It might also be that your kernel/ROM wipes the /cache directory during boot, thus removing the log. See here for details.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki