How to Root your Android smartphone?
Welcome to the XDA-Developers Root Directory. Here, you can find root tutorials for most devices that are on the XDA Forums. Learn how to root any Android device, even the best Android phones! If you don’t see your device listed or you see a misplaced link, send a message to Skanda Hazarika (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 are able to 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.
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.
Step 2: Locating the boot image
In order 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.
Step 3: Patching the boot image
Now that we have the boot image in hand, we should proceed with the patching part.
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!