Activities/Android/UpcyclingWorkshops/FlashingGooglePhones

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"

Pixel 3

   1     curl -LO "https://dl.google.com/dl/android/aosp/blueline-sp1a.210812.016.c2-factory-fa981d87.zip"

And verify its checksum:

   1     sha256sum "blueline-sp1a.210812.016.c2-factory-fa981d87.zip"

It should be equal to the SHA displayed on the page: fa981d87b6b28a1996161accbb147f46fe29663bb2ce6cc13dc9e500cbc59c93

Extract the contents:

   1     unzip "blueline-sp1a.210812.016.c2-factory-fa981d87.zip"

Pixel 3 XL

   1     curl -LO "https://dl.google.com/dl/android/aosp/crosshatch-sp1a.210812.016.c2-factory-27f59137.zip"

And verify its checksum:

   1     sha256sum "crosshatch-sp1a.210812.016.c2-factory-27f59137.zip"

It should be equal to the SHA displayed on the page: 27f59137f9802f6913f92d820bb0cbd80793f6e4a80c5f05e1242810903d4aea

Extract the contents:

   1     unzip "crosshatch-sp1a.210812.016.c2-factory-27f59137.zip"

Pixel 3a

   1     curl -LO "https://dl.google.com/dl/android/aosp/sargo-sp2a.220505.008-factory-071e368a.zip"

And verify its checksum:

   1     sha256sum "sargo-sp2a.220505.008-factory-071e368a.zip"

It should be equal to the SHA displayed on the page: 071e368a127ce5a3c553f8b717895eaf1e44dec78971dc4c80baa7237d2d37f1

Extract the contents:

   1     unzip "sargo-sp2a.220505.008-factory-071e368a.zip"

CalyxOS

Pixel 2

Device model is officially not supported anymore. Fortunately for us, the link that was removed from the website pointing to the factory image is still active:

https://www.reddit.com/r/CalyxOS/comments/v269yp/pixel_2_image/

   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"

Pixel 3

   1     curl -LO "https://release.calyxinstitute.org/blueline-factory-22309000.zip"

And verify its checksum:

   1     sha256sum "blueline-factory-22309000.zip"

It should be equal to the SHA displayed on the page: 96d27caf3ed4e3be5dc922da6c406a54a32bb3c0f6a52c89a4f6d5cdd9a38e49

Extract the contents:

   1     unzip "blueline-factory-22309000.zip"

Pixel 3 XL

   1     curl -LO "https://release.calyxinstitute.org/crosshatch-factory-22309000.zip"

And verify its checksum:

   1     sha256sum "crosshatch-factory-22309000.zip"

It should be equal to the SHA displayed on the page: d675cc88632c15c4c06c4d25a1064d090f7d5eb1b86a8f241b4693391b8da55b

Extract the contents:

   1     unzip "crosshatch-factory-22309000.zip"

Pixel 3a

   1     curl -LO "https://release.calyxinstitute.org/sargo-factory-22309000.zip"

And verify its checksum:

   1     sha256sum "sargo-factory-22309000.zip"

It should be equal to the SHA displayed on the page: 3d3995180c7abd482b05c68ef534a08b4e5d2ee801db150a07e36345748a9f90

Extract the contents:

   1     unzip "sargo-factory-22309000.zip"

Enable OEM unlocking

If not already unlocked, OEM unlocking must be enabled from within the OS.

For that, Developer options must be enabled:

SettingsAbout Phone → tap Build Number 7 times

Now, OEM unlocking can be enabled from within the Developer Options:

SettingsSystemAdvancedDeveloper OptionsOEM 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:

SettingsSystemAdvancedDeveloper OptionsUSB 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 may need 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

Execute:

   1     ./flash-all.sh

Once the script finishes, the device reboots into the system.

Pixel 3

Execute:

   1     ./flash-all.sh

Pixel 3 XL

Execute:

   1     ./flash-all.sh

The device will reboot into the bootloader a couple of times and then show the “fastbootd” screen while the partitions are being flashed.

Pixel 3a

Execute:

Select “Restart Bootloader” in the menu if nothing happens.

   1     ./flash-all.sh

May need to reboot into bootloader from the menu “Reboot bootloader” for the flashing process to begin.

CalyxOS

Pixel 2

Execute:

   1     ./flash-all.sh

Once the script finishes, the device reboots into the bootloader.

Pixel 3

Execute:

   1     ./flash-all.sh

Pixel 3a

Execute:

   1     ./flash-all.sh

May need to reboot into bootloader from the menu “Reboot bootloader” for the flashing process to begin.

The device will reboot into the bootloader a couple of times and then show the Google logo and the “fastbootd” screen after this while the partitions are being flashed.

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.

Activities/Android/UpcyclingWorkshops/FlashingGooglePhones (last edited 2022-11-14 17:25:02 by maxsc)