Monday, March 30, 2015

Flashing a Nexus 6 with the latest version of Android

I was trying to follow the directions listed here (Google's factory images) for updating my Nexus 6 to the latest Android build and I kept getting an error about the zip file not containing system.img. Well it appears that there is a limitation into the memory size that fastboot will let you use and the flash-all.bat file supplied in the download from Google surpasses that memory limit causing the issue.

I was able to fix this by doing the following:
1) after downloading and unzipping the factory image from Google, you will see another zip file inside. Extract all those files into the same directory:
2) Create a new bat file called flash-it.bat, copy paste the following into that file:
:: Copyright 2012 The Android Open Source Project
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: See the License for the specific language governing permissions and
:: limitations under the License.

fastboot flash bootloader bootloader-shamu-moto-apq8084-71.08.img
fastboot reboot-bootloader
ping -n 5 >nul
fastboot flash radio radio-shamu-d4.0-9625-02.95.img
fastboot reboot-bootloader
ping -n 5 >nul
fastboot flash system system.img
fastboot flash userdata userdata.img 
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot erase cache
fastboot flash cache cache.img
echo Press any key to exit...
pause >nul
3)Navigate to the directory you downloaded the files to and run flash-it.bat

4) use the volume up/down buttons untll you see "Recovery" , then press the power button

5)on the screen with the dead android press  power button then volume up

6)Select "Wipe data/factory data reset"

7)choose reboot

8) celebrate! because it may take a while on the swirly colored balls screen.