Android Marshmallow is finally here, which means that Google will be rolling out the update to all Nexus devices. Unfortunately that could take several weeks, and we know that many of you are too impatient to wait. Good news! Google has posted factory images for each Nexus device, so you can go ahead and update your device to Android 6.0 Marshmallow right now instead of waiting. We know this can be a little scary — especially for beginners — so that’s why we put together this comprehensive guide detailing each and every step of the way. You won’t find a more complete tutorial anywhere else. Updated on 12-09-2015 by Robert Nazarian:- Google released the 6.0.1 update, but you can still follow this guide to install the newest version on your Nexus device since the download link page is still the same.- Related: Everything you need to know about Android 6.0 Marshmallow Flashing the factory image differs from installing the over-the-air (OTA) update in that the factory image contains the full system files for your device, whereas the OTA update contains only the upgrade information. In other words, flashing a factory image is more like completely deleting all the software on your device and replacing it. The OTA will only replace what is being changed since your last update. Some people prefer to install the OTA update since you don’t have to do a factory reset, while others like the factory image method because it’s like starting from scratch with a fresh install of the entire system. It’s more of a pain to factory reset your device, but you are less prone to some of those annoying bugs that seem to crop up after an OTA update. If you would rather download and install the OTA update, we have a complete guide for that method as well. *We will provide a link to this guide as soon as the OTA download links become available . If you want to flash the factory image, then you’re already in the right place. Just remember to make sure all your data is backed up, because you will lose all your data on the device when you unlock the bootloader, which is required for flashing. There is no way to unlock a bootloader without a factory reset. However, if you happen to already have an unlocked bootloader, then you can forgo the factory reset if you wish. We will show you how later on, but we still recommend that you back up your data in case something goes wrong. Click on a link to jump to a topic: Installing ADB and Fastboot Download the Android Marshmallow system image Extracting the contents of the system image Enable USB debugging and connecting your Nexus device via USB to your desktop Flashing the Android Marshmallow factory image Next Page: Installing ADB and Fastboot Installing ADB and Fastboot In order to flash the factory image to your Nexus device, you must have ADB and Fastboot installed on your desktop computer. ADB stands for Android-Debug Bridge, and it allows you to send commands to your Android device over USB through a terminal/command-line interface such as Windows Command Prompt. Fastboot allows you to unlock the bootloader on your Android device. There are two methods to getting ADB and Fastboot on your computer. The first is to-download and install the Android SDK tools-from the Android developer site.-This method will work on Windows, Mac, and Linux machines. If you’re a Windows user, you can-download and install Minimal ADB and Fastboot-instead, which is actually the easiest method. However, we recommend installing the Android SDK tools because the download will also give you the Google USB drivers at the same time, which you will need in order for your computer to recognize your Nexus device. If you do decide to install Minimal ADB and Fastboot, you can still download the Google USB drivers separately. We will show you how to do that later. Follow the instructions below for either -installing the Android SDK tools or Minimal ADB and Fastboot. Download and install the Android SDK tools Click here to download and install the Android SDK Tools from Google’s developer site. There are choices for Windows, Mac, and Linux. These instructions are for Windows machines. When asked what directory to install the software to, we recommend that you set it to C:\android-sdk. -If you choose a different location, just make sure you remember it. Once the Android SDK Tools are installed, launch the download from the Start Menu. The SDK Manager will open. Just uncheck everything except Android SDK Platform-tools and Google USB Driver . Android SDK Platform-tools is at the top and Google USB Driver is toward the bottom. Click on Install 2 packages at the bottom right. Check Accept license and click Install . ADB and Fastboot will now reside in the C:\android-sdk\platform-tools folder if you followed step 2 as outlined. If you chose a different directory, than ADB and Fastboot will reside in the \platform-tools folder under whatever location you chose to install the Android SDK Tools to in step 2. Download and install Minimal ADB and Fastboot Click here to download minimal_adb_fastboot_v1.3.1_setup.exe from the XDA forums. Note: the version number could be different if a newer version is released after this post has been published. Launch the- minimal_adb_fastboot_v1.3.1_setup.exe file. When asked which directory to install the software to, we recommend that you set it to C:\android-sdk\platform-tools , since we will be using that location for the rest of this guide.-If you choose a different location, just make sure you remember it. Next Page:-Download the Android Marshmallow system image Download the Android Marshmallow factory image system image Now it’s time to grab the most recent update of the Android Marshmallow factory image, which is available at-Google’s Android Developers site.-Just make sure to select the version that matches your device. This is very important, because you must flash the Nexus 5 image on a Nexus 5. A-Nexus 6 image won’t work on a Nexus 5. You will notice that each device has a bunch of links under it. Google makes it easy to revert back to an older update if you wish. The most recent update is generally at the bottom of the list. As of the time of this post, Android Marshmallow 6.0 is only available for the Nexus 5, Nexus 6, Nexus 7 (2013) Wi-Fi, Nexus 7 (2013) LTE, Nexus 9 Wi-Fi, Nexus 9 LTE, and Nexus Player. It remains to be seen if Google will issue the update to the Nexus 4, Nexus 7 (2012), or the Nexus 10. Note: Google will post factory images for each and every update moving forward. This means that you can follow this guide again and continue to get the latest version of Android Marshmallow right away without the need to wait until your device receives the OTA update automatically. Next Page:-Extracting the contents of the system image Extracting the contents of the system image The downloaded file should have .tgz as its extension, and you need to extract the contents before going further. The best thing to do is download and install 7 Zip. There is an unofficial version for Macs as well. Once 7 Zip is installed on your machine, follow these steps: Open the 7 Zip File Manager and navigate to the folder that you saved the .tgz file in. Double click on the .tgz file. You will now see a file with a .tar extension. Double click on this file to show the contents (this will take about a minute or more). After it has opened, you should have a folder with the codename of your device as part of the title (ex.- hammerhead for Nexus 5), Double click on it. You should now see a collection of files. Select all of them, and click on Extract to extract all the contents. Type in the destination C:program files (x86)androidandroid-sdkplatform-tools (if you installed the full SDK) or whatever directory ADB and Fastboot are installed in. Next Page:-Enable USB debugging and connecting your Nexus device via USB to your desktop Enable USB debugging and connecting your Nexus device via USB to your desktop Now you need to make sure USB debugging is enabled on your Nexus device. Open Settings on your Nexus device. If -you do not see Developer Options toward the bottom of the Settings screen on your device, follow these steps to activate them. Tap on About Phone and find the Build Number . Tap on the Build Number -seven times and the Developer Options will appear on the main page of the Settings . Tap on the Back key to see the Developer Options . Tap on Developer Options . Check to enable USB Debugging . Before you connect your device to the USB port on your computer, you want to make sure you have the appropriate drivers installed. You should be all set if you opted to install the Android SDK Tools. If you instead chose to install Minimal ADB and Fastboot, you can grab them here. Since you’re working with a Nexus device, you specifically want the Google USB Drivers. The download will be a zip file, so extract the contents where you wish, and remember the location. Now connect your device via a USB cable, and you are ready to flash the zip file that you extracted earlier. If you’re connecting your Nexus device to your computer for the first time, you will get a popup box on your Nexus device stating what the computer’s RSA Key is. Just check Always Allow - From This Computer and tap on OK . If your Nexus device doesn’t show the RSA key popup, then open the notification panel, select USB For Charging Only , and change the mode to Transfer Photos ( PTP) . If your Nexus device still doesn’t show the RSA key popup, then follow these instructions: On your Windows desktop, go to your Control Panel then Device Manager . You should see your Nexus device -under Other Devices with a Yellow ! mark on it. Right-click on it and select- update driver . Choose Browse my computer for driver software , and choose the directory where the Google USB Drivers are located. If you chose to install the Android SDK tools and followed our instructions, they should be in the- C:\android-sdk\extras\google\usb driver folder. If you chose to manually download the Google USB drivers, just navigate to the folder that you archived the contents of the Zip file in. If your Nexus device still doesn’t show the RSA key approval popup, then open the command prompt on your desktop and navigate to the folder where ADB and Fastboot reside. If you followed our instructions from the Installing ADB and Fastboot section, it will be in the C:\android-sdk\platform-tools folder. Just type cd\android-sdk\platform-tools at the command prompt in Windows. If ADB and Fastboot are somewhere else, just navigate to that location instead. Type “ADB devices” and you should get the following result: The RSA key approval popup should now be visible-on your Nexus device.-Just check Always Allow From This Computer and tap- OK . Type “ADB devices” again, and you should get the following result with a different device key: You are now ready to flash the factory image. Next Page:-Flashing the Android Marshmallow factory image Flashing the Android Marshmallow factory image If you’re device doesn’t have an unlocked bootloader, follow the instructions below.- This process will require a factory reset, so make sure you have your important data backed up . Open the Command Prompt in Windows or Terminal on a Mac and navigate to the folder that ADB and Fastboot are installed in. Again, if you followed our instructions from the Installing ADB and Fastboot section , it will be in the- C:\android-sdk\platform-tools folder. Just type “cd\android-sdk\platform-tools” - at the prompt in Windows. If ADB and Fastboot are somewhere else, just navigate to that location instead.-To make things easier, so you don’t have to type out long directories, you can also paste it by pressing ALT and the spacebar , then choose Edit before-selecting- Paste . If you’re using a Mac, you need to add the platform tools directory to your $PATH. In terminal, type “sudo nano/etc/paths” .- Now enter your password, go to the bottom of the file, and enter the full path of the “platform tools” directory. Hit control-x to quit and enter Y to save. The following ADB commands are for Windows machines. If you’re using a Mac, just add “ ./” before each command, for example: “ ./adb reboot bootloader”. Assuming you device is already connected to your computer via USB and USB Debugging is enabled, you need to re-start it in fastboot mode. Follow one of the two methods below. Option A may be preferable because it’s another confirmation that your computer recognizes your Nexus device. A) Type “adb reboot bootloader” B) Turn your device off, then turn it back on while holding down the relevant key combinations for your device. For many devices it’s Volume Up + Volume Down + Power . You can see what your device’s key combinations are here. Type fastboot oem unlock to unlock you device. As a final warning , this step will erase everything on your device. Type flash-all to install the bootloader, baseband firmware(s), and operating system. If you get a missing system.img error , then scroll down to bottom of this page for further instructions. This process could take several minutes, so it’s important not to power off or disconnect the device. Once it’s finished, your device will reboot and the latest version of Android Marshmallow will be installed. You can opt to re-lock the bootloader if you wish, but assuming you will do this again with a future update, you might want to leave it unlocked, so you don’t have to perform a factory reset again. If you do want to re-lock, just follow Step 2 above and change Step 3 to fastboot oem lock . That’s it. If your device already has an unlocked bootloader and you don’t want to do a factory reset and lose your data, follow the instructions below. Open the Command Prompt in Windows or Terminal on a Mac and navigate to the folder that ADB and Fastboot are installed in. Again, if you followed our instructions from the Installing ADB and Fastboot section , it will be in the- C:\android-sdk\platform-tools folder. Just type “cd\android-sdk\platform-tools” - at the prompt in Windows. If ADB and Fastboot are somewhere else, just navigate to that location instead.-To make things easier, so you don’t have to type out long directories, you can also paste it by pressing ALT and the spacebar , then choose Edit before-selecting- Paste . If you’re using a Mac, you need to add the platform tools directory to your $PATH. In terminal, type “sudo nano/etc/paths” .- Now enter your password, go to the bottom of the file, and enter the full path of the “platform tools” directory. Hit control-x to quit and enter Y to save. The following ADB commands are for Windows machines. If you’re using a Mac, just add “ ./” before each command, for example: “ ./adb reboot bootloader”. Assuming you device is already connected to your computer via USB and USB Debugging is enabled, you need to re-start it in fastboot mode. Follow one of the two methods below. Option A may be preferable because it’s another confirmation that your computer recognizes your Nexus device. A) Type “adb reboot bootloader” B) Turn your device off, then turn it back on while holding down the relevant key combinations for your device. For many devices it’s Volume Up + Volume Down + Power . You can see what your device’s key combinations are here. You will need to edit the flash-all.bat file that you extracted from the factory image, which should be in the same directory as ADB and Fastboot. Just open it with any simple text editor such as WordPad. You will see a line that starts with “ fastboot -w update…….. ” Just remove the -w from this line. The -w flag wipes your data, so removing it will obviously stop that from happening. Type flash-all to install the bootloader, baseband firmware(s), and operating system.-If you get a missing system.img error , then scroll down to bottom of this page for further instructions. This process could take several minutes, so it’s important not to power off or disconnect the device. Once it’s finished, your device will reboot and the latest version of Android Marshmallow will be installed. If you get a missing system.img error in Step 4 of either method, then follow these instructions Extract all the files from the .zip file, which happens to be one of the files extracted from the original .tgz you downloaded from Google. The Zip file name probably begins with “image.” There should be-various .img files within this Zip file. On top of this, you already have bootloader and radio .img files in the same directory. Just make sure all the .img files (from Zip file) and the ones that were already extracted are in the same directory as ADB and fastboot. Now you are going to flash each .img file separately. If you don’t have either one of the bootloader or radio .img files, don’t worry, not all devices need them. It’s also important to follow-this exact order.-At the CMD prompt and in the C:program files (x86)androidandroid-sdkplatform-tools -directory (if you installed the full SDK) or wherever ADB and fastboot reside. Remember,-add ./ before each command if you’re using a Mac. type fastboot flash bootloader [name of your file] .img type fastboot flash radio [name of your file] .img type fastboot reboot-bootloader type fastboot flash recovery recovery.img type fastboot flash boot boot.img type fastboot flash system system.img If your device is a Nexus 9, then also issue this command – fastboot flash vendor vendor.img Lastly, if you want, you can wipe the cache with this command – fastboot flash cache cache.img Now it’s time to enjoy your Android Marshmallow update. You can follow this guide again when Google issues its next Android Marshmallow update, so be sure to bookmark this page for later reference. If we missed anything, or if you have any other tips, please don’t hesitate to let us know in the comments.
More...
Bookmarks