[Mac] Sideloading updates to a Nexus using ADB

srkmagnus

Retired Moderator
May 23, 2010
13,434
210
0
Visit site
[INFO]This guide is meant for Users with little to no experience using ADB and want to sideload an update to the Nexus 5 using a Mac. If you have sideloaded an update before this may also serve as a refresher before applying the update manually. Although the process is essentially the same as a Windows PC, I believe having a Mac dedicated guide helpful to Users not comfortable following a guide written for another platform, such as Windows.[/INFO]
Before we get started, let's cover a few things that you should know:
  • All commands entered into Terminal must be preceded with ./ (dot, forward slash).
  • For clarification, brackets will be used to describe what you need to do. I will only use the brackets < > for the first part of the guide for informational purposes only. For example:
    Code:
    ./adb<insert space>devices<press enter>
  • The second post will include frequent questions and answers that have come up throughout the forum with regards to sideloading.
  • This guide assumes you already have the Android SDK installed and have enabled USB Debugging. For reference, you can enable USB Debugging by opening System Settings > About Phone > tap ?Build Number? seven (7) times. There will be a prompt which tells you how many more times to press it and will inform when the developer options are made available after the 7th tap. Enable USB Debugging by selecting the options.
  • Files should be downloaded and kept as .zip files. Do not decompress the files as the resulting folder will not allow you update.
With that out of the way, let's run a quick check to make sure ADB recognizes our device. Now is the time to connect the device with USB and enable USB Debugging.

Open the Terminal application and "change directory" to the platform-tools folder.
Code:
cd<insert space>/User/johndoe/android/sdk/platform-tools<enter>
cdplatform-tools.png


[NOTE]The location of the platform-tools folder is where you saved the SDK during installation. Refer to the save location, or if necessary, open a finder window and open the platform-tools folder. Right click (control+click) any folder or file inside platform-tools and select "Get Info". In the pop-up window look under General and refer to "Where". Highlight the entire destination and copy it (it should end in /platform-tools).
[/NOTE]
getinfo.png
In Terminal, type the following:
Code:
cd<insert space><paste/type platform-tools location>
This means that we are now in the platform-tools directory and every command we run from now on will allow us to use ADB and push the necessary update files to the device. Let's check to see that our device is being recognized by typing the following into Terminal:
Code:
./adb devices
terminalcommands.png
Terminal should return the device that is connected as a series of numbers and letters. If nothing happens, you get an error or a directory not found error then go back and check that you have "cd" into the right directory.

Once the device is recognized we can start sideloading. On your Mac, download the update and "save-as" into the "platform-tools" folder of the SDK. As of 12-11-13, going from 4.4 to 4.4.2 can be downloaded here: http://android.clients.google.com/p...ed-hammerhead-KOT49H-from-KRT16M.b3d1f307.zip
I'd suggest renaming it to something easier to handle, such as 4.4.2-update.zip, OTA1.zip, etc. Next, we want to reboot the device to the bootloader by typing the following into Terminal:
Code:
./adb reboot-bootloader
Give the device a second to display the bootloader (Android laying down with a lid open) then use the volume buttons to select Recovery and accept with the power button. The device will reboot into Recovery and will display the same android as the bootloader, except it will also have a red triangle with exclamation mark. You can get the Recovery menu by holding power and pressing volume up immediately after then release volume up (while holding power) to see the list of menu options. Using volume buttons, move down to "apply update from ADB" and accept with the power button.

The next screen will say the following at the bottom:
Now send the package you want to apply to the device with "adb sideload <name of file>"...
We need to type that command in Terminal:
Code:
./adb sideload 4.4.2-update.zip
If successful, you'll see Terminal and the phone display information of sending/receiving the update package. There is nothing for you to do at this point except to watch both the computer and device finish the update and wait for the device to reboot. When the device reboots open Settings > About Phone and scroll down to see "Android Version 4.2.2".

A big thank you goes out to Jerry for his Update Your Nexus Tablet Guide and 2defmouze for the Nexus 4 Factory Restore Guide. Both were used as a reference for sideloading my first update to the Nexus 5.
 
Last edited:

srkmagnus

Retired Moderator
May 23, 2010
13,434
210
0
Visit site
Re: [GUIDE][Mac]How-to Sideload updates using a Mac

This post will include frequently asked questions and other resources worth sharing. It will be updated as new information is provided to share.

Links:
4.4 to 4.1 OTA Update
4.4.1 to 4.4.2 OTA Update
4.4 to 4.4.2 OTA Update
Factory Images
Android SDK

Frequently asked questions or answers I have come across on the forums:
1. On a Mac, commands are given in Terminal: Applications > Utilities > Terminal. (Thanks TWYF!)
2. In Terminal "cd" is the prefix command to select location, or "change directory". (Thanks TWYF!)
3. In Terminal "./" must immediately precede "adb". (Thanks TWYF!)
4. Safari automatically unzips "safe" files. Remember to "right-click" a file and "save-as" to keep the file zipped. Alternatively, you can just use Chrome. (Thanks TWYF!)
5. Terminal commands are case sensitive, so be sure to type commands in carefully, especially when you "cd" into the platform-tools folder.
6. If at anytime Terminal returns an error, or "directory not found", check that you are still "cd" in the platform-tools folder.
 
Last edited:

srkmagnus

Retired Moderator
May 23, 2010
13,434
210
0
Visit site
Re: [GUIDE][Mac]How-to Sideload updates using a Mac

Feel free to ask questions, discuss or comment. I may modify the guide based on User feedback, so input would be much appreciated.
 

Sam W1

New member
Oct 28, 2015
1
0
0
Visit site
When I type ./adb sideload <filename>, I get the response: * cannot read 'sideload' *, what do I do?
(I am still "cd" in the directory and have tried this 3 times and get the same response)
 

Forum statistics

Threads
943,167
Messages
6,917,623
Members
3,158,858
Latest member
AmeliaRodriguez