Rooting gives approved apps administrator-level access to Android. The Magisk workflow is to unlock a supported bootloader, patch the stock image for your exact device and firmware, then install that image by the method documented for your model. Start with a backup and a recovery plan. Unlocking normally erases the phone, and a mismatched image can prevent it from booting.

Check whether your phone can be rooted this way

Write down the exact model, regional or carrier variant, and Android build number. Check the manufacturer’s unlock instructions and confirm you can obtain the matching stock firmware. Some variants cannot be officially unlocked. If you cannot confirm unlock support or get the correct factory image, stop before changing anything. Google documents the expected behavior of Android bootloader unlocking and publishes factory images for supported Pixel devices.

Check what you would lose on your daily phone. Back up photos and local files, make sure you can sign in again without a code stored only on the phone, and test access to your recovery information. Banking, payment, and work apps can reject rooted or unlocked devices. A spare device is a better first attempt if you depend on those apps.

Prepare and patch the stock image

  1. Download the manufacturer’s official firmware for the installed build and save an untouched copy. Get Android Platform Tools and the official Magisk release.
  2. Follow the manufacturer’s unlock procedure. On compatible Fastboot devices the confirmation step typically wipes user data. Verify that the phone boots and that you can connect to it again.
  3. Use the Magisk installation guide to identify whether your device needs boot.img, init_boot.img, recovery, or a vendor-specific package. Samsung procedures can differ from the usual Fastboot workflow.
  4. Patch the correct stock image in Magisk on the phone you are rooting. Copy the patched output to the computer. Avoid prepatched images, including ones shared by someone with a similar model.
  5. Follow the documented installation method for your model and partition. Check the destination before writing. Once Android starts, open Magisk to confirm the installation and review every root prompt before granting access.

If the phone gets stuck after flashing

Use the documented recovery method and the exact stock firmware you saved. Avoid trying random images or relocking the bootloader while a patched or incompatible image is installed. Before taking an Android update, check the Magisk instructions for your device and update method. An update may replace the patched image.

Do I need root to install an APK?

No. Android supports installing authorized APKs without root. If you only want to install an app outside Google Play, follow the Android installation guide instead.