Normally I just download the developer image tarball, verify the checksum and extract it, boot my phone to the bootloader (volume down and power buttons), install android-tools on Fedora and run “fastboot oem unlock“, then run the “flash-all.sh” script from the image tarball, followed by “fastboot oem lock” once I get back to the bootloader.
With a Nexus 6P this has changed a little. First, the command is now “fastboot flashing unlock“ so you need the latest version of fastboot utility (which Fedora does not have). I did this by downloading the basic Android SDK tools only (android-sdk_r24.4.1-linux.tgz), extracting it and running the SDK Manager (./tools/android binary), and installing latest SDK Platform Tools.
Then I could run fastboot to put boot it to bootloader:
sudo ./platform-tools/fastboot reboot bootloader
I also needed to use the new fastboot to flash the default, and the flash-all.sh script from the developer image uses fastboot from the user’s PATH.
In Fedora fastboot is installed to /usr/bin/fastboot but also /bin/fastboot – a user gets the former, root gets the latter, so I moved both of these out of the way and copied in the fastboot binary from
sudo mv /bin/fastboot{,-fedora}
sudo mv /usr/bin/fastboot{,-fedora}
sudo cp ./platform-tools/fastboot /bin/
sudo cp ./platform-tools/fastboot /usr/bin/
Secondly, once you have that the flash-all.sh script still fails with a cryptic message about being unable to remotely unlock.
You need to also boot the phone to Android, activate developer settings (by browsing to Settings -> About Phone and tapping on build 7 times) and then under Settings -> Developer options turn on the option to allow OEM unlocking.
Now I was finally able to flash the phone.
sudo ./flash-all.sh
Boot back to bootloader and re-lock.
sudo adb reboot bootloader
sudo fastboot flashing lock
Hope this helps someone else out there!
One thought on “Flashing developer image on Nexus 6P (and maybe 5X)”