Rooting and bootloader unlocking can wipe data, break device security features, affect OTA updates, or make a device unbootable if the wrong image or partition is used. Use device-specific documentation and keep original firmware available.
1. Before you begin
The official Magisk installation documentation assumes you already understand adb and fastboot and that the device bootloader can be unlocked. The safest preparation is to identify the exact device and obtain matching stock firmware before changing anything.
- Back up photos, messages, authenticator recovery codes, and any irreplaceable data.
- Write down the exact model, codename, Android version, region/carrier, and build number.
- Confirm that the bootloader is unlockable and understand whether unlocking performs a factory reset.
- Download the correct stock firmware package and know how your manufacturer restores a device.
- Install reliable platform tools on the computer you will use.
2. Check Magisk device information
Install the official Magisk APK and open the app. The device information card reports whether the device has boot ramdisk. That result helps determine which stock image is relevant to the installation path.

Common current workflows use boot.img or init_boot.img. Some devices without boot ramdisk use a recovery-based path. Do not decide from a generic website alone—follow the official and device-specific documentation.
3. Patch your own stock image
Copy the correct stock image from the exact firmware build to your device, then use Magisk’s Select and Patch a File flow. The app creates a patched image in the device’s download storage.
adb pull /sdcard/Download/magisk_patched_[random_strings].imgEven another phone with the same retail model can have different firmware or partition details. Patch the image on the device/firmware combination where it will be used.
4. Flash using the correct device-specific method
On many fastboot-capable devices, the patched file is flashed to the partition that matches the image you patched. Partition naming varies, so do not blindly paste a command from a generic article.
fastboot flash boot /path/to/magisk_patched.img
# or on devices that use init_boot
fastboot flash init_boot /path/to/magisk_patched.imgIf you are unsure which partition your device uses, stop and check the official device documentation or a reputable device-specific source before flashing.
5. Reboot and verify
After a successful boot, open Magisk and verify that the installed status is shown correctly. Test root permissions deliberately rather than granting access to every app that asks. Keep your stock images and recovery method until you know the device is stable.
6. Updating an existing Magisk installation
The official documentation recommends upgrading directly through the Magisk app using Direct Install when that method is available for an already-rooted device. Major Android/firmware updates can require a different sequence, so read the relevant release notes first.
7. Uninstalling Magisk
The supported normal route is the Magisk app’s uninstall flow. If the device does not boot, recovery may require restoring matching stock firmware with the manufacturer’s appropriate tool.
Samsung devices require a separate workflow
Samsung installation commonly patches an AP firmware archive and uses Samsung flashing tools. Bootloader unlocking can trip Knox-related state permanently and initial installation can require a data wipe. Follow the dedicated Samsung section in the official Magisk installation documentation rather than adapting generic fastboot instructions.