How To Install Android 5.0.2 on Nexus 7 2012 From Mac OS X

Breathe some new life into an old tablet.

I still have a Nexus 7 2012 which is still a great tablet. In fact in many ways it is better than newer versions of the Nexus line because it’s been hacked many, many ways and can be charged simultaneously while hooked to a hard drive or a 3G cellular dongle. Perfect for in dash installation in a car.

Anyway the Nexus 7 was shipped with Android 4.2 and now Android 5.0.2 is available. This seems to be the first really stable version of Android

The first step in the process is to install ADB and Fastboot in the Mac.

Go to this website and download the file and actually read the README file.

These are the directions:

How to run on Mac OS X
Run ADB Install Mac.sh from Terminal (/Applications/Utilities/Terminal.app) and then restart Terminal. If you wish to uninstall, simply run Uninstall ADB.sh ADB and Fastboot will be moved to /usr/bin/

Once ADB is installed that is most of the battle.

Now download the Google Factory image from here. Make sure you get the file under the section “nakasi”. Get the 5.0.2 (or whatever is more current).

You also need a custom recovery if you want to root the device. And you do want to root the device. I use Team Win Recovery Project (TWRP). Go here for the file. Go to the last file on the page which is always the latest version.

And lastly you want the SuperUser file to root the device. Go here for that. The download link is on the bottom of the page. Once you have all of these files you can proceed.

All my files are in my Download folder.

Screenshot 2015-01-02 18.43.16

Double click on the file that starts with “nakasi” to unzip it.

Screenshot 2015-01-02 18.47.33


Take that folder and type

cd (then add a space)

and just drag and drop it into the Terminal program

Screenshot 2015-01-02 18.50.26

Now type

ls

Screenshot 2015-01-02 18.51.44

Now time to get your Nexus 7. Boot it normally and go into settings. Look for something called “Developer Options” If you don’t see it go to “About Tablet” and then go to the bottom to “Build Number”and tap it very fast 7 times. This unlocks the Developer Options Menu.

Screenshot_2015-01-03-06-24-52

Now go to Developer Options and make sure “Android Debugging” (or it may be called “USB Debugging”) is enabled by putting a check in the box.

Screenshot_2015-01-03-06-25-05


Now start your Nexus 7 by holding down the power and volume down button and you’ll boot into recovery. You’ll see a little green Android guy on his back with his stomach plate open. Next step slicks the device.

WARNING: YOU ARE ABOUT TO COMPLETELY SLICK YOUR NEXUS 7 AND LOSE EVERYTHING. ANYTHING IMPORTANT YOU BETTER BACK UP FIRST.


Now hook the Nexus to your USB and type

NOTE: IT IS POSSIBLE THAT NONE OF THIS WILL WORK UNLESS YOU UPDATE YOUR BOOT LOADER TO VERSION 4.23. I found directions here:

Or do this:

Download the boot loader from my website
here (or follow the directions on the link above)

now open Terminal from Applications > Utilities > Terminal

cd Downloads

ls

Screenshot 2015-01-03 08.46.43

See the file 4.23.img? Make sure you are connected by USB and restart the device in fastboot mode. Shut down and then hold Power + Volume Down until you see the Android guy. Now type in your Mac Terminal:

BUT WAIT! IF YOU REALLY WANT TO BE GEEKY, INSTEAD OF MANUALLY REBOOTING TYPE THE FOLLOWING AND WATCH THE SCREEN ON YOUR NEXUS 7

adb devices

You should get a pop up on the screen about USB Debugging, hit yes.

Then type

adb reboot bootloader

Ha Ha you’re a super geek and have no manly need for buttons on devices. Now back to business. Type:

fastboot devices

this will return a device number to let you know you are connected okay. It isn’t necessary but a good idea. Now type.

fastboot flash bootloader 4.23.img

And this will update your boot loader. Now you can proceed to the installation of Lollipop. Make sure you are in fastboot mode again (Power + Volume Down).

./flash-all.sh

Follow any terminal prompts and just wait. It will install Android Lollipop 5.0.2. Then boot the device. It will hang at the splash animation for maybe 10-20 minutes. Just let it be. This is normal.

Once it boots there are a couple different directions you can go. First direction is just leave it alone and use it. It works! Log into your Google account, download your apps, enjoy your tablet. If you bought a new one in the store with Android Lollipop on it this would be your exact experience. This state, that is.

If you want to root the tablet this is the time to do it. Rooting is like jailbreaking an iPhone although the Android community seems to encourage rooting whereas Apple isn’t too fond of the jailbreak.

Rooting allows you to do things like attach hardware, charge while using an OTG cable (with the right kernel installed) and run apps like Tasker, and backup programs like Titanium Backup Pro which are very powerful programs. Bottom line is this. If you are a power user you want root. If you aren’t, no need.

Okay lets assume you want to root. (Hurray!) Do this.

Go back to your terminal program. If you never closed it do this:

cd .. (cd, space, dot, dot)

ls
Screenshot 2015-01-03 06.47.29

Your TWRP openrecovery file is there. Now to flash that you need to type:

fastboot flash recovery recoveryfilename.img

Which in this case will be this. (if your version is different make sure you match the filename exactly when you type. First you have to put your device back in fastboot mode. You’re probably looking at a screen that says “Welcome” and lets you select the language. Hold the power key and shut down and reboot holding Power + Volume down to get back in fastboot mode. Then type:

fastboot flash recovery openrecovery-twrp-2.8.3.0-grouper.img

Screenshot 2015-01-03 06.53.13

Now hit start by pushing the power button once. The Nexus 7 will reboot. Now you probably should set up your device with your Wifi, your name and Google password.

Now in your Mac double click the file that starts CF-Auto-Root and that will unzip it and make this directory

CF-Auto-Root-grouper-nakasi-nexus7

Type

cd CF-Auto-Root-grouper-nakasi-nexus7

now

ls

Screenshot 2015-01-03 07.09.44

Now type

chmod +x root-mac.sh

then reboot the tablet into fastboot mode. Shut down, then Power + Volume Down, then type

./root-mac.sh (note the period before the slash)

Follow the prompts and then watch it root your device.

DONE! You have just installed Android Lollipop, a custom recovery, and rooted the device. Congrats. Check root by going to the Google Play store and installing Root Checker or Root Checker Pro.

Screenshot_2015-01-03-07-18-30

Yer a real ‘Murican. Enjoy.