Extended Brain Storage

GrapheneOS: Installation Tutorial

Posted on May 18, 2019

This tutorial describes the process to install the GrapheneOS ROM on a Google Pixel XL smartphone (the first generation)...


$ yaourt -S android-tools ! or alternatively from AUR: yaourt -S android-sdk-platform-tools
$ fastboot --version
fastboot version 9.0.0_r41
Installed as /usr/bin/fastboot

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:

Unlocking the Bootloader

Booting into the bootloader interface can be achieved after connecting the device to the computer and by:

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!

Flashing the Factory Images

The factory images (stable or beta) need to be obtained first. The following example is for the Google Pixel XL smartphone (the first generation):

$ cd ${HOME}
$ mkdir -p grapheneos
$ cd grapheneos
$ wget https://seamlessupdate.app/marlin-factory-2019.05.08.15.zip
$ wget https://seamlessupdate.app/marlin-factory-2019.05.08.15.zip.sig

Verification of the downloaded files:

$ gpg --recv-keys 65EEFE022108E2B708CBFCF7F9E712E59AF5F22A
$ gpg --verify marlin-factory-2019.05.08.15.zip.sig marlin-factory-2019.05.08.15.zip

The installation process is straightforward. The downloaded archive needs to be unzipped and the appropriate BASH script needs to be executed as follows:

$ cd ${HOME}/grapheneos
$ unzip marlin-factory-2019.05.08.15.zip
$ cd marlin-pq3a.190505.001
$ ./flash-all.sh

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

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


The GrapheneOS is a very promising project. However, should one need to revert back to the stock ROM, the following tutorial can be used.

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

⏴ Previous Post Next Post ⏵