Install TWRP & Root Android O Developer Preview 1 on Google Pixel/Pixel XL

2
Install TWRP & Root Android O Developer Preview on Google Pixel/Pixel XL

Google rolled out the first developer preview of Android O almost a month ago. Quite shortly after, Chainfire, the developer of SuperSU, found a way to root the latest Android. That method only worked for the Nexus 6P and 5X and not the Pixel or Pixel XL. The Pixel and Pixel XL both have a dual partition system, and a patch of code that handled them seemed to be causing problems with the earlier method. But Pixel user Sachi315 has finally discovered a way to root Android O Developer Preview on the Google Pixel and Pixel XL.

The method involves installing Android 7.1.2 Nougat on one of the partitions and Android O on the other. This allows Android O to boot even after installing SuperSU.

Downloads

Also read: List of 70 OK Google Commands for Google Assistant and Google Now

Set up the latest fastboot binaries

  • Extract the fastboot/ADB binary folder “platform-tools” and place it in the C: drive inside a folder named Android. You can put it anywhere you want actually but it’d be better to place it somewhere that’s out of the way.root android o developer preview pixel
  • Go to Control Panel> System and Security > System. On Windows 10, the Control Panel can be accessed by right-clicking on the start button. However, in the latest creator’s update to Windows 10, that options seems gone. You can still press the Windows key and then type System to search and open it directly.root android o developer preview pixel
  • Under Computer name, domain, and workgroup settings click Change settingsroot android o developer preview pixel
  • Click on the Advanced tab then at the bottom click Environment Variables.root android o developer preview pixel
  • In the new window that opens, double-click Path under the System Variables section.root android o developer preview pixel
  • Click New and put in the location of the platform-tools folder earlier extracted. If you chose to put it in the location we specified, the path should be C:\Android\platform-tools
  • Press Enter or click OK and it should be the newest entry at the bottom.
  • Click OK again and reboot your PC.

The latest ADB and fastboot binaries should now be installed on your PC. To check if it installed correctly, open command prompt. Type fastboot and press Enter. This should display all the available fastboot commands including the new “–slot” commands. If you can see the new slot commands at the bottom, you are ready to move on.

Must read: Enable Picture-in-Picture Mode on Android O Right Now!

Edit flash-all.bat in Android 7.1.2 and Android O factory images

  • Extract the image file into a folder.
  • Find the flash-all.bat file in the extracted contents and right click on it, then select edit. 
  • For working in the file, it’d be better if you clean up the mess it is. That is, separate the commands into several lines. This does not affect the code or the way it functions but makes it easier for us to work. 
  • Towards the end of the text in the file, add –skip-reboot between update and image-sailfish-n2g47e.zip. This command makes sure that the device will not reboot after the flashing is complete. 
  • Now we need to add some commands to make sure the image installs only into the first partition. Below you can see how it looks after adding the commands. Type in the –slot commands in the exact places as shown in the image below. 
  • If you are working on the Pixel XL (codenamed marlin) image file, the image name and the device codename will be different, but everything else is still the same. The same commands need to be placed in the exact same places.
  • Once the changes are made, save the flash-all.bat file and close the folder.
  • Do the exact same changes to the flash-all.bat of the Android O image. Except, this time ass –slot_b instead of –slot_a as shown below.
  • Save it too and exit.

Flash the images

Warning: The process will completely wipe out your phone so make sure you backup all of your data on an external storage or you PC.

  1. Power off your Pixel/Pixel XL.
  2. Press and hold the power and volume down buttons to boot it into the bootloader mode.
  3. Connect your phone to the PC with a USB cable.
  4. Open command prompt and type
    fastboot --slot _a -w
  5. When the command is executed and everything is done, type
    fastboot --slot _b -w
  6. This wipes both the partitions on your device. Now enter the following command
    fastboot --set-active=_b
  7. Then type
    fastboot reboot-bootloader
  8. Your phone will now boot into the bootloader again.
  9. Close the command prompt window and run the flash-all.bat file from the Android O Developer Preview folder.
  10. After the process is complete, run the flash-all.bat from the Android 7.1.2
  11. Once that is done, open a new command prompt window and type
    fastboot --set-active=_a
  12. Then type
    fastboot reboot-bootloader
  13. When the phone boots into the bootloader mode again, make sure it says slot “a”.

Install TWRP and Root

  1. Boot your Pixel into recovery mode now using the volume and power buttons.
  2. Check on your PC if you can access your phone’s internal storage. If not, go to wipe>advanced wipe and check internal storage only, then wipe this partition. Unplug your phone and then plug it back in. You should now be able to access your device’s internal storage.
  3. Transfer TWRP RC2 and SuperSU sr4 2.79 Extra Delay to your Pixel/Pixel XL.
  4. Select Install and then flash the TWRP RC2 recovery.
  5. Switch to slot b in TWRP now and then reboot to recovery.
  6. When your device boots into recovery now, it should be in slot b. To check this, select Reboot and look at the bottom of the screen.
  7. If it says slot b, flash SuperSU SR4 2.79 Extra Delay.
  8. Reboot to the system now.

When your Pixel boots up, it should boot right into Android O. After finishing the setup, you should find SuperSU installed on your phone.

  • Vivek

    Glad it helped you

  • thank you, bro great content
    this really helped me