How to Install Android P Developer Preview On Google Pixel and Pixel 2

BY Rajesh Pandey

Published 8 Mar 2018

Earlier today, Google released the first Developer Preview of Android P. Aimed mainly at developers, Google did release the factory and OTA images of the OS so that interested developers and users can manually install it on their compatible Pixel device.

Since Google has not yet started the Android beta program for Android P, the only way to currently install the OS on your Android device is by flashing the factory image manually. This is slightly more complex than usual, though if you know your way around adb and fastboot, the whole process will only take a few minutes for you. However, do note that flashing the factory image requires the bootloader of your Pixel to be unlocked. And this means that if it is not already unlocked, doing so will end up wiping your phone clean of all your data. Thus, before you jump to the steps below, make sure to create a backup of all your important data on the device.

How to Install Android P Developer Preview On Google Pixel and Pixel 2

Setting up ADB and Fastboot

Mac: Follow this quick guide to set up ADB/Fastboot.

Windows: Download and install the 15-second ADB/Fastboot installer by following the instructions mentioned. Also, make sure to download and install the ADB drivers from here.

Unlock the bootloader

Step 1: Head over to Google’s developer website and download the Android P factory image for your Pixel handset.

(Optional) If the bootloader of your Pixel device is not unlocked, head over to Settings -> About Phone and tap on Build Number 7 times to enable the hidden Developer Options menu. Then from under Developer Options, enable the OEM Unlocking option.

Step 2: On the desktop of your PC, extract the contents of the Android P factory image file inside a new folder called ”android”. It is extremely important that all the contents of the factory image are present inside it. Do not end up extracting the contents from the zip files present inside the archive.

Step 3: If you are on Windows, Shift + right click on the “android” folder and select the ‘Open command window here’ option. On a Mac, open up Terminal, type “cd”, drag ‘n’ drop the “android” folder inside the window, and then press enter.

Step 4: Boot your Pixel device into bootloader mode by using the following key combination:

  • Volume Down + Power button

Step 5: Confirm that your device is being detected by your PC by running the following command:

fastboot devices

If detected, this command should return the Android ID of your device. If not, restart your Android device and PC. If that fails as well, reinstall the ADB drivers.

Step 6 (Optional): Assuming the bootloader of your Pixel is not unlocked, run the following command:

fastboot flashing unlock

You will have to confirm your selection by pressing the Volume Up button on your device followed by the Power button. Once done, your device should reboot back into Android. If not, reboot the handset manually. Once it boots back into Android, skip the setup process, switch it off, put it into bootloader mode and connect it to your PC.

Step 7: Now, run the below command to flash the Nougat factory image on your Nexus device.

Windows:

flash-all.sh

Mac:

./flash-all.sh

Android N installation

The Android P DP will now be automatically flashed on your Pixel, and your device will automatically reboot after everything is done. The first boot can take a wee bit longer since the OS needs to set itself up but there’s no need to worry about it.


You can also modify the flash-all script to ensure that the data in your device is not touched. However, this only works if the bootloader of your device is not unlocked, and I will not recommend doing this as well since installing the first DP of Android P without wiping the data on your device can lead to some compatibility issues.