So Google’s big Android 5.0 release is finally here after a week of delays. Android 5.0 Lollipop is now officially rolling out to the Nexus line devices. However, the roll-out is in batches so it could be as long as three weeks before you get your over-the-air (OTA) update.
If you’re impatient like I am, you’re going to want to manually install the update rather than wait for it to show up in a device update.
The following will get a factory Android 5.0 Lollipop image installed on your Nexus device in minutes.
WARNING: Manually updating your firmware can and probably will wipe all user data, including files, from your device. Make sure to back up your device before proceeding with this guide.
You should note that only the following devices will be able to be updated to Android 5.0 Lollipop from Android 4.4 KitKat using a factory image:
With this in mind, head over to the official Google website and download the appropriate image. For anyone who has been keeping up with my articles, you’ll know I’m a Linux guy, so these instructions are geared towards people running Ubuntu Linux.
This tutorial assumes that you have already installed the Android SDK on your machine and configured it in your PATH. The Android SDK contains ADB and Fastboot, which are essential to this upgrade process. If you’re unfamiliar with installing the Android SDK on Ubuntu, check out a previous post I did on the topic.
With the appropriate factory image downloaded, extract it and run the following with your device connected:
adb reboot bootloader
The above command will reboot your device to the bootloader. You can do the same thing using a key combination if you prefer. If you are using a Nexus 10 like I was, you can press the power + volume up + volume down keys all at once when you power the device on.
If this is your first time manually flashing your device you’re probably going to need to unlock the bootloader. This can be done by running the following with your device booted into the bootloader:
fastboot oem unlock
If your computer complains and says « waiting for device » then you must do all this as a root user (sudo). However, the PATH for sudo is generally not the same as the host user. You may have to run the command like the the following:
sudo /opt/android-sdk/platform-tools/fastboot oem unlock
Note that /opt/android-sdk is where I keep my SDK. Your path might be different, or you may not suffer from the « waiting for device » problem that I did.
It is now time to flash your device with Android Lollipop. With your device connected and on the bootloader screen, run the following from the extracted factory images directory:
./flash-all.sh
If you’re experiencing the « waiting for device » message that I did, you’re going to need to run this with sudo as well. However, you’re going to need to modify the file first. Open the file with your favorite text editor and make it look like the following:
/opt/android-sdk/platform-tools/fastboot erase boot
/opt/android-sdk/platform-tools/fastboot erase cache
/opt/android-sdk/platform-tools/fastboot erase recovery
/opt/android-sdk/platform-tools/fastboot erase system
/opt/android-sdk/platform-tools/fastboot erase userdata
/opt/android-sdk/platform-tools/fastboot flash bootloader bootloader-manta-mantamf01.img
/opt/android-sdk/platform-tools/fastboot reboot-bootloader
sleep 5
/opt/android-sdk/platform-tools/fastboot -w update image-mantaray-lrx21p.zip
Note that my Android SDK is found at /opt/android-sdk. If your SDK is installed elsewhere, make sure your path matches.
With the file modified, run the following:
sudo ./flash-all.sh
Android 5.0 Lollipop will begin installing. It should take around 5 to 10 minutes to install and then 5 to 20 minutes to configure when it reboots.
If you care about security, you will want to lock your bootloader when everything is complete. This can be done by running the following:
fastboot oem lock
Remember that you may need to use sudo.
If everything went well, you should now have the latest version of Android, leaving everyone you know waiting for the OTA update.