Flash Android on Pixel Phone

the only way to truely wipe a mobile phone is by reflashing the os.
Fortunately for pixel phones google has made this super simple. This is the reason i bought the pixel phone as it seems to be one of the few phones where a complete reflash is available.
Factory reset is not enough.
Factory Reset ( despite its name ) simply wipes the user data partition and nothing else.
Malware can potentially still exist in the system partitions, through an exploit that harnessed priviledge escalation or if someone had physical access to the device, rooted it, installed malware and unrooted it, at least thats my thinking anyway. There is talk of partition verification via hashes, i dont know how reliable this is.
ultimately the golden rule
once someone has had physical access to the device - all bets are off.


this blog will cover windows to start, i'll update later to include linux and macos, although the process will be similar.

ADB Tools

first we will need adb tools from
https://developer.android.com/tools/releases/platform-tools

unplug phone from computer usb

this helps later when usb debugging is enabled to find the device in device manager easily

Remove Google Account

I dont think this step is strictly necessary, the oem unlocking below is enough, buut, ive been burned before by googles FRP ( factory reset protection ) and bricked a perfectly good mobile phone because i hadnt taken note of the google account and password, and then it asked for it.

* its advisable to perform a factory reset here really, then just skip through the options to get to the home screen.

Enable Developer Options

We need to enabled developer options to be able to perform oem unlocking and allow usb debugging
its an option in the developer settings menu

  1. settings -> about phone
  2. tap build number 7 times
Enable USB debugging

We need to enabled usb debugging, this allows us to install the google usb driver below

  1. settings -> system -> developer options -> enable usb debugging
Enable OEM Unlocking

we need to enable oem unlocking that will allow us to unlock the bootloader

  1. settings -> system -> developer options -> oem unlocking
    toggle option to on
plug phone into computer via usb

now we can install the google usb driver

Windows Requires USB driver

https://developer.android.com/studio/run/win-usb

open device manager, find the pixel device, this can be a bit tricky, try [ universal serial bus devices ]

  1. right click the device
  2. select update driver
  3. browse my computer for drivers
  4. let me pick from a list of available drivers on my computer
  5. select have disk
  6. navigate to where you unzipped the usb driver
  7. select file android_winusb.inf

the android device should now be recognised and available under
device manager -> Android Device

Power Off the Phone

press and hold the power button, tap shutdown
sometimes volume up and power button if ai assistant is enabled

Boot into Fastboot

press and hold the volume down button and then press the power button

when in the fastboot screen, you should see something that says
bootloader : locked ( unlockable )

Unlock the Bootloader

goto a terminal window, cd to where you unzipped the adb tools, run

./fastboot flashing unlock

youre good to go.

Google Web "Android Flash Tool"

flash.android.com

  1. Grant access to ADB keys
    popups may be blocked by default, look in the address bar for an icon that allows popups to be enabled
  2. Click Add new device
  3. Select your Pixel
  4. Choose Image : Public – Stable (normal Android)
  5. Click Install

it requires a ~ 4 GB download, other than that its pretty quick