Google just announced the Developer Preview for Android 8.1 for a handful of Pixel and Nexus devices. This beta build can either be installed through the traditional flashing method or by OTA using the search giant’s Beta Program. Here’s how to install Android 8.1 using both methods…

Amazon Kindle Paperwhite

The first and easiest way to install the Android 8.1 Oreo Developer Preview is by enrolling your eligible devices in the Beta Program.

How to enroll in the Android O Beta Program

  1. Open a web browser and go to android.com/beta
  2. Sign in with the Google account that is used on your Android device(s)
  3. Once logged in, you should see a list all eligible devices. The list should look something like the image below
  4. When ready, select the Enroll Device button
  5. Shortly after, you should get an update notification on the device that you enrolled
  6. After installation, your device will continue to get future beta updates when they’re made available

Note: It is always a good idea to backup any important data before upgrading to Android O just in case something happens

How to unenroll from the Android O Beta Program

  1. Before you unenroll, make sure to backup all important data as your device will get wiped
  2. Open a web browser and go to android.com/beta
  3. Sign in with the Google account that is used on your Android device(s)
  4. Once logged in, you should see a list all eligible devices. The list should look something like the image below
  5. When ready, select the Unenroll Device button
  6. Shortly after, you should get an update notification on the device that you unenrolled
  7. After installation, your device will be running the latest stable build of Android made available for it

The second way to install the Android 8.1 Developer Preview is by manually wiping and flashing the build to your Pixel or Nexus device. While this takes more work on your part, it does allow the update to be installed almost instantly and makes sure the phone’s firmware doesn’t get junked up in the process. Just remember that by going this route, you will have to completely wipe your handset’s memory clean.

Note: This guide assumes you already have your phone’s bootloader unlocked and the ADB tools installed on your computer. If you need the ADB tools, head over and download the Android SDK, and if you need to unlock your bootloader, keep reading.

Before we get started, we need to make sure that your device is visible to your computer. Type the command “adb devices” in your Terminal app; if you see your device listed, you’re ready to go. If not, make sure your device has ADB debugging turned on in Settings.

Unlock the bootloader

If you know that your device is already unlocked, feel free to skip this section and keep reading. Otherwise, you need to make sure your phone’s bootloader is unlocked before you can flash a factory image.

Bootloader locking is a security feature that requires that your device is completely wiped when going from a “locked” state to an “unlocked” state. For this reason, there’s no way to keep your data if your bootloader is locked.

Android Oreo Developer Options

If you need to unlock your bootloader, go to the Settings app and head to “Developer options” (if you don’t see Developer options, go to the “About” page and tap the Android build number several times). Make sure that “OEM unlocking” is checked.

Next, use the command “adb reboot bootloader” to go to the device’s bootloader and check if your device is in the locked state. If the bootloader on your Pixel or Nexus device is locked, make sure your device is at the bootloader screen and use the “fastboot oem unlock” command. Alternatively, for some newer devices, you will need to use the command “fastboot flash unlock“.

After this, you should see some prompts on your device to confirm that you do indeed want to unlock your bootloader. After you confirm this, your device is going to be completely wiped, and you’ll be ready to move on with this guide.

Download and prepare the factory image

If you haven’t already, grab the latest build of Android O from Google’s preview factory image page. Once you’ve downloaded the .tgz file, extract it. Inside the extracted .tgz file there will be a .zip file titled something like “marlin-opr6.170623.012-factory-6304451d.zip” (Pixel XL), and after you extract that file, you’ll find the bootloader, OS image, vendor image, and a radio image (depending on your device).

Not recommended: modify the “flash-all” script to save your data 

You only need to follow these instructions if your device already had an unlocked bootloader and you want to keep your data. Otherwise, the flash will format your device and all data will be lost. If your bootloader is locked, your data will have to be wiped anyway as described above. If you don’t want to lose your data, in this case, you need to restart your device and back it up manually.

We do not recommend doing this since it could cause bugs in the operating system. If that doesn’t sway you, keep reading…

The “flash-all” script contains all of the commands necessary to flash the factory image onto your device. Before running it from the command line, you might want to remove the flag that wipes your data (although this isn’t ideal, you might run into problems especially if it’s a major upgrade).

In the file you extracted you’ll find two flash-all scripts as mentioned above. The flash-all script with the .bat extension works with the Windows command line while the .sh extension works with the Unix command line (macOS, Linux, etc.). Open up the proper flash-all script with your favorite text editor and remove the “-w” from the file. “-w” is an ADB flag which wipes all of the user data (the stuff we want to keep).

Once you’ve made the change, save your file, and open up a command-line program.

Run the script and install Android 8.1 Oreo

As we did earlier to check unlock status, you need to boot into your bootloader to flash the factory image. Execute the command “adb reboot bootloader” again to get there. Alternatively, you could start up the device while holding the volume down and power keys simultaneously to boot into the bootloader.

Now point your command line to the file directory with the flash-all script. (Ex: cd /Users/<yourusername>/Downloads/taimen-opp5.170921.005). For more help on using the command line, see this cheat sheet.

Once you’ve pointed to the correct directory, run your script.

  • On Unix/Mac, run “./flash-all.sh”
  • On Windows, run “flash-all.bat”

Now you should see the script running on-screen. It’ll take a little over five minutes for the image to install. Once the image is installed, the script will automatically reboot your phone. The first boot usually takes a while, so wait about 10 minutes before assuming you’ve entered a bootloop.

Some users have had issues with the flash-all script not working on some devices. If that’s the case for you, you’re going to need to flash all of the images manually. It’s not a laborious process, though, and only requires a few extra steps. Make sure your device is in the proper bootloader state, and then follow these instructions:

First, flash the bootloader and the radio, and then reboot the bootloader (radio only applies to some devices):

fastboot flash bootloader <bootloader file name here>.img

fastboot flash radio <radio file name here>.img

fastboot reboot-bootloader

Flash the recovery, boot, system, and vendor images (vendor only applies to the Nexus 9):

fastboot flash recovery recovery.img

fastboot flash boot boot.img

fastboot flash system system.img

fastboot flash vendor vendor.img

Recommended: For a full wipe, flash cache and userdata as well (userdata only applies to some devices):

fastboot flash cache cache.img

fastboot flash userdata userdata.img

Reboot your device:

fastboot reboot

After the device boots, you should have Android 8.1 Oreo and, if you opted to modify the flash-all script, all of your data should be intact.


Check out 9to5Google on YouTube for more news:

About the Author