3-6-12 month Box & Dongle | Activation | Credit | Games | Gift Card | Play-Store Itunes | google Card | Welcome To code-Gsm
How to Root Your Android Device

How to Root Your Android Device

4 min read

How to Root Your Android Device — Complete Multi-Brand Guide

Rooting gives you superuser (administrator) access to your Android device's OS — allowing you to remove bloatware, install custom ROMs, use advanced backup tools, tweak performance, and run apps that require elevated permissions. This guide covers all major methods and brands.

⚠️ Important Warnings

  • Warranty voided: Rooting typically voids the manufacturer warranty (Samsung Knox triggers permanently)
  • Brick risk: Incorrect steps can render the device unbootable — follow instructions for your exact model only
  • Banking apps: Google Pay and bank apps may stop working (can be hidden via Magisk)
  • Backup first: Save all data — unlocking the bootloader performs a factory wipe

Prerequisites (All Methods)

  1. Enable Developer Options: Settings → About Phone → tap "Build Number" 7 times
  2. Enable USB Debugging: Settings → Developer Options → USB Debugging → ON
  3. Enable OEM Unlock: Settings → Developer Options → OEM Unlocking → ON
  4. Remove all Google accounts (disable FRP): Settings → Accounts → remove each Google account
  5. Charge to at least 60%
  6. Install USB/ADB drivers on your PC for your specific device

Method 1: Magisk Patching — Universal (Recommended)

Magisk is the standard rooting solution. It patches at the boot image (kernel) level, is systemless, and supports MagiskHide to conceal root from apps.

Part A — Unlock the Bootloader

  1. Install ADB and Fastboot (Android SDK Platform Tools) on your PC
  2. Connect your phone via USB — choose "File Transfer (MTP)" mode
  3. In a command prompt / terminal: adb reboot bootloader
  4. Unlock: fastboot flashing unlock (or fastboot oem unlock on older devices)
  5. Confirm on phone using volume keys + power — THIS WIPES ALL DATA
  6. Reboot: fastboot reboot and complete initial setup again

Part B — Patch the Boot Image

  1. Download the stock firmware for your exact device model and Android build number
  2. Extract boot.img from the firmware ZIP
  3. Transfer boot.img to your phone's internal storage
  4. Install the Magisk APK from GitHub
  5. Open Magisk → tap InstallSelect and Patch a File → choose boot.img
  6. Magisk creates magisk_patched_[hash].img in Downloads
  7. Transfer this file back to your PC

Part C — Flash the Patched Boot

  1. Reboot to bootloader: adb reboot bootloader
  2. Flash: fastboot flash boot magisk_patched_[hash].img
  3. Reboot: fastboot reboot
  4. Open Magisk — confirms root is active

Method 2: Samsung — Odin3 Flash Method

Samsung Galaxy S, A, Note, M series

  1. Download Odin3 (v3.13.1 or v3.14.4 recommended)
  2. Enter Download Mode: power off → hold Volume Down + Volume Up + USB plug-in (varies by model — check for your specific model)
  3. Remove battery warning screen — hold Volume Up
  4. Connect to PC via USB — Odin shows a yellow box with COM port
  5. Click AP in Odin → select your Magisk-patched boot.img or TWRP image
  6. Only check: F. Reset Time + Auto Reboot (uncheck Re-Partition)
  7. Click Start — wait for "PASS!" in green
  8. Device reboots — open Magisk app to confirm root

Samsung-specific note: Knox Warranty Void bit (0x1) trips permanently on bootloader unlock. Disable RMM in Developer Options before flashing.

Method 3: Xiaomi — Mi Unlock Tool

  1. Apply for bootloader unlock at miui.com/unlock — requires a waiting period (72h to 30 days based on Mi Account age)
  2. Download Mi Unlock Tool on your PC
  3. Boot Xiaomi to Fastboot: Power OFF → hold Power + Volume Down
  4. Run Mi Unlock Tool → log in with Mi Account → click Unlock
  5. Bootloader unlocks (data wiped) — then follow Magisk Method 1 above

Method 4: OnePlus

  1. Enable OEM Unlock and USB Debugging in Developer Options
  2. Boot to Fastboot: adb reboot bootloader
  3. Unlock: fastboot oem unlock — confirm on device (data wiped)
  4. Follow Magisk patching method above

Method 5: Motorola

  1. Get your unlock code at Motorola's unlock portal
  2. Boot to Fastboot: power off → hold Power + Volume Down
  3. Run: fastboot oem unlock UNIQUE_CODE (replace with code from Motorola's email)
  4. Confirm on device — then follow Magisk patching

Essential Post-Root Apps

AppPurpose
MagiskRoot manager — grant/deny app root permissions
Titanium BackupFull app + data backup including system apps
AdAwaySystem-wide ad blocking via hosts file
GreenifyForce-hibernate battery-draining background apps
SD MaidDeep system cleaner using root access
Kernel AdiutorCPU/GPU tweaks and kernel settings

Hiding Root from Banking/Payment Apps

  1. Open Magisk → tap the Shield icon (DenyList)
  2. Enable "Enforce DenyList"
  3. Add banking apps and Google Pay to the deny list
  4. Install the Shamiko Magisk module for stronger root hiding
  5. These apps will no longer detect root

Troubleshooting

ProblemSolution
OEM Unlock greyed out / missingSome carriers (Verizon) block OEM Unlock — need carrier unlock first. Or wait 7 days after inserting SIM
Odin shows FAILTry different USB port, disable antivirus, use Odin 3.13.1, restart both Odin and phone
Phone bootloops after rootBoot to recovery → wipe cache/dalvik. If fails, flash stock firmware via Odin/fastboot
Root checker shows "not rooted"Open Magisk app — it may need to complete installation. Reboot and check again
Banking apps brokenAdd to Magisk DenyList + install Shamiko module

Back to Knowledge Base
Categories

Copyrights © 2026 All Rights Reserved Powered By GSM Tool