How to Root Your Android Device: Step-by-Step
In this article
Rooting your Android device gives you administrative (superuser) access to the Android operating system, letting you remove bloatware, install custom ROMs, use root-only apps, and tweak system settings that are normally locked. It’s a powerful but risky process—it can void your warranty, break apps like banking or Netflix, and, if done incorrectly, permanently damage your device. Before you start, back up everything important and understand that the exact steps vary by device model and Android version. This guide covers the general process using Magisk, the most widely used rooting tool today.
What You'll Need
- An Android device with an unlocked bootloader (required for most devices).
- A Windows, Mac, or Linux computer with a USB cable.
- ADB and Fastboot tools installed on your computer (download from the official Android developer site).
- Magisk APK (latest version from the official Magisk GitHub releases page).
- The stock boot image for your exact device model and Android version (extract from the official firmware or use a tool like Payload Dumper).
- Backup of your personal data (photos, contacts, etc.)—rooting will likely wipe your device.
Step-by-Step
- Unlock the bootloader. This is mandatory on most devices (some like certain Sony or HTC models have unlockable bootloaders; others like many carrier-locked phones may not allow it). Go to Settings > About Phone and tap “Build Number” 7 times to enable Developer Options. Then go to Settings > Developer Options and enable “OEM unlocking” (if available). Connect your phone to the computer, open a command prompt, and run
adb reboot bootloader. Once in fastboot mode, runfastboot flashing unlock(orfastboot oem unlockon older devices). Confirm on the phone screen. This will wipe all data. Note: labels may differ slightly by version and device. - Extract the stock boot image. Download the official firmware for your device (from the manufacturer’s site or a trusted source like the Android Developer site). Extract the firmware and locate the
boot.imgfile. If your firmware is in apayload.binformat, use a payload extractor tool (search for “payload dumper” on the official Magisk GitHub). - Patch the boot image with Magisk. Transfer the
boot.imgto your phone’s internal storage. Install the Magisk APK on your phone, open the app, and tap “Install” next to “Magisk”. Choose “Select and Patch a File”, navigate to theboot.img, and let Magisk patch it. The patched file will be saved inDownloadorMagiskManagerfolder asmagisk_patched-..img - Flash the patched boot image. Copy the patched image to your computer. Reboot your phone into fastboot mode again (
adb reboot bootloader). Runfastboot flash boot magisk_patched-. Then run.img fastboot reboot. - Verify root access. After reboot, open the Magisk app. You should see “Installed” with the Magisk version. To confirm root works, install a root checker app from the Play Store (like “Root Checker”) and run it. It should show “Root access is properly installed”.
Common Mistakes
- Skipping the bootloader unlock. Without it, flashing fails or bricks the device.
- Using the wrong boot image. A boot image from a different Android version or model can cause boot loops.
- Not backing up before unlocking. Unlocking wipes all data—if you forgot, you lose everything.
- Ignoring battery level. If the phone dies during flashing, it can brick. Keep charge above 70%.
- Using a “one-click root” tool from unknown sources. These often contain malware or fail. Stick to official methods.
Tips
- After rooting, install Magisk’s “SafetyNet Fix” module (from the Magisk app’s module repository) to help pass Google’s SafetyNet check for apps like banking.
- Use root-only apps from the Play Store or trusted sources like the Magisk module repository—avoid random APKs.
- Keep Magisk updated to the latest version; the app will notify you when a new version is available.
- If you ever need to unroot, you can flash the original stock boot image back (the one you extracted in step 2) using the same fastboot command.
Troubleshooting
- Boot loop after flashing. This usually means the patched boot image is incompatible. Re-download the exact stock firmware and re-patch. If you can’t boot, reboot to fastboot and flash the original stock boot image to restore.
- Magisk app says “Not installed”. The patched image didn’t flash correctly. Reboot to fastboot and flash again, ensuring you use the correct path.
- Root checker says no root. Open Magisk app—if it shows “Requires Additional Setup”, tap “OK” and let it reboot. If that doesn’t help, re-patch and flash again.
- Device stuck on “Fastboot” screen. Hold the power button for 10 seconds to force reboot. If that fails, run
fastboot rebootfrom the computer. - SafetyNet fails. Some devices need the “MagiskHide” feature (now called “DenyList” in newer Magisk). Enable it in Magisk settings and add the apps that fail.
Frequently Asked Questions
Will rooting void my warranty?
Yes, on most devices rooting voids the manufacturer’s warranty. Some devices can be unrooted and relocked, but that’s not guaranteed to restore warranty.
Can I still use banking apps after rooting?
Many banking apps detect root and refuse to run. You can try using Magisk’s DenyList to hide root from those apps, but it’s not always successful.
Is rooting the same as jailbreaking?
No. Rooting is for Android, jailbreaking is for iOS. Both give admin-level access, but they work differently.
Do I need to root to install a custom ROM?
No, but you usually need an unlocked bootloader and a custom recovery (like TWRP). Root is not required for most ROMs.
Can I unroot later?
Yes. Flash the original stock boot image (unpatched) back using fastboot. That removes root. You can also relock the bootloader if you wish, but that may wipe data again.
What if my device has a locked bootloader that can’t be unlocked?
Some carriers or manufacturers lock bootloaders permanently. In that case, rooting is not possible through this method. Do not attempt to bypass the lock—it’s risky and may violate terms.