Extended Brain Storage

GrapheneOS: Revert Back to Stock AOSP ROM

Posted on May 19, 2019

This is a brief tutorial to install a stock Android Open Source Project (AOSP) ROM on a Google Pixel XL smartphone (the first generation)…

Enabling OEM Unlocking

The OEM unlocking needs option needs to be enabled from within the operating system in order to successfully install AOSP. This can be achieved as follows:

Factory Image Download

The factory image needs to be downloaded from developers.google.com (e.g. it’s marlin for Pixel XL).

$ adb reboot bootloader

The bootloader can be unlocked to allow flashing new images as follows:

$ fastboot flashing unlock

The fastboot command needs to be confirmed on the device. This erases all data on the target device!

Next, the factory image needs to be extracted and flashed into the smartphone in order to install the necessary bootloader, baseband firmware(s), and operating system. The normal process is as follows:

$ cd marlin-*
$ ./flash-all.sh

Once the script finishes, the device reboots shortly.

Locking the Bootloader

Before using the device, the bootloader should be locked again in order to maintain its security feature, as locking wipes the data again. This can be achieved as follows:

$ adb reboot bootloader
$ fastboot flashing lock

A confirmation is needed to be performed on the screen using the side buttons. The device restarts shortly after.


The GrapheneOS and the AOSP are interesting projects, which should definitely get more attention in the future.

Tags: #security #privacy #Android #GrapheneOS #AOSP

⏴ Previous Post Next Post ⏵