Readers like you help support XDA Developers. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

Quick Links

If you can't imagine using Android without root access, you've come to the right place. Here, you can find root tutorials for most devices on the XDA forums. Learn how to root any Android device, including the best Android phones! If you don’t see your device listed or you see a misplaced link, send a message to the author (SkandaH on the forums) with the device details.

What is root?

For those new to the world of rooting, acquiring root access essentially grants you elevated permissions. With root access, you can alter or replace system applications and settings, run specialized apps that require administrator-level permissions or perform other operations that are otherwise inaccessible to a normal Android user. And by proxy, you may also be able to access certain "hidden" device features or use existing features in new ways, e.g. via Xposed modules or Magisk modules.

Disclaimer: Rooting a device may void the warranty on the device. It may also make the device unstable or if not done properly, may completely brick the device. XDA or the author does not take any responsibility for your device. Root at your own risk and only if you understand what you are doing!

We can go on about the virtues of root access ad infinitum, but we’ll stop for now because we can sense you're salivating at the prospect of root access and what you can do with your device once root is achieved. Head to the following section to begin the journey. You should find device-specific root guides for the latest flagship models from every major OEM below.

Asus

Sr. No.

Device

Codename and device forum

Root guide

1.

Asus ROG Phone 3

I003D

Click here

2.

Asus ROG Phone 5 Asus ROG Phone 5s

I005D

Click here

3.

Asus ROG Phone 6/6 Pro

AI2201

Click here

4.

Asus Zenfone 6/Asus 6Z

I01WD

Click here

5.

Asus Zenfone 7/7 Pro

I002D

Click here

6.

Asus Zenfone 8

I006D

Click here

7.

Asus Zenfone 9

AI2202

Click here

For other Asus devices, kindly check out the Asus section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


Fairphone

Sr. No.

Device

Codename and device forum

Root guide

1.

Fairphone 4

fp4

Click here

For other Microsoft Surface devices, kindly check out the Fairphone section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


F(x)tec

Sr. No.

Device

Codename and device forum

Root guide

1.

F(x)tec Pro1-X

pro1x

Click here

For other F(x)tec devices, kindly check out the F(x)tec section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


Google

Sr. No.

Device

Codename and device forum

Root guide

1.

Google Pixel

sailfish

Click here

2.

Google Pixel XL

marlin

Click here

3.

Google Pixel 2

walleye

Click here

4.

Google Pixel 2 XL

taimen

Click here

5.

Google Pixel 3

blueline

Click here

6.

Google Pixel 3 XL

crosshatch

Click here

7.

Google Pixel 3a

sargo

Click here

8.

Google Pixel 3a XL

bonito

Click here

9.

Google Pixel 4

flame

Click here

10.

Google Pixel 4 XL

coral

Click here

11.

Google Pixel 4a

sunfish

Click here

12.

Google Pixel 4a 5G

bramble

Click here

13.

Google Pixel 5

redfin

Click here

14.

Google Pixel 5a

barbet

Click here

15.

Google Pixel 6

oriole

Click here

16.

Google Pixel 6 Pro

raven

Click here

17.

Google Pixel 6a

bluejay

Click here

18.

Google Pixel 7

panther

Click here

19.

Google Pixel 7 Pro

cheetah

Click here

For other Google devices, kindly check out the Google section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


LG

Sr. No.

Device

Codename and device forum

Root guide

1.

LG V60 ThinQ

LM-V600

Click here

2.

  • LG Velvet 4G
  • LG Velvet 5G
  • LG Velvet 5G T-Mobile

For other LG devices, kindly check out the LG section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


Microsoft

Sr. No.

Device

Codename and device forum

Root guide

1.

Microsoft Surface Duo

epsilon

Click here

2.

Microsoft Surface Duo 2

zeta

Click here

For other Microsoft Surface devices, kindly check out the Microsoft section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


Motorola

Sr. No.

Device

Codename and device forum

Root guide

1.

Motorola G100/Edge S

nio

Click here

2.

Motorola Edge 20 Pro/Edge S Pro

pstar

Click here

3.

Motorola Edge 30 Pro/Edge X30

hiphi

Click here

4.

Motorola Edge 30 Ultra/Moto X30 Pro

eqs

Click here

5.

Motorola Razr 5G

smith

Click here

For other Motorola devices, kindly check out the Motorola section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


Nokia

Sr. No.

Device

Codename and device forum

Root guide

1.

Nokia 8.3 5G

babygroot/BGT

Click here

For other Nokia devices, kindly check out the Nokia section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


Nothing

Sr. No.

Device

Codename and device forum

Root guide

1.

Nothing Phone 1

spacewar

Click here

You can also follow the generic rooting guide from this tutorial.


Nvidia

Sr. No.

Device

Codename and device forum

Root guide

1.

Nvidia Shield TV & Shield TV Pro 2019

mdarcy

Click here

For other Nvidia devices, kindly check out the Nvidia section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


OnePlus

Sr. No.

Device

Codename and device forum

Root guide

1.

OnePlus 8

instantnoodle

Click here

2.

OnePlus 8 Pro

instantnoodlep

Click here

3.

OnePlus 8T

kebab

Click here

4.

OnePlus 9

lemonade

Click here

5.

OnePlus 9 Pro

lemonadep

Click here

6.

OnePlus 9R

lemonades

Click here

7.

OnePlus 9RT

martini

Click here

8.

OnePlus 10 Pro

negroni

Click here

9.

OnePlus 10R/Ace

pickle

Click here

10.

OnePlus 10T/Ace Pro

ovaltine

Click here

11.

OnePlus 11

salami

Click here

12.

OnePlus 11R/Ace 2

udon

Click here

13.

OnePlus Nord

avicii

Click here

14.

OnePlus Nord 2

denniz

Click here

15.

OnePlus Nord 2T

karen

Click here

16.

OnePlus Nord CE

ebba

Click here

17.

OnePlus Nord CE 2

ivan

Click here

18.

OnePlus Nord CE 2 Lite

oscar

Click here

19.

OnePlus Nord N10

billie8

Click here

20.

OnePlus Nord N100

billie2

Click here

21.

OnePlus Nord N200

dre

Click here

For other OnePlus devices, kindly check out the OnePlus section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


Realme

Sr. No.

Device

Codename and device forum

Root guide

1.

Realme GT 2 Pro

RMX3300/RMX3301

Click here

2.

Realme GT Master Edition

RMX3360/RMX3363

Click here

3.

Realme GT Neo 2

RMX3370/bitra

Click here

4.

Realme X7 Max 5G/GT Neo

RMX3031

Click here

For other Realme devices, kindly check out the Realme section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


Samsung

Sr. No.

Device

Codename and device forum

Root guide

1.

Galaxy A52 4G

a52q

Click here

2.

Galaxy A52 5G

a52x

Click here

3.

Galaxy A52s 5G

a52sxq

Click here

4.

Galaxy A53 5G

a53x

Click here

5.

Galaxy A72 4G

a72q

Click here

6.

Galaxy S21

o1s/o1q

Click here

7.

Galaxy S21+

t2s/t2q

Click here

8.

Galaxy S21 Ultra

p3s/p3q

Click here

9.

Galaxy S22

r0s/r0q

Click here

10.

Galaxy S22+

g0s/g0q

Click here

11.

Galaxy S22 Ultra

b0s/b0q

Click here

12.

  • Galaxy S23
  • Galaxy S23+
  • Galaxy S23 Ultra

Click here

13.

Galaxy Tab S7, Galaxy Tab S7+

gts7xl

Click here

14.

Galaxy Tab S7 FE

gts7xllite

Click here

15.

Galaxy Tab S8, Galaxy Tab S8+, Galaxy Tab S8 Ultra

gts8, gts8p, gts8u

Click here

16.

Galaxy Z Flip

bloom

Click here

17.

Galaxy Z Flip 3

b2q

Click here

18.

Galaxy Z Flip 4

b4q

Click here

19.

Galaxy Z Fold 3

q2q

Click here

20.

Galaxy Z Fold 4

q4q

Click here

For other Samsung devices, check out the Samsung section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


Sony

Sr. No.

Device

Codename and device forum

Root guide

1.

Sony Xperia 1 III

pdx215

Click here

2.

Sony Xperia 1 IV

pdx223

Click here

3.

Sony Xperia 5 III

pdx214

Click here

4.

Sony Xperia 5 IV

pdx224

Click here

5.

Sony Xperia 10 III

pdx213

Click here

6.

Sony Xperia Pro

pdx204

Click here

7.

Sony Xperia Pro-I

pdx217

Click here

For other Sony Xperia devices, kindly check out the Sony section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.


Xiaomi

Sr. No.

Device

Codename and device forum

Root guide

1.

Mi 11

venus

Click here

2.

Mi 11 Pro/Ultra

star/mars

Click here

3.

Mi 11i/11X Pro/Redmi K40 Pro+

haydn

Click here

4.

Mi 11X/Poco F3/Redmi K40

alioth

Click here

5.

Mi Pad 5

nabu

Click here

6.

Mi Pad 5 Pro

enuma

Click here

7.

Poco F3 GT/Redmi K40 Gaming

ares

Click here

8.

Redmi Note 10

mojito/sunny

Click here

9.

Redmi Note 10 5G/Redmi Note 10T/Poco M3 Pro 5G

camellian/camellia

Click here

10.

Redmi Note 10 Pro and Redmi Note 10 Pro Max

sweet

Click here

11.

Redmi Note 10S

rosemary

Click here

12.

Redmi Note 11 Pro 5G/Redmi Note 11 Pro Plus 5G/Redmi Note 11E Pro/Poco X4 Pro 5G

veux

Click here

13.

Redmi Note 11S/Poco M4 Pro 4G

fleur

Click here

14.

Xiaomi 11T

agate

Click here

15.

Xiaomi 11T Pro

vili

Click here

16.

Xiaomi 12

cupid

Click here

17.

Xiaomi 12 Pro

zeus

Click here

18.

Xiaomi 12S Ultra

thor

Click here

19.

Xiaomi 12T Pro/Redmi K50 Ultra

diting

Click here

20.

Xiaomi 12X

psyche

Click here

21.

Xiaomi 13

fuxi

Click here

22.

Xiaomi 13 Pro

nuwa

Click here

For other Mi, Redmi, and Poco branded devices, kindly check out the Xiaomi section of our forums. You should be able to find similar fine-tuned guides for your device under the device sub-forums. You can also follow the generic rooting guide from this tutorial.



How to root any Android device

Nowadays, Magisk is the de-facto rooting solution that lets you have root access by leaving the system partition untouched and modifying the boot partition. This is why it’s referred to as a “systemless” root method.

Before getting started with Magisk, make sure that:

  • You have access to a PC/Mac with ADB and Fastboot installed.
  • The bootloader of the target Android device is unlocked.
    • For Samsung devices, unlocking the bootloader will trip the Knox warranty bit. There is no way to revert it other than a installing a new motherboard. You'll also lose access to OTA and a number of software features on an unlocked bootloader.

Step 1: Identifying the type of the boot image

Download the latest version of the Magisk app from the project’s GitHub repository. Since the APK of Magisk is hosted outside of the Google Play Store, you may need to allow sideloading apps from unknown sources first and then manually install the downloaded package.

After installing, open the Magisk app. You should see a screen like this:

Magisk main app window

Now, we need to note down the values of the following parameters:

  • Ramdisk
  • A/B
  • SAR

Step 2: Locating the boot image

To patch the boot image for your device, you need to extract it from the official firmware packages. In case you're using a custom ROM like LineageOS, then the flashable ZIP file contains the boot image.

Case 1: You have access to the recovery-flashable ZIP file

If you have a device that still uses the A-only partition scheme, then you can find the boot.img right inside the recovery-flashable ZIP file. Just extract it using a suitable archiver program.

POCO M3 boot.img inside recovery ZIP
Notice the boot.img file inside POCO M3's recovery ZIP

However, if your device utilizes the A/B partition scheme, then the boot image and other partition images are further packed inside a file named payload.bin as shown below.

Google Pixel 5 payload.bin inside recovery ZIP
The recovery ZIP of the Google Pixel 5 contains a payload.bin file

In that case, you have to extract the payload.bin file first, then use one of the community-developed payload.bin unpackers to get the boot.img out of it. We strongly suggest you opt for the extractor written in Go as it is cross-platform and has been actively developed.

Known as "payload-dumper-go", this fork even allows end-users to extract a single partition image without unpacking the whole payload.bin, which is particularly useful for this usage scenario.

  • First, use the -l parameter to list the partition images inside the payload.bin.
     payload-dumper-go -l payload.bin 
  • Then use the -p parameter with the name of the boot image (commonly stored as "boot") to extract it.
     payload-dumper-go -p boot payload.bin 
ASUS ROG Phone 5 boot.img from payload.bin
Extracting the boot.img of the ASUS ROG Phone 5 from its payload.bin

Case 2: You have access to the Fastboot-flashable image

A handful of OEMs like Google and Xiaomi provide Fastboot-flashable factory images for their devices. If you managed to grab such a package, then the raw boot.img can easily be extracted from the archive.

Google Pixel 5 boot.img from Fastboot package
The location of the boot.img inside the Google Pixel 5's Fastboot firmware

Special Case: Samsung

Samsung Galaxy devices don't use a traditional Fastboot interface, hence their factory images are packed differently.

  • Download the factory image for your model. To know more, take a look at our Samsung Galaxy device manual update tutorial.
  • Unzip the decrypted package and locate the AP tar file on your device. It is normally named AP_[device_model_sw_ver].tar.md5.

Step 3: Patching the boot image

Now that we have the boot image in hand, we should proceed with the patching part.

Case 1: The value of the "Ramdisk" parameter is "Yes"

  • Copy the boot image to your device. In fact, you can patch it on a different Android device than the target one, but you need to install the Magisk app on the secondary device as well.
  • Press the Install button in the Magisk card.
  • Choose Select and Patch a File in Method, and select the stock boot image.
Magisk select and patch image
  • The Magisk app will patch the image to [Internal Storage]/Download/magisk_patched_[random_strings].img.
Magisk is patching a boot image
  • Copy the patched image to your PC with ADB:
     adb pull /sdcard/Download/magisk_patched_[random_strings].img 
  • Flash the patched boot image to your device. For most devices, reboot into Fastboot mode and flash with the following command:
     fastboot flash boot /path/to/magisk_patched.img 
  • Reboot and enjoy root access!

Keep in mind that it is possible to patch the boot image on the fly on legacy devices having boot ramdisk through a custom recovery like TWRP, but the method is no longer recommended on modern devices. Having said that, if you have an old phone and want to stick with the custom recovery route, the steps are as follows:

  • Download the Magisk APK.
  • Rename the .APK file extension to .ZIP (e.g. Magisk-vx.y.APK → Magisk-vx.y.ZIP).
  • Flash the ZIP file just like any other ordinary flashable ZIP.
Magisk flashing via TWRP
  • Note that the sepolicy.rule file of modules may be stored in the cache partition, so don't clear it.
  • Check whether the Magisk app is installed. If it isn’t installed automatically, manually install the APK.

Case 2: The value of the "Ramdisk" parameter is "No"

In this case, you need to locate the recovery.img file from the factory image of your device instead of boot.img file. This is because Magisk needs to be installed in the recovery partition, which means you will have to reboot to the recovery mode every time you want root access.

  • Copy the recovery image to your device (or a secondary device with the Magisk app installed).
  • Press the Install button on the Magisk card.
  • Choose “Select and Patch a File” in method, and select the stock recovery image.
  • The Magisk app will patch the image to [Internal Storage]/Download/magisk_patched_[random_strings].img.
  • Copy the patched image to your PC with ADB:
     adb pull /sdcard/Download/magisk_patched_[random_strings].img 
  • Flash the patched recovery image to your device. For most devices, reboot into Fastboot mode and flash with the following command:
     fastboot flash recovery /path/to/magisk_patched.img 
  • Reboot.

At this stage, there are three possible scenarios:

  • Power up normally: You'll end up with no Magisk, i.e. no root access.
  • Recovery Key Combo → Splash screen → Release all buttons: The system should boot with Magisk and full root access.
  • Recovery Key Combo → Splash screen → Keep pressing volume up: To access the stock recovery mode.

Special Case: Samsung

  • Copy the extracted AP tar file to your device.
  • Press the Install button on the Magisk card.
  • If your device doesn't have boot ramdisk, make sure Recovery Mode is checked in options.
  • Choose Select and Patch a File in Method, and select the AP tar file.
  • The Magisk app will patch the whole firmware file to [Internal Storage]/Download/magisk_patched_[random_strings].tar
  • Copy the patched tar file to your PC with ADB:
     adb pull /sdcard/Download/magisk_patched_[random_strings].tar 
    • Don't try to copy over the MTP interface, as it is known to corrupt large files.
  • Reboot to download mode. Open Odin on your PC, and flash magisk_patched.tar as AP, together with BL, CP, and CSC from the original firmware.
    • Don't choose HOME_CSC because we want to wipe data.
  • Your device should reboot automatically once Odin finished flashing. Agree to do a factory reset if asked.
  • If your device doesn't have boot ramdisk, reboot to recovery now to enable Magisk.
  • Install the latest Magisk app and launch the app. It should show a dialog asking for additional setup. Let it do its job, and the app will automatically reboot your device.
  • Reboot and enjoy root access!

Step 4: Verification

The last step is to verify that everything is working properly. Locate the newly installed Magisk app and open it. We want to see a version number beside the "Installed" parameter. This means you have successfully obtained root. Great job!

A successful installation of Magisk

One Click Root Methods in 2023: Kingroot, KingoRoot, and others

A few years back, several generic root methods like Kingroot, KingoRoot, and others gained popularity as "one-click root" methods, promising root and related benefits with minimal steps and knowledge needed by the user. However, as Android has matured, these one-click root methods are no longer valid for modern smartphones and Android devices in 2023.

We strongly dissuade against the use of these generic root methods as they are either ineffective or, worse, pack in malware that can greatly compromise your device and cause you losses. Practically all of these methods are no longer recommended. You should follow the steps listed above for an effective root solution for most Android devices.


We hope this guide not only points you to the right threads for rooting your device but also provides general rooting instructions that can be applied for a large majority of Android devices generally. We'll be updating this guide with links to further guides for specific phones, so check back again in the future.