Thursday, January 14, 2016

How to install an Android 5.1.1 and 6.0 update to your Nexus 5 phone: Mac-specific instructions

I have a Nexus 5 phone with FreedomPop, which uses the Sprint network.  This phone constantly downloads Android updates, and the updates always fail because Freedompop altered the ROM. 

I found these very good instructions on how to load an Android update on the Nexus 5 phone.  I am sure that these instructions apply to other Android phones if you are trying to load an Android update manually for some reason.  I have written the below down to make the process more clear for Mac users.

The first thing you want to do before updating your phone is to backup your Android.  I consulted several forums and posts before realizing that there's not any one good way to back up your entire Android phone in one pass.  Instead, you have to use a few different procedures to back up your phone -- and even then, you will miss something, most likely.  The instructions below are for Macs. 

1.  Backup your phone and video files: When you attach an Android phone to a Mac, nothing happens.  This is different from a Windows machine, which recognizes and mounts the Android phone as a drive. 

a.  Transfer your media files: You must therefore use a utility/app called Android File Transfer when attaching an Android phone to your Mac.  Once you've installed this program, AFT will show you the various folders on your phone.  I discovered that this did NOT work with one micro-USB cable, and it DID work with another micro-USB cable.  So the quality of the USB cable determines whether your Mac will even see the phone. 

Once your phone is connected, you will see the contents of your Android phone.  It will look something like this.  The problem is that I don't believe you are seeing all the important files this way.  You are not seeing passwords, Google accounts, various settings, etc.  I use this utility only to put in or back up video and still image files into the folders DCIM (for still images), Download, Music, and Movies.

Here are the contents of an Android phone as shown by Android File Transfer for the Mac

(After updating from Android 5.0 to Android 6.0, AFT did not work properly.  I had to unlock the screen (go to the main home page of my phone) and then swipe down from the top notification bar.  I then selected "USB for file transfer."

b.  Backup and restore your Google settings.  This page explains this better than I can:

I believe, but I could be wrong, that this takes care of backing up most of the data for your phone. 

One note: when researching how to back up my Android phone, I came across several web pages touting Wondershare MobileTrans as a backup solution.  Don't fall for this scam.  Wondershare MobileTrans sucks! 

The app might work, but it is terrifically sneaky.  You can download it as a trial, and then you can use it as a trial to store all your data into a backup file.  However, this app hides its costs until you decide to buy -- and you aren't going to buy until you need the data that it has.  Only then do you find that it will cost you $39.95 to get your data back.  The trial version takes all your contact data and other data, and then when you try to restore, you only get 5 contacts -- NOTHING else -- of your data back.  Using it as a trial is a complete waste of time.  Take my advice and don't bother trying to back up your Android phone with this application. 

Now that you've backed up your phone, here are the instructions for updating your Nexus 5 or Android phone manually to a version of the Android OS.  I updated my Nexus 5 to Android 6.0 manually. 

Notice: I created this post (modified from the forum post above) to help you factory restore your phone. I am not responsible for incorrect firmware, unstable updates, or failed flashes. Proceed at your own risk!***

You have a Nexus! Google makes it easy to update than most. If you follow these steps, you will able to update your device for as long as Google supports it.

FreedomPop supports 3 Nexus devices: Nexus S 4G, Galaxy Nexus, and Nexus 5 (I have all 3). You will be able to re-download all your FreedomPop apps from the Play Store.

I am sure that you are on this page because you are wanting to update your FreedomPop purchased Nexus device. You will notice that when you turn your phone
on, there is an open lock under the word "Google". In order for FreedomPop to offer a phone that can use the Messaging VoIP phone/text app and to mass produce
it, the ROM has been altered to customize the experience. However, in doing so, the ROM is no longer updatable from the over-the-air. So, you cannot update to the latest version available for your phone. I will show you how to update it.

First the disclaimer: Although it is a slim chance, you can mess up your phone if you don't do this correctly. You are doing this because you want the newest
software. This is NOT supported by FreedomPop. Don't let this scare you too much. Most of the time, if you do mess up, you can get back to the bootloader to start over again. You have a Nexus, so it is highly unlikely that you will brick your device. Make sure your phone is FULLY charged. DO NOT ATTEMPT IF YOU SUSPECT A BAD CHARGING/USB PORT!!!!

Second: You will lose all data on the phone, including your pictures, music, documents, and anything else you have of value. Backup anything you don't want to lose to your computer or cloud service.

Third: This may be your gateway to rooting, modding, or installing other ROMs on your phone. The steps you learn here will make it easy to do that too!

Fourth: The files are big. If you are running out of space on your computer, you will need to free up 4Gb of space.


Step one: Download the files that you need
1. The Factory ROM
The instructions are mostly here:

I will try give you some tips to make it easier.
On the back of the Nexus S 4G and Galaxy Nexus and note the model number. For the Nexus 5 and above, there is no Sprint variant. On your computer, go to the link above and find your phone. For example, find the Nexus 5 (Note its codename is hammerhead. Remember that when you want to flash a different ROM). Then find the latest version, which as of July 2015 is 5.1.1 (LMY48B). Click the link and download to some place you can find. It maybe easiest to use the default Downloads folder. Unzip the file.

2. Get the Fastboot and ADB files:
These are 2 essential files that you will need to flash the ROM, or a recovery to flash a different ROM. The official way to get them, is downloading Android Studio and using it to download the Android Studio Development Kit (SDK). It is not efficient, but you  will download a 250Mb file and use almost 500Mb of space to get a couple of files less than 2Mb.

Go here: and download the Android studio for your computer operating system. Install the program and run it. Select the custom option and download only the Android SDK. Please make a note of the install location on that same page. You will need to go there to get the files you need.

Go to the install folder. Go to the SDK folder, then the "platform-tools" folder. If you did not note the location, just do a search on your computer for "fastboot". {You will have to search in Hidden files...also, if you have previously installed Android Studio for Android 6.1 for example, you may have to install the SDK Paltform for Android 5.1.1 again.  I found the adb and fastbook files under /Users/username/Library/Android/sdk and had to allow viewing of the Library file in View Options}. 

Copy the files "adb" and"fastboot" to the same folder as the unzipped ROM.

So in that folder, you should have:
adb and fastboot
bootloader file
image file
radio file
flash-all files

Step 2: Put your phone into FastBoot mode:

Here's the easy way:
Power off your phone.
Nexus S 4G: Press Volume Up and Power at the same time
Galaxy Nexus: Press Volume Up and Down + Power at the same time (If it says ODIN, try again)
Nexus 5: Press Volume Down and Power at the same time
For all other models, Google "Fastboot Nexus x"

At this point, your phone screen should show a drawing of the Android robot lying on its back, and the word Start at the top. 

The phone is now in Fastboot Mode (it should say this in red letter below the green Android robot)

Connect your phone to your Mac with a USB cable that you know works (I tested mine by make sure that Android File Transfer opened up and recognized my phone when I plugged in the USB cable. 

Now, open Terminal for the Mac.  (If you don't know what Terminal is, then you probably should not be trying to do this). 

Note: These next two items were not necessary for me, and they did not work.
Type (in Terminal): ./adb devices
It should start the daemon. Then it should list your phone as a string of characters then "device". If it does not, it is not connected correctly to your computer.
Next type: ./adb reboot bootloader

Step 3: Run the flash all script file:

For those that did it the easy way, you now need to get into the Command Line in Windows or the Terminal in Mac or Linux. Make sure your phone is plugged into your computer with your USB Cable and in bootloader/fastboot mode. (Fastboot mode is described in step 2). 

Mac: In Finder, note the entire path of where the Factory ROM folder is. Press control then click your mouse on the containing folder. Click "Get Info". Highlight under General what it says in "Where:". For example, if you used the default Download folder, it could say /Users/YourName/Downloads/hammerhead-lmy48b

Now you need to adjust the "" script.
In Finder, click on the install folder. Press the control key on your keyboard and click with your mouse "". It will give you a menu. Click "Open With" and select "TextEdit".

You will see a bunch of "#" lines and then "fastboot flash....". All lines that start with "fastboot" add a "./" just before it. It will look like "./fastboot flash...". Do that for EVERY line that begins with "fastboot". You do not need to alter the lines for "sleep". Save the file and proceed.

In Spotlight (the magnifying glass at the top right). Type "Terminal" and click on it.

In the terminal window, type cd + the path that you noted above
Example: cd /Users/YourName/Downloads/hammerhead-mmb29s

This is the final step:
Mac: ./

DO NOT TOUCH YOUR PHONE. Let it reboot into the operating system you just flashed. Be sure to wait until everything is finished -- it takes about five minutes, and the messages on the bootloader screen will be confusing.  Be patient.  My advice is to go do something else for five to ten minutes rather than look at the phone.

After perhaps four minutes, the phone will reboot.  You will see various colored balls on the screen that finally spell the word "Android" after another three minutes.  It is safe to remove your phone from your Mac when the phone has powered on and you see a Welcome screen.  Until then -- don't touch the phone!

No comments: