,

How to root Android P 9.0?

Sarang Avatar

Updated

How to root Android P 9.0

The post has been updated to work with Android 9.0 P with the latest Magisk v16.1 systemless rooting tool. This post is a continuation of the detailed tutorial on rooting the Googel Pixel and Pixel 2 on the Oreo. Now that the most popular rooting tool called Magisk Manager has been updated to support Android 9.0 P, it can be used on Google Pixel devices.

If you have been following Android lately, then the latest Android P 9.0 Developer Preview version is available for download for the Google Pixel and Pixel 2 devices. We also have the new Android P launcher. Today, some of the most recognized Android developers topjohnwu,ย have released a full proof solution to root the newest Android P 9.0 version. We will keep updating the post with new versions. So stay tuned.

Moreover, the most awaited root and TWRP recoveries for the two new Google phones called theย Pixel (sailfish) or Pixel XL (marlin)ย and the Pixel 2/XL are now available. This is a new beginning for Pixel users as well as the future for Android development as future updates will be related to the new Nougat OS. We have already seen that the Pixel phones now run on the latest Android 8.1 Oreo and there haveย been major changes to the Pixelโ€™s core systemย including the partitions. Hence, itย took awhile for the contributors to gain a stable root access and build a custom TWRP recovery for the Google Pixel (2).

This guide not only explores rooting Android P, 8.1 Oreo, 7.1 Nougat or earlier version on various devices, but also explored all the details on rooting Google Pixel devices with multiple partitions. We know Google Pixel and some other devices come with A/B partitions. We will be going through the complete root procedure for your Pixel and Pixel 2 with A/B partitions as well. The rooting procedure includes unlocking the Bootloader, installing the TWRP recovery, and flashing latest Magisk zip.

Warning and notes: Unlocking bootloader, rooting, or installing TWRP may void your deviceโ€™s warranty.ย Even though the instructions provided below have been tested on other devices, you should still be cautious about it. Readers discretion is advised.

Requirements to root Android P

Currently, Android P is only available for Google Pixel. So we have updated the post in consideration that you have a Google Pixel or Pixel 2 device. Stay tuned for further update.

  • Enable Developer options. To do so, go to Settings> About Phone> Tap on the Build Number several times until you get a newย Developer Options in theย Settings.
  • Now go to Settings>Developer Options and Enable OEM Unlock.ย This is anย important step. Otherwise, the fastboot commands wonโ€™t work.
  • Enable USB Debugging and Advanced Reboot on your device.ย Openย Developer Options and enable USB Debugging from there. Trust the connection by allowing it when you connect it to your PC for the first time.
  • Install quick ADB and Fastboot drivers on your PC. Download the quick ADB Installer for Windows, Mac OS, Linux, and Chrome OS.
  • Make sure you have latest device drivers setup on your PC for a better connection. Get it from the official pageย of Google.

Downloads

  • Officialย TWRP forGoogle Pixel phonesย โ†’ Download
  • Flash Magisk 16.1 to root โ†’ Download

How to Unlock Bootloader On any phone running Android P 9.0 or earlier?

Unlocking Bootloader leads to factory reset! So backup!ย The first step towards Android development on your smartphone is to unlock the Bootloader. This unlocks various developmental features on your phone. It basically enables you to access and modify core system files.

Following bootloader unlock, you will need to setup TWRP recovery, and flash magisk zip using TWRP. The new Magisk 16.1+ will root your device. The procedure is only for the international or global variants of the Google Pixel (2).

Google Pixel Android P Bootloader Unlock method

Step 1:ย Connect your Android device to the PC and trust the connection- tap Yes on โ€œAlways allow from this computerโ€ when you plug in the device into PC for the first time.

Step 2:ย If you have installed the quick ADB installer, launch a command prompt or terminal window anywhere. To do so, just click the address bar and type cmd and press Enter key or hold the shift key on the keyboard and right-click on an empty space and select โ€œOpen command window hereโ€ option to launch a cmd window.

Step 3: Nowย reboot into the bootloader, issue the following commands. (If ADB does not detect your device try switching your phoneโ€™s USB mode from Charging to MTP or PTP.)

adb reboot bootloader

Step 4: Once in the bootloader, issue the following fastboot command to unlock the bootloader.

fastboot flashing unlock

Note: The above code in only for the Google Pixel, Pixel 2, and Nexus 6P devices. For other devices, use the following code to unlock bootloader:

fastboot oem unlock

Step 5:ย Once you get to the unlock confirmation screen on your Android device,ย Press Volume Upย button and hit theย Power button to select it. Yourย bootloader unlocking process will begin may take a couple of minutes.

Step 6: Once the bootloader has beenย unlocked, your deviceย will reboot. If it gets into bootloader mode again, reboot into system by issuing the following command:

fastboot reboot

You may now proceed TWRP installation.

How to install TWRP and Root Google Pixel (2)ย  on Android P?

Note: The following method is for Google Pixel and Pixel 2 running Android P, 8.1 Oreo, or earlier. For detailed tutorial on how to install TWRP on any other Android phone, visit the following tutorials:

Do not proceed unless you have unlocked the Bootloader!ย Also, do not use it for multiple users including a guest account. Do not proceed if you have important stuff andย critical dataย on your phone that cannot be lost.

The procedure is similar toย installing TWRP on most other Android phones. However, due to A/B partitioning present in Google Pixel and Pixel 2 devices, Fastboot commands have changed a little. To install TWRP, first, we will be booting the TWRP image and then flash the TWRP zip.

TWRP installation method:

Note:ย If you accidentallyย flash TWRP to your device using Fastboot instead of temporarily booting the image, you will need to download the latest factory image for your device and re-flash the boot image.

Step 1: Download the TWRP recovery and latest Magisk zip file from above. Download both โ€“ the TWRP file with .zip and .img extensions. You will need both. You donโ€™t need to extract the files, just transfer all the files to your PC.

Step 2:ย Setup quick ADB and Fastboot Installer on your PC and go through all theย prerequisites from above.

Step 3: Now plug in the Google Pixelย device to your computerย and open aย command prompt or terminalย window on your PC within the folder where TWRP.zip file is located. (See above to know how to open cmd).

Step 4: Reboot your Android device into the bootloader or Fastboot mode. To do so, issue the following command through cmd or terminal. You can also manually boot into it using the hard key combination like Power+Volume Down while the device is turned off. Meanwhile, use code:

adb reboot bootloader

Step 5: Now issue the following command in the command prompt to check your device connectivity.

fastboot devices

Step 6: Now issue the following commandย to temporarily boot up the TWRP image.

fastboot boot twrp.img

Note: If you have installed the quick 15 second ADB & fastboot installer, simply enter the folder where the TWRP zip file is present and issue command.ย Otherwise, you will need to enter the directory path name like โ€œfastboot boot path/to/twrp.imgโ€.ย Alternatively, while, on Mac OS, you can issue โ€œ./fastboot boot path/to/twrp.imgโ€ command or on Linux type โ€œsudo fastboot path/to/twrp.imgโ€ to flash the TWRP.

Step 7:ย Once your device Reboots into the temporary TWRP recovery, use the TWRP interface to flash the recovery zip. Navigate toย install and selectTWRP.zip file.

Root Android P 9.0 with latest Magisk 16.1+

Once you install TWRP, itโ€™s time to root.

  • Transfer latest Magisk v16.1 package to Android deviceโ€™s internal storage or SDcard.
  • Reboot your phone into the custom TWRP recovery. For that, turn off your device completely and hold volume down and power buttons for a few seconds.
  • From TWRP, tap the install button and select the SuperSU file.
  • Swipe the confirmation action below to start flashing.
  • Once done. Reboot to system.

You can boot into the TWRP recovery by issuing the following command:

adb reboot recovery

Follow and like us on social media. For queries either comment down below.

Follow and Subscribe


Sarang Avatar

Leave a Reply