Weekend project: Flashing Ubuntu to your Nexus 7

Web browsing on the Nexus 7, using Ubuntu and Firefox

I love fiddling with things. Especially electronic things. I admit, I've fooled with ARM builds of Ubuntu on Android devices, or running them in a chroot environment. I read the comments and forums, so I know I'm not the only one. The problem is, that while it's fairly easy to do, if you're not comfortable with terminal commands you just won't be doing it. Canonical, who is using the Nexus 7 as a sort of reference for Ubuntu on ARM touch devices changed that today by releasing a simple one click installer.

Now, anyone who can install Ubuntu on their computer can just as easily install it on their Nexus 7. It's not very practical, and you'll likely flash back to Android after a few hours of playing with it, but it is extremely cool to play with for a few. If you're the type who likes to hack and flash at your Nexus 7, you will want to try this. Read on.

What you'll need, and where to get it

The first thing you need to know is that this wipes everything off your Nexus 7. All of it. Your movies, your pictures, your Plague, Inc. progress, everything. You also have to use the factory images to restore. Know all the details before you step into this one.

You'll need to be running Ubuntu on your computer. Yeah, I don't like that much either, as Ubuntu on the Desktop just doesn't suit me. But them's the facts. You can get the ISO here, and either the standard install or Wubi (that "easy way to install on Windows" mentioned at the bottom of the Ubuntu page) will work just fine. There's a good chance everything will just work when you install it. There's an even better chance that if it doesn't, you can Google the issue and find a clear and concise answer. Installing Ubuntu is easy, and the hardware recognition is top-notch. There's also a bunch of us nerds in the forums who can help.

You'll also need to be sure Fastboot is set up. That's pretty simple, as there are no drivers to fool with. Just drop the fastboot executable (this is one I built, I'll vouch for its integrity) somewhere in your PATH, and make sure it's executable. If that sounds like gibberish, again a Google search or a trip to the forums will fix you up quickly. 

You need to have the bootloader of your N7 unlocked. Instructions for that are all over the 'net, but I think you'll find the best ones right here.

And finally, you'll need the USB cable that came with your tablet or an equivalent. 

Got all that? Good. Carry on.

How do I do it?

This is actually the easy part. Make sure you've got a good charge on your Nexus 7, and have a read.

Open the terminal application on your computer that's running Ubuntu. Don't worry, you're not hacking at anything from there, you're just setting up a new software source for Ubuntu to use and installing the GUI for the flashing tool. Got it open? Good. Copy and paste this, one line at a time.

sudo add-apt-repository ppa:ubuntu-nexus7/ubuntu-nexus7-installersudo apt-get updatesudo apt-get install ubuntu-nexus7-installer

When asked for a password, it wants your user password. This will leave you with a fully working installer for Ubuntu on the N7, and one that will get OTA updates of its own when needed. Find it in your software menu. If you need to search for it, just search "nexus".

Power your N7 down, and plug it in to your computer. After it's plugged in, hold the volume down key and power until it reboots into the bootloader, and set it aside. The rest is done on your computer.

Since you should have already verified that Fastboot is working, all you need to do is run the app you opened earlier. Choose the right size for your tablet (8GB or 16GB), and watch it go.

It's going to take a few minutes, and then a few minutes more when it's finished and rebooting. You'll probably think it has stopped running, but chances are it hasn't. Give it at least 10 minutes to restart. When it boots (the username is "ubuntu" and the password is "ubuntu", and you're automatically logged in), shut it down and reboot it once. 

Then play with it, try to break it, use an OTG cable and a mouse, whatever floats your boat. Have fun with it.

Going back to Android

You have a Nexus device. Getting the latest stock version of Android on it is simple, espically with an install of Ubuntu on your computer and Fastboot already set up. See how simple it is here,

Now go hack the daylights out of something!

Jerry Hildenbrand
Senior Editor — Google Ecosystem

Jerry is an amateur woodworker and struggling shade tree mechanic. There's nothing he can't take apart, but many things he can't reassemble. You'll find him writing and speaking his loud opinion on Android Central and occasionally on Twitter.

  • Explore it a bit more and tell us about running Open/Libre Office on it, GIMP, remote X clients through ssh, if you can create your own users, what hardware works and doesn't (camera, multitouch, etc), how it performs, etc! (No, I don't own a Nexus 7). One great use case for doing this would be if you needed to turn a tablet into a more dedicated appliance since a full Linux distro will allow endless tweaking (full multiuser, permissions, standard config files).
  • Well, I can say that Libre Office works relatively well. No camera driver, does have full multitouch (supports multitouch gestures for some functions). Sound doesn't work after initial boot, but comes alive after a suspend/resume sequence. Unity seems to be running in software mode, no hardware acceleration. Performance is slightly pokey, although not too horrendous. Biggest problem is that Unity stops responding more often than it works. Regarding your second point, that is the idea. The purpose of this release is to get developers motivated to iron out the kinks.
  • Looks interesting to do but doesn't look worth while to have it for me.
  • its in an early stage guys. Cut it some slack -_-. Its not a matter of what it can do right now, its a matter of possibilities, with open source stuff things start like this and eventually attract attention, great things happen from there.
  • Awesome.
  • Yikes, that's an old version of Ubuntu you're running, looks almost like Hardy
  • 12.10 Had to install Gnome 3, even if Ubuntu was only on here for a few hours. 
  • You lasted longer than I could. I would have to use KDE or LXDE for any amount of time more than a few minutes :)
  • Here's my setup.
    "sudo apt-get install openssh-server"
    Once you get ssh going, you might want to "sudo apt-get install nano"
    Then I changed the hostname in /etc/hostname and /etc/hosts to shorten the prompt. Then I created a new user "sudo adduser (example_user)", and gave it sudo "usermod -a -G sudo (example_user)".
    Then to enable the login screen, I logged out from the power menu and logged back in as guest, and then from my ssh terminal typed "sudo deluser ubuntu" to delete the default user. You can change a user's password with "sudo passwd (username)", in case you don't like logging in as ubuntu, ubuntu. When you rotate to portrait with "xrotate" it's painfully difficult to drag the softkeyboard down to the bottom of the screen. And I so far haven't figured out how to resize windows and whatnot. Any attempts to alt-tab seem to freeze the gui, but not the ssh terminal so you can "sudo reboot".
  • I wish this was Kubuntu, can't stand unity. Must replace.
  • This is your idea of a one-click install?
  • next time just use the main dist of linux mint, it is based off ubuntu but uses a fork of gnome 2 as one of the main interfaces, and you can install ubuntu ppas in it.
  • I'm more curious as to what your personal build of fastboot entails Jerry.