Is your Android device bootlooping after installing a Magisk Module? If so, then uninstalling/deleting the specific module or all modules can help you fix it. In this post, we will show you how to uninstall Magisk Modules in TWRP Recovery using two different methods. You can either use the Terminal in TWRP to manually remove the modules. Or, you can use ‘Magisk Manager for Recovery Mode’ to automate the process.
Magisk is an all-powerful customization solution for Android that allows modifying the software without altering the /system partition. You can use it to install Magisk Modules, to gain extra features and functionality for a more tailored experience. But some times, a combination of various modules could lead your Android device to a bootloop. This could be caused because of incompatibility issues between two, or some times even more than two modules.
To fix bootloops caused by Magisk Module(s), you’d need to remove the problem-causing module or maybe even all the modules. But since your phone cannot enter the system (OS), you cannot use Magisk Manager. So how would you do it if your Android device is currently in a bootloop? The answer is quite simple actually. You can uninstall Magisk Modules in TWRP Recovery itself without erasing/wiping any data on the phone.
Note: If you’ve rooted your phone using the Magisk patched boot image and don’t want to install TWRP, then you can simply boot your device into TWRP temporarily, using the “fastboot boot twrp.img” command. Once the modules are removed done, a simple reboot will get rid of TWRP.
How to Uninstall Magisk Modules in TWRP Recovery
Now, there are two different methods to uninstall/remove Magisk Modules from within TWRP recovery. The instructions for both methods are as follows.
Note: In the majority of cases, the most recently installed module could be the cause of the bootloop. However, if deleting that individual module still doesn’t fix the problem, you can try deleting other/all installed modules as well.
Method 1: Using Magisk Manager for Recovery Mode
This method uses the ‘Magisk Manager for Recovery Mode‘ mod by XDA member VR25. His mod uses the in-built Terminal in TWRP to manage the installed Magisk Modules on your phone. You can use it to disable or completely remove the module(s) that are causing the bootloop.
- Boot your Android device into TWRP recovery first.
- Go to the ‘Mount’ menu in TWRP and select ‘Enable MTP’.
- Connect your phone to the PC using the USB cable.
- Now, download the latest ‘Magisk Manager for Recovery Mode’ mod zip file from this link.
- Copy the downloaded file (‘mm-201904040.zip’) to the phone’s storage.
- Once the file has been copied successfully, disconnect the phone from the PC.
- Go to the TWRP main screen and tap on ‘Install’.
- Select the mod zip file and swipe the button on the screen to install it.
- Once the mod has been successfully installed, go to the ‘Advanced’ menu in TWRP.
- Select ‘Terminal’ to launch TWRP’s in-built Terminal.
- Enter the following command to launch the Magisk Manager interactive shell:
- Enter “r” to list all the install modules for removal.
- You will need to mark the installed modules that you want to remove. To mark a module, simply enter it’s exact name as shown in the list.
- Once you have marked the module(s) that you want to uninstall, enter “q” to quit the shell.
- Now go to ‘TWRP’ > ‘Reboot’ and tap ‘System’ to boot your phone.
Upon rebooting, the marked module(s) should be completely removed from the system and your phone should boot normally into the system (OS).
Method 2: Manually using File Manager
This method follows the manual approach. Which is, you will need to access the directory where the modules are installed and then delete the folder(s) of the installed Magisk Module(s).
- To uninstall Magisk Modules, boot your phone into TWRP recovery first.
- Go to the ‘Advanced’ menu in TWRP.
- Select ‘File Manager’ to launch the in-built file manager.
- Navigate to ‘/data/adb/modules’ directory where the installed modules are present.
- You shall see folders by names of the modules installed on your phone.
- Open the folder of the Magisk Module that you want to delete and tap on the button at the bottom-right of the screen.
- Select ‘Delete’ from the list of available actions.
- Finally, swipe the button on the screen to confirm the action and delete the Magisk Module from your phone.
Once you have deleted the folder(s) of the Magisk Module(s), they will be uninstalled from your device completely. You can go to the ‘Reboot’ menu in TWRP and tap on the ‘System’ option. Your phone shall successfully boot into the system (OS).
This was our guide on how to uninstall Magisk Modules in TWRP Recovery, to fix bootloops caused by modules. If you have any questions regarding the topic, please feel free to reach out to us via the comments.
Huge thanks to VR25 for the mod!