> For the complete documentation index, see [llms.txt](https://blog.mdsathees.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.mdsathees.in/adversary-experience/how-to-root-any-android-phone-in-a-just-few-hours.md).

# How to Root any Android phone In A Just Few Hours

![](https://1810415247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMb0KlCGYrnfU4uKZkzyx%2Fuploads%2FfJBavHaAXGhWSuJJfJk0%2Fimage.png?alt=media\&token=aaa4c380-52f4-4038-9a11-b97dd763600a)

**Step:1 - Pick up the suitable Android phone**

Selecting the Android phone model is based on the availability of recovery images. Please check out the [TWRP devices list](https://twrp.me/Devices).

**Step:2 - Flash with Recovery Image**

Note: "Unlocking the bootloader may varies based on Phone model"

On your device, go into Settings -> About and find the Build Number and tap on it 7 times to enable developer settings. Press back and go into Developer Options and enable USB debugging. From your computer, open a command prompt and type:

> *adb reboot bootloader* &#x20;

You should now be in fastboot mode.

Download the correct image file and copy the file into the same folder as your platform-tools. Rename the image to twrp.img and type:

> *fastboot flash recovery twrp.img*

> *fastboot reboot*

**Step:3a - Custom Operating System**

[Download the Lineage OS.](https://wiki.lineageos.org/)

Easiest way to install the lineage OS in your phone

*Method:1 - Without ADB sideloaded*

1. Copy the downloaded lineage os into pendrive or sdcard
2. Plug in your OTG or sdcard with your devices and selecting the correct image in recovery mode.
3. Reboot the device by clicking the reboot button.

*Method:2 - ADB sideloaded*

1. Boot with TWRP recovery mode and select the Advanced -> ADB Sideloaded
2. Sideload the LineageOS `.zip` package:
3. On the device, select “Advanced”, “ADB Sideload”, then swipe to begin sideload.
4. On the host machine, sideload the package using: `adb sideload filename.zip`.

> Note: Please refer the Installing LineageOS from recovery steps

**Step:3b - Escalation Patch image for root permission**

> *Note: This is not feasible method to root your phone. Please check out with your own risk.*

[SuperSu Download](https://supersuroot.org/)

Downloaded the appropriate build image based your android version and follow the without ADB sideload method ( explained above )

**Step:4 - Installing an Apps for testing**

{% embed url="<https://opengapps.org>" %}

{% embed url="<https://repo.xposed.info/module/de.robv.android.xposed.installer>" %}

{% embed url="<https://magiskmanager.com>" %}

Please install the apps by using adb sideload mode or direct installation in TWRP recovery mode.

Thanks for reading.
