Patching a boot.img with Magisk is the most common way to root an Android device. Here’s a step-by-step guide:
🔧 What You Need
- Magisk APK (latest version from GitHub).
- Your phone’s boot.img (extracted from your stock ROM or firmware).
- A PC with ADB & Fastboot installed (optional but recommended).
- USB cable.
📌 Steps to Patch boot.img
1. Prepare the boot image
- Extract the stock ROM/firmware you downloaded for your device.
- Locate the
boot.imgfile.
2. Install Magisk
- Rename
Magisk-vXX.X.apk→Magisk-vXX.X.apk(don’t unzip). - Install it on your phone like a normal APK (enable “Install from Unknown Sources”).
3. Copy boot.img to your phone
- Move the
boot.imgfile to your device’s internal storage (e.g.,Downloadsfolder).
4. Patch boot.img with Magisk
- Open Magisk App.
- Tap Install → Select and Patch a File.
- Browse and select your
boot.img. - Magisk will generate a patched file named something like:
magisk_patched-XXXX.imgIt will be saved inDownloadfolder by default.
5. Copy patched image back to PC
- Transfer
magisk_patched-XXXX.imgfrom your phone to your PC.
6. Flash patched boot image
- Reboot your phone into Fastboot/Bootloader mode.
- Connect to PC and run:
fastboot flash boot magisk_patched-XXXX.img - Once done, reboot:
fastboot reboot
✅ After Reboot
- Open Magisk App → it should show that Magisk is installed.
- You now have root access.
⚠️ Important Notes:
- Always use the stock boot.img from your exact firmware version. Wrong version = bootloop.
- Some devices with A/B partitions may require flashing to the correct slot.
- For Samsung devices, the process is slightly different (uses AP.tar instead of boot.img).









Leave a Reply