Contents
Documentation on Flashing Google Pixel phones
Flashing Google phones
In general, the instructions are well documented and easy to follow.
Stock OS
Following instructions on https://developers.google.com/android/images#instructions
Also possible to use the Android Flash tool (chrome browser needed): https://flash.android.com/welcome
CalyxOS
Following instructions on https://calyxos.org/install/
Couldn’t reproduce the device-flasher.linux executable with the corresponding checksum, which is run with root privileges on your computer. Wasn’t able to flash the device with a device-flasher.linux executable that I built myself from the source code. Instead, the flash-all.sh script is executed to flash the device.
Prerequisites
Computer with
1. Android SDK Platform-Tools installed
2. basic CLI utilties, i.e. curl, unzip, sha256sum
Download factory image
Download the image
Stock OS
The operating system to be installed is proprietary software from Google.
Pixel 2
1 curl -LO "https://dl.google.com/dl/android/aosp/walleye-rp1a.201005.004.a1-factory-0c23f6cf.zip"
And verify its checksum:
1 sha256sum walleye-rp1a.201005.004.a1-factory-0c23f6cf.zip
It should be equal to the SHA displayed on the page: 0c23f6cf9e2194a3e72b1288f65c5a7f2f6c020080af49c8a494ee99ab3eb543
Extract the contents:
1 unzip "walleye-rp1a.201005.004.a1-factory-0c23f6cf.zip"
CalyxOS
Pixel 2
Device model is officially not supported anymore. Fortunately for us, the link that was removed from the website and was pointing to the factory image is still active:
1 curl -LO "https://release.calyxinstitute.org/walleye-factory-22214000.zip"
And verify its checksum:
1 sha256sum walleye-factory-22214000.zip
It should be equal to the SHA displayed on the page: ea8ecc694e687d711efa4b571ef846fc7de85e4123883131f9ab9d75ecacc4c0
Extract the contents:
1 unzip "walleye-factory-22214000.zip"
Enable OEM unlocking
If not already unlocked, OEM unlocking must be enabled from within the OS.
For that, Developer options must be enabled:
Settings → About Phone → tap Build Number 7 times
Now, OEM unlocking can be enabled from within the Developer Options:
Settings → System → Advanced → Developer Options → OEM unlocking
Reboot into bootloader
This can be done in a couple of ways:
Over the command line with adb
Enable USB debugging within Developer options menu:
Settings → System → Advanced → Developer Options → USB debugging
Connect your device to your computer over USB.
Need to confirm popup “Allow USB debugging” on the device.
1 adb reboot bootloader
Holding Volume down button while booting
This can be done in two ways:
1. Reboot the phone and begin holding the “Volume down” button during the boot process, or
2. Turn phone off, then boot it up while holding “Volume down” button during boot process
Unlock bootloader
If necessary, unlock the bootloader:
1 fastboot flashing unlock
Needs to be confirmed on the device.
If the bootloader has been unlocked, the device needs to be rebooted into the bootloader, see section Reboot into bootloader
Flash factory image
Check if your device can be found:
1 fastboot devices
Stock OS
Pixel 2
Move into the directory:
1 cd walleye-rp1a.201005.004.a1
1 ./flash-all.sh
Once the script finishes, the device reboots into the system.
CalyxOS
Pixel 2
Move into the directory:
1 cd walleye-rq3a.211001.001
1 ./flash-all.sh
Once the script finishes, the device reboots into the bootloader.
Lock the bootloader
If not already in the bootloader interface, reboot into the bootloader, see section Reboot into bootloader
Execute:
1 fastboot flashing lock
Needs to be confirmed on the device.
The device reboots into the system.