Ubuntu Linux on Nexus 7: First Look

Linux on Nexus 7

My OTG (“On the Go”) cable arrived after three weeks of languishing in the postal service so I finally had what I needed to plug a USB keyboard into the Nexus 7. The procedure looked fairly safe, and I was willing to gamble. I say gamble, because I’m not a serious hacker and if the instructions were to deep-six my system, I’d be screwed. But I figured there’d be some way to restore it, so, to pursue my abiding interest in things Linux, I took the plunge.

Unlocking the Nexus

The first step was completely new to me: Unlocking the Nexus 7. I’m guessing this is the equivalent of jailbreaking an iThing, but more up front. In fact, Google makes it easy to do. You simply power off the device, then power it back on while holding down the power button and the volume down button. What you get onscreen is cute little Android figure with the hood to its insides open and a big Start button on the top. If you press Start the unit boots back up normally. But when attached to another computer, the ROM can be flashed via the USB port. This state is called “fastboot mode.”

Courtesy: https://wiki.ubuntu.com/Nexus7/Installation?action=AttachFile&do=get&target=bootloader.pngNexus bootloader mode

I used my Ubuntu Linux 12.04 laptop (Dell Inspiron 1520) to do the procedure, but I understand it can also be done from Windows or OS X. I had already installed ubuntu-nexus7-installer and was ready for the next step:

$ sudo fastboot oem unlock

I then followed the directions on the Nexus “Unlock Bootloader?” screen, restarted the unit, and it came back up, still in Android mode, but unlocked.

The next step was so easy it was liking riding in a robotic car. I returned the Nexus 7 to fastboot mode, located the graphical Ubuntu Nexus 7 installer program on my laptop, clicked on it, and waited for it to finish.

Courtesy: https://wiki.ubuntu.com/Nexus7/Installation?action=AttachFile&do=get&target=dash3.png
Ubuntu LInux Nexus 7 Installer

Test Drive

When the installer finished, I was looking at Ubuntu’s Unity graphical interface and a virtual keyboard. At this point I should say that I wasn’t expecting it to be a finished product. In fact it’s a long way from alpha, much less beta. But I wanted to see how far the team had come in getting Linux onto a tablet, which is a remarkable feat. While Microsoft is spending millions getting full Windows 8 onto a tablet, here is a team of people on the Internet building the equivalent on their own dime, simply for the good of the community. These people have my profound respect, as well as thanks.

So, performance was about what I expected. I’d touch an icon, say for Gedit, a text editor, and there would be a several-seconds wait before it appeared. I touched the Terminal program icon and it, too, appeared in a few seconds. Not instantly as in Android or iOS. I typed a few commands in the terminal using the virtual keyboard, cd’ing around the sytems and ls’ing the directories to see what was around. The virtual keyboard got old fast. Because it’s such a full keyboard, without numeric and special symbols modes like an Android or iOS virtual keyboard, everything has to be on Ubuntu’s virtual keyboard. That makes for very tiny keys and circumspect typing.

Next I hooked up an external USB keyboard. I touched the text editor, exited the virtual keyboard, and tried typing. Worked like a charm! I typed at full speed and didn’t detect any lag onscreen. I tried it in the Terminal window too, and it was great. However, the pesky virtual keyboard kept popping up whenever I touched the screen. It got to be highly annoying. It would be a good idea if the virtual keyboard could be suppressed if the system detects an external keyboard.

Installing Linux on Nexus 7

Still amazed at how far the team had come, I looked for, and found, a Screen Capture program. It’s what I used to capture the image at the top of this blog posting. It too worked a treat, but I wondered how I could get the captured image out of the, I guess I can’t call it the Lexus 7, so I’ll say the Ubunexus 7. (Doesn’t have the same ring, does it?)

I removed the USB keyboard and attached an SD card reader with SD card inside. The folder viewing app detected it right away so I thought I’d just do a copy and paste using the app. Unfortunately, every time I started to get somewhere with it, the app would cause the system to freeze and I’d have to reboot. To reboot when you don’t have any control of the system, just push the power button on the Nexus 7 and the reboot/shutdown options appear. After a few rounds of this I gave up and went to the terminal window where I typed something like (I forgot to write down the exact command):

$ cp screenshot01.png /mnt/ubuntu/SDCARD01

What a delightful sight it was to see the green light blip on the card reader. If that hadn’t worked, I’d have tried rsync or something, but I had what I needed.

Aside: This simple copy to the SD card impressed me to no end because in Android 4.2 I CANNOT get the OS to see any card or memory stick I attach. All the tips I’ve seen on the Net simply say, attach with an OTG cable. Done that, been there, tried two different readers and two different cables. No joy. Yet Ubuntu Linux mounts it intelligently. Piece of cake.

Back to Android 4.2

Bottom line: I’m impressed with how far the team has come with the touchscreen interface, and the port to the ARM processor. Much work still needs to be done. For instance, you can’t yet use finger gestures to enlarge the screen, something that will make using the tiny icons and fonts more tolerable for pudgy fingers. And there will be, I’m sure, many bugs to be fixed. Great work!

As nice as it was to visit, however, it’s still under construction, not ready for occupancy. Eventually I’ll move in, but for now it was back to Android. The installation procedures also give instructions for downloading the current install image for Android 4.2. Once it’s fetched, gunzipped, and untar’d, you put the Nexus back in fastboot mode and type (depending on the image version)

$ cd nakasi-jro03d/
$ sudo ./flash-all.sh

At this point the Nexus 7 is returned to Android. All your customized settings are lost, of course, but if you’ve been autobacking your system to Google (recommended), Google restores all the apps you’ve loaded. You need to retweak the interface to your taste.

And if you wish to relock the OS, there’s one final step. Return the Nexus 7 to fastboot mode and type

$ sudo fastboot oem lock

I’ll leave mine unlocked so I can try out the distribution again when it reaches another plateau, without fussing with the Nexus lock. I’ll admit I’m looking forward to the next trial. This is great stuff. Cheers to the development team and all the testers!

Nexus 7 Has Arrived

Google Nexus 7

It arrived two days ago, all gleaming and ready to go with Jelly Bean,aka Android 4.1. The Google Nexus 7.

Lest anyone be confused, I’m not turning away from Apple products. I love my iPad 3 and use up its battery charge nearly every day. No, this purchase was made for a different reason entirely: Linux.

In an exciting development, Canonical Ubuntu Linux has released a distribution for the Nexus 7 as its target tablet to further develop this ARM implementation of Linux. I expect it to be very rough around the edges and only moderately useable but I’m excited to test it out. It’s a worthy dream to have a full Linux operating system on a tablet for portable use. Rather like what Microsoft is trying to do with full Windows 8 tablets.

In the meantime I’m trying out the Nexus 7 with Android, an operating system I’ve not before used and I must say, it’s very slick. The App store at Google may not be as well stocked as the iPad App store, but I was able to pick up most of the extras I need, such as a basic text editor for writing and a file manager to move files around. By the time I added a few extras the Nexus had most of the apps I use frequently on the iPad, including Chrome, Kindle, Netflix, Overdrive,DropBox, Adobe Reader, and a decent epub reader. What I haven’t found yet is a text editor that is the rough equivalent of WriteRoom.

My only regret about the Nexus 7 is that Google/Asus didn’t include a MicroSD slot. There is, however, a micro-USB connector and I have a coverter cable on order that will allow me to attach standard USB devices, such as an SD card reader or USB memory stick.

To be honest, it’s going to be painful to give all this up in order to install a partly working operating system that is in its early development and doesn’t yet do too many practical things.

So, would I give up my iPad for, say, the 10″ Google Nexus expected in a few weeks? Not really. Although I’m not an Apple fanboy, I really like the iPad and have owned two of them. Other than their being set in a protected, “walled garden” I have no complaints. However, for anyone looking for a less expensive option to a 7.8″ iPad, I think the Nexus 7 is a great buy.