The Nexus 7 Thread (Rooting and Dual Booting with Ubuntu Touch in 10 Steps)

Vyom

The Power of x480
Staff member
Admin
As one of the Android Commandments says: "Thou shalt not use thine nexus unrooted." I present to you step by step guide for rooting and dual booting your Nexus 7.

I bought Nexus 7 16 GB Wifi model from Flipkart a week ago. And I have to say, it is one of my most awesome investment that I ever did. I immediately started my research on rooting it so that I can unlock the true potential of this beast. Now I have installed Ubuntu Touch on N7 and its dual boot with Android. But I faced numerous challenges in doing so, due to lack of experience in this regard. I decided to document my research and finding so that other who may want to unlock the bootloader of N7 and want to flash Ubuntu Touch can do so easily.

But first here's some screenshots of the N7 running Jelly Bean.

*machinehappy.com/wp-content/uploads/2012/10/nexus7-2012-06-27-800-7.jpg​

Click Spoilers to view images :
Images are scaled down, click the image to open the image in its original quality

The Lock screen:
*i.minus.com/iZs63m3oyfVua.png

Home screen:
*i.minus.com/i1Z3uDzgDrtso.png

Home screen in Landscape:
*i.minus.com/ibcMyCP0MNhI7D.png

Notifications drop down:
*i.minus.com/iA8in5NKfPSNL.png

Settings drop down:
*i.minus.com/iUoEtkvMIRSD3.png

Running Jelly Bean:
*i.minus.com/ibnVLrwd5WjF58.png

App drawer:
*i.minus.com/ibnx9vjkUtYBY9.png

Data Usage Screen:
*i.minus.com/iY7Ph0CyWWRkk.png

Terminal and Stock Keyboard:
*i.minus.com/iKglgzn3ML7w1.png

About screen:
*i.minus.com/ibjuTPe1w9qCXI.png

Specs:
*i.minus.com/igbKJVWYjl98O.png

A few benchmarks on stock:

AnTuTu:
*i.minus.com/iBKm2rbYm1bP1.png

Quadrant:
*i.minus.com/iRaLQM4E5XAYm.png

Nenamark 2.4:
*i.minus.com/iH1o4zu7ILSJH.png

Neocore showed following error:
*i.minus.com/ibwXqEupipQewG.png

3D Mark scores:
*i.minus.com/iYeirP0XOxCJ9.png *i.minus.com/iilxfrSKFHhaa.png *i.minus.com/ijI7MLeaGcrK4.png

Rooting the N7 (Unlocking the bootloader):
You can live your life with N7 without rooting it. Or you can be awesome instead and do unlock it to get these features to work:
1. Ability to use an OTG cable to connect pen drives to the device, thereby overcoming the 16 GB (13 GB available actually) limitation.
2. Using a 3G dongle to let your device take advantage of 3G (which by default this device don't have)
3. Take advantage of apps that only works when device is rooted, like Titanium Backup and Cache Cleaner
4. Flash custom ROM's and/or Install Ubuntu Touch on your device (and be a part of an OS in the making!)

You can read this article that echoes my thoughts, until the part where he used a toolkit to root (I rooted the old fashioned adb way).
Here's How to Root the Nexus 7 - But Should You? | Android.AppStorm

Anyway, so how actually you root N7?
You can use the most popular Nexus Rootkit to do all kinds of stuff to your N7 including Rooting, flashing zips etc, but if you are geek like me, here is how to do it manually (and its way easier than you think):

1. First enable "USB debugging" on N7:
Goto settings -> About Tablet, and tap Built Number several times, until a message pops up below with the Google sense of humor: "Congratulations, You are not a developer." You have just enabled a menu option, "Developer Options" in settings. tap Developer Options, and then check mark "USB Debugging".

2. Disable MTP:
Now open Settings -> Storage. And find the option to go into "USB computer connection", and uncheck "Media Device (MTP)". This is necessary so that adb discovers the device (explained later).

3. Get Android Debug Bridge utility (ADB):
There are several methods to get ADB.
-> You can download it from here: Android SDK | Android Developers. Its a big download.
-> Or you can download the Nexus Toolkit from here: Nexus Root Toolkit v1.7.2 | WugFresh (file: NRT_v1.7.2.sfx.exe) and use the adb which the toolkit uses. (its a smaller download than downloading complete SDK).
-> Or you can simply get the SDK from the Omega DVD of Jan 2013 (its rare times like these that a digit DVD really helps!)

4. Install the Nexus 7 drivers on your PC:
I tried to install the drivers from the toolkit, and had a hard time doing that. The toolkit just wasn't able to help me install the right drivers, and I tried installing the alternate driver from the choices. It wasn't after a long R&D and many reboots of the N7, that a dialog box prompt on the device (shown in below screenshot). Once I allowed it, rest was easy.

*i.minus.com/ibecBGSqlG1FgI.png

5. Use ADB to root: (FINALLY)
Open command prompt with platform-tools as directory on prompt. And type the following commands to test if ADB is able to communicate with your device.

Code:
F:\Android\adt-bundle-windows\sdk\platform-tools>adb devices

Above command should result something like this:

Code:
F:\Android\adt-bundle-windows\sdk\platform-tools>adb devices
List of devices attached
015d8b3b4558260b        device

If you can't see above output, then you have to try installing the drivers again. Which you can do so from SDK Manager. Try selecting Google drivers from there. Once you *can* see it as a device, you would need to enter these commands from adb.

Following command will reboot your N7 to bootloader.

Code:
F:\Android\adt-bundle-windows\sdk\platform-tools>adb reboot bootloader

*i.minus.com/iptudQDAuabvk.jpg

Following command will actually root it. You will encounter a confirmation message on the device before its committed.

Code:
F:\Android\adt-bundle-windows\sdk\platform-tools>fastboot oem unlock
...
(bootloader) erasing userdata...
(bootloader) erasing userdata done
(bootloader) erasing cache...
(bootloader) erasing cache done
(bootloader) unlocking...
(bootloader) Bootloader is unlocked now.
OKAY [104.112s]
finished. total time: 104.112s

*i.minus.com/i4VF6gfOFpmjF.jpg
PS: After you root your device, you will also need to install Super User app, so that the apps can actually use the root status. Which you can install from the Play market.

Now you have your device rooted, and all the data from it should be erased and Nexus 7 set to factory setting. You can now use apps to use Pen drives and 3G dongles on it. But if you want to dual boot N7 with Ubuntu Touch, then continue further.
First an article on why shouldn't install Ubuntu Touch: 4 Reasons Why You Shouldn't Install Ubuntu Touch on Your Nexus | OMG! Ubuntu!
But since we are dual booting the Ubuntu with Android, the reasons stated above won't matter! ;)

6. Installing Custom Recovery (Flashing TWRP Multi ROM)
Using adb commands the next you need to do is to flash a version of TWRP recovery which is tweaked for MultiROM support. The file I downloaded was "TWRP_multirom_grouper_20131022.img" from here: [MOD][OCT 22] MultiROM v16a (fix SuperSU for secondary ROMs) - xda-developers, and used following command to flash it.

Code:
fastboot flash recovery d:\path-to-recovery\TWRP_multirom_grouper_20131022.img

7. Flash Kernel with kexec-hardboot patch (We are getting closer)
The next thing which is required to dual boot is to flash a Kernel with kexec-hardboot patch and the file varies by the version of Android you have installed on your N7. I flashed, "kernel_kexec_430.zip" (get from above link) from TWRP recovery's "Flash ZIP" option (not using adb).

8. Download Ubuntu Touch image (The Ubuntu Goodness!)
The final step is to flash the Ubuntu image from MultiROM, so that we can have dual boot. Latest built of Ubuntu Touch can be found here: Index of /ubuntu-touch/daily-preinstalled.

This steps requires to download two files and flashing them together from the Recovery. So I downloaded following two files:
trusty-preinstalled-touch-armel+grouper.zip, and
trusty-preinstalled-touch-armhf.zip.
(grouper is a code name for Nexus 7)

9. Copy the above files to device:
Next thing is to push these two files using adb commands:
Code:
adb push D:\path-to-first-file\trusty-preinstalled-touch-armel+grouper.zip /sdcard/
adb push D:\path-to-second-file\trusty-preinstalled-touch-armhf.zip /sdcard/

10. Flashing Ubuntu Touch (take a deep breath):
To flash these two files you will need to goto Recovery -> Advanced -> Multirom -> Flash files. And select both the above files. Flashing it takes a few seconds. And once its done, reboot the device from options.

*i.minus.com/iomx1WUHIr48v.jpg

Congratulations. If you have done everything correctly, you should have a multi boot menu when you reboot the device, from where you can select which OS to boot into. There should be two options, "Internal" which will open Android and other with the name of the file you flashed, which will boot into Ubuntu Touch. You can even rename these from the recovery and multi ROM menu. :D

Following are some images of Ubuntu Touch on my N7:

*i.minus.com/ibo7faL93ZBhvM.jpg

*i.minus.com/ibgoYQqrJTHCGp.jpg

*i.minus.com/iY0vVjvMaqt7l.jpg

*i.minus.com/ibo0fjCzVf1rpd.jpg
 
Last edited:

$hadow

Geek in making
I was thinking of writing a similar article but never got time to do so but a great job mate with the article.
 
OP
Vyom

Vyom

The Power of x480
Staff member
Admin
Thanks all of you. It was a really joyful journey to buy the Nexus 7 and messing with it.
I also bought OTG cable for N7 today in just Rs 50. And I tried playing videos from a pen drive. It works! :bananana:
And also a Huawei 3G dongle that will be activated by tomorrow. :D
 

ankush28

Bazinga
if sole purpose of rooting is only to extend memory by using externel PD/HDD then also have a look at *play.google.com/store/apps/details?id=com.homeysoft.nexususb.importer
 
OP
Vyom

Vyom

The Power of x480
Staff member
Admin
if sole purpose of rooting is only to extend memory by using externel PD/HDD then also have a look at *play.google.com/store/apps/details?id=com.homeysoft.nexususb.importer

Well, you missed other 3 great uses of rooting. But thanks for sharing that app. Didn't know we had a non root solution too.
But I don't think that such *paid* app is going to provide the flexibility to support any external storage device like rooting provides. Opening and viewing the contents of another storage device in the file manager application of your N7 is the way *I* like to browse files!
 

ankush28

Bazinga
Well, you missed other 3 great uses of rooting. But thanks for sharing that app. Didn't know we had a non root solution too.
But I don't think that such *paid* app is going to provide the flexibility to support any external storage device like rooting provides. Opening and viewing the contents of another storage device in the file manager application of your N7 is the way *I* like to browse files!

Buddy you are forgetting that N7 supports external flash drives/Dongle out of the box, there are lots of free apps available too ;) I have tried this in galaxy nexus and it works like a charm, however ubuntu touch is looking great...
I was just warning *newbies* to root that if they only want more storage then non-root solution is available too :)
 
OP
Vyom

Vyom

The Power of x480
Staff member
Admin
Buddy you are forgetting that N7 supports external flash drives/Dongle out of the box, there are lots of free apps available too ;) I have tried this in galaxy nexus and it works like a charm, however ubuntu touch is looking great...
I was just warning *newbies* to root that if they only want more storage then non-root solution is available too :)
:thumbs:

Portrait is actually landscape/

Fixed. :p TY.
 
OP
Vyom

Vyom

The Power of x480
Staff member
Admin
Using OTG cable with Nexus 7 (Questionnaire style):

Why use OTG cable?
You can use an OTG cable to attach following devices to your Nexus 7:
1. Pen drives
2. Memory card readers
3. External Hard Drives (not tested though)
4. 3G Dongle
5. USB Mouse and Keyboard

What is an OTG cable looks like?
Shown clockwise from top left: OTG Cable, Card Reader, Pen Drive, an Huawei 3G dongle (with Airtel connection).
Yup, OTG cable is that small. Some other variants of OTG cable also comes with no wire. Refer this.

*i.minus.com/iAiFCL1Q4DEwP.jpg

Can any OTG cable be used with Nexus 7?
I had some worries about this. So I thought to buy this OTG cable from flipkart. Some reviews says it works while others stated it doesn't. So I went to a local market. Bought the cheapest OTG cable in just Rs 50. And it worked flawlessly.

Requirement of using an OTG cable:
Nexus 7 should be rooted and SU installed. If you don't want to root your device, there is an alternative available. Goto Alternative.
So, after rooting, just install the following app: StickMount

There, now you are ready to use the features bestowed by a rooted device and an OTG cable. Yes, it was that simple. :thumbs:

Just attach the OTG cable with Nexus 7, and attach a pen drive or external storage to the other end. You should see a pop up about granting SU access to StickMount. Just grant it access, and the external storage should mount, on the location: /SDCard/usbstorage. You can open this folder to view all the files on your external storage, and use them just like it were on your tab.

Using 3G Dongle with Nexus 7:
To use a dongle with the tab requirements are:
1. Rooted with SU app installed
2. This app: PPP Widget
3. A compatible 3G dongle.
As per this post on XDA forum, following devices are confirmed as compatible to N7:
Confirmed Devices
Huawei
E1750
E1752Cu
E173s-1
E173-u2
E367
E3131s-2 GSM/HSPA+
EC156 CDMA with a couple of tweaks see this post
E160E

ZTE
MF190J**
MF190**
MF636**
MF626**

But if you already have a 3G dongle then just test if it works on a desktop Linux OS. And if it works then it should work with N7 too.
I was able to get my hands on a dongle model: Huawei E1731. It took a week to activate the 3G sim to start (due to my laziness).

When you have the OTG cable and a working 3G dongle, just attach the dongle to N7 using the cable. PPP Widget should detect it and show you the option to "connect it". But before connecting I had to set APN. So I went to Settings (from the widget itself). And set airtelgprs.com as the APN. Your APN vary and you may need to ask the correct APN from customer care. Thats it. I didn't have to set any other thing.
After that I just tapped, "Connect", and voila I could surf Internet through the dongle. :D Click Spoiler to see some states of PPP Widget:
*i.minus.com/ib0KtVUO5MMb02.png

And oh btw, about the last use of OTG cable. I tested a desktop USB mouse and a desktop USB keyboard with the tab. Both worked flawlessly. In mouse I could click any app using a mouse cursor that pops up. And through keyboard, I could use Alt + Tab to navigate recent application list, Excape to go back close any app and of course type to type anywhere where a Text field is there. It's Freaking Awesome! :bananana:

Alternative of rooting and still be able to use a Pen drive:
As stated by ankush28 above, you can use this paid app (Rs 216): Nexus Media Importer to browse multimedia content from your Pen drive. But it doesn't give the freedom of using the external drive like it does by accessing it "directly". Plus you may not use 3G dongle without rooting. As per this page you *can* use mouse and keyboard without rooting. However it doesn't mention an OTG cable. So I am not sure.

Only thing now remain is to buy a USB hub, and I could then use multiple devices, cause you know, there is just one MicroUSB on the device. :p

Coming up: Using WhatsApp on N7. Why? Cause you can do it.
 
Hey Capt. Vyom, i too am planing to get a TAB, i am in a fix, should i get the Rs20,300 N7 2013 or get the current Rs9,500 N7 ?
You see, my main area of "work" will be gaming (and some name sake study purpose)
I see awesome Tegra games come and go and i feel pissed when they cant run on swanky Snapdragon phones.
The 2013 N7 is a Snapdragon, so for the sake of pure gaming, is the 2012 version a better deal??

I am not a big fan of Full HD screens, cuz when i look at Xperia Z and Galaxy S3, i feel Galaxy S3 screen is better :( Despite having 1/4th resolution. I guess my eyes cant see beyond 300ppi and overbearing colors+deep blacks are my thingie.

However, in terms of TABs,my bro has a Galaxy TAB 3 (free from my bro's office) and in-law's iPad 2 (old one). The 1024X600 display on the Galaxy TAB 3 suxxxxxx. Any game looks like crap,dunno if its because the tab had a very bad GPU ..anyways, it has given me the feeling that games will look bad on 2012 N7 because its almost same at 1280X800.

So is the 2013 N7 a better deal in terms of visual quality in games? Is it worth the sacrifice of so many THD exclusive games? Is it worth the extra 11,000 bucks?

How is the lag and all? Galaxy TAB 3 lags like a cheap Micromax phone,despite the 1 GB RAM but the really ancient iPAD 2 with 512MB RAM runs butter smooth.

Can i play games in 2012 N7, minimize the game,check fb notifications and sms,answer a call, and then go back to gaming without the game closing?

Is the extra Rs3000 for extra 16 GB worth it ? Even with root+OTG availabilty? I dont want to carry a pendrive and that little OTG wire to my class...

Was planning to open a thread but i hope to get me answers here.
 
OP
Vyom

Vyom

The Power of x480
Staff member
Admin
@mikael_schiffer:

In terms of specs N7 2013 is only better than N7 2012 in every terms. And it reflects in benchmarks also, where scores of newer generation is higher than older.

BUT, there is difference between benchmarks and real world performance. And the 2012 model, despite being an older model, still outperforms 2013 talking in terms of value for money.

Having said that, I would have never bought an "older" generation if it weren't for the sweet deal that I got on Flipkart. So money is the only restriti that I nhad to respect.

Multitasking is one area where N7 2012 model is awesome at. There's no lag. Atleats none so which I notice. Even while switching between apps.
I did a test for multitasking. I started playing Subway Surfer. Jumped in mid air, went to home screen and started Asphalt 8. Played an entire race and just after it was finished, switched back to subway surfer. The game resumed from that. I did without closing Asphal 8 first. So I could switch betwen two different games without each other closing itself. I can't test beyond that! :D

Talking about HD screen, well for me more is better. So having an HD screen in 2013 model will be a great add on. But the screen and colors on N7 looks very clear to me. I can't compare it with other tabs since I don't have access to Galaxy tab or iPad.

But I don't think the extra 11000 can justify any improvement in screen clarity. But that's just me. I look for VFM products.

About OTG cable, well I think if you don't want to carry a ponytail then a 3G model is a must for you. :lol:

Also, I think you are confusing this tab for a phone. Since you talked about checking sms and answer a call? Nexus don't have GSM capability. So you can do none of that.

Lastly, I think if you are so demanding about features, I think you should get only new Nexus 7, 3G model and that too 32 GB one.

Or Nexus 5, if you planning to check sms and make a call. :p

Very nice article. Would help even any n00b in the are of rooting.

Good job.

Thanks man. My aim was to write a noob friendly guide. I think I have accomplished my target! :D
 
Last edited:
OP
Vyom

Vyom

The Power of x480
Staff member
Admin
Installing What's App on Nexus 7

"Finally" got down to write this.
Nexus 7 doesn't have GSM facility. So that means installing Whatsapp on N7 shouldn't be possible. But in my experience despite of it giving warning it installs straightforwardly. Here's my experience on how I migrated WhatsApp from my phone to Nexus 7.

1. Install WhatsApp on N7 from market or through APK file. But don't open the app yet.

2. Create backup of existing WhatsApp messages:
If you don't want to migrate existing messages then you can skip this step. Of course, there is no reason why you should skip, since its pretty easy. Just transfer the file: "msgstore.db.crypt" from phone to tablet, which resides at "/sdcard/WhatsApp/Databases/". And keep the file in the same folder in N7. Create the folder database if it doesn't exist.

*i.minus.com/ibvbxlFkW7GLOS.png *i.minus.com/ibw7XtWNAEnbZr.png

3. Now open WhatsApp on N7. Following screen should popup:

*i.minus.com/igZPxtrMLRg9z.png

4. Enter the phone number of you phone with which WhatsApp was configured previously.

5. Since tablet don't have messaging facility, wait for following screen to over. After which you should receive a WhatsApp numerical code on your phone. Should be 6 digit.

*i.minus.com/ib1mBr74lLCmu1.png

6. Enter the 6 digit code which you receive on your phone to following screen:

*i.minus.com/iblvwgRyZqQHDF.png

7. As soon as you enter correct code, activation should began and should be activated within seconds. After which WhatsApp will pickup the database file which you kept at Databases location.

*i.minus.com/ibhUMXIAQ3w1x3.png

8. Click Restore. And all the messages from backup will be restored and you will get a confirmation message:

*i.minus.com/iZdCOD7MoLnnR.png

9. Tap continue, and voila, you just finished installing and activating WhatsApp on your N7:

*i.minus.com/iDus7S8JYYduq.jpg

10. Enjoy.

*i.minus.com/iFOdOu4X5YhWP.jpg

And oh btw, Whatsapp activated with same number can only work on one device at one time. So you will have to re-verify if you want to use it again from phone:

*i.minus.com/ibhAmZrIYGqawK.png

Bonus: You can even install Windows XP on N7. :D
But... its so slow that its completely useless. Slowness is not due to the device but the limitation of the virtual machine on which it will run. But if you really want to make iOS uses jelly, you can head over to this thread to do that. Its pretty much simple, but requires you to have a WinXP ISO image, preferably made light by nLite.
Its useless or else I would have written an easy guide on it too. :p
 
Last edited:
Top Bottom