Run Linux On Your Android Phone

LinuxonAndroidWhat can you do with Linux on your Android phone? With LinuxonAndroid and the Complete Linux Installer app, you can find out.

First, you’ll need a rooted phone. Mine is an antique, first generation Samsung Galaxy S running Android firmware version 2.2, but once loaded the Complete Linux Installer ran Ubuntu version 12.04 without issue. Here are the steps I used to make it work.

Download And Install The Programs

Download and install the Complete Linux Installer and FTP Server apps to your Android phone from the Google Play Store. To make Linux run on Android phones requires an image file for the ARM architecture.

The Complete Linux Installer can download this image file from inside the application, but I didn’t have any luck making it work. The zip file just didn’t seem to unzip correctly. (If you want to give it a shot, you’ll find it under the Install Guides item on the app’s main page.) As a work around, I downloaded the zipped image and associated checksum file to my Linux notebook.

You can download the Ubuntu zip file from the LinuxonAndroid site, unzip it and stick it in a directory. I put the resulting image file in my /home/rob/Downloads/android-linux directory. The unzipped ubuntu.img.md5 checksum file is placed there, as well.

Three Linux image sizes are available. The Core image gives you a bare-bones Linux system. The Small image has more programs and the LXDE desktop. The Large image is a full Ubuntu distribution with the Unity desktop. I selected the Small model.

Start the FTP Server on Your Phone.

Upload the ubuntu.img file (using gFTP on the notebook) to the /sdcard/ubuntu directory on the phone (using FTP Server on the phone). This transfer took about 25 minutes due to the 2.0 GB file size. Also, upload the ubuntu.img.md5 file (using gFTP on the notebook) to the phone’s /sdcard/ubuntu directory on the phone (again using the phone’s FTP Server).

Start The App And Explore Linux

Now open the Complete Linux Installer app and select the Launch button (first time) on the phone. Pick the version of Linux that you want to run from the drop down menu. I installed Since I’d installed Ubuntu version 12.04, I chose Ubuntu.

Next step, push the Start Linux button. A terminal screen will appear and tell you that the image file integrity is being checked. That takes a few minutes, so don’t worry. As Linux loads and initializes it will look like this:

Start Linux Terminal Screen

Now:

  • Enter a new password for your regular user (ubuntu).
  • Retype the password.
  • Start the VNC server by typing “y”.
  • Start the SSH server by typing “y”.
  • Enter the screen resolution. I typed 1280×800 followed by [enter].
  • Save the settings as defaults by typing “y”.

Next, log out of Linux using “exit”. You may have to exit from a couple of terminal screens to get back to your phone’s main Android desktop. Restart the Installer app and select the Launch button again. Pick the version of Linux and again hit Start Linux.

Up and Running

At this point, Linux should be running with a terminal command line. If you have a VNC client on your notebook, log into the phone using “ubuntu” as the password. You should get a regular LXDE desktop like the image below. The screenshot is an LXDE desktop running on an Android phone. How impressive is that?

LXDE Screen Shot

You’ll see that the LinuxonAndroid main page is visible in the Firefox window. That’s right, my little Samsung smartphone is running Firefox, a terminal, the LXDE desktop… and the Arduino IDE all at once. I don’t have a USB host cable to hook it up to an Arduino, but that’s beside the point. I’ll have one sometime soon.

What’s Next

In future posts, I’ll explore different ways Linux can prove useful on a smartphone. I’m already looking for easy ways to root my Asus Transformer Prime (model TF-201), so I can program my Arduinos using the native Linux IDE and collect data over the serial port. I’ll also point out some of the good and not-so-good aspects of running Linux on a smartphone.

Give LinuxonAndroid a try and be sure to share your experiences in the comments below.

Related Links

Comments

  1. BY Katlego Modjadji says:

    Hi Rob. I do a lot of commuting between work, school, project sites and home. I would like to know if I can use the system you described, but with a USB cable instead of a constant Internet connection? I mean a way in which I can plug in to any windows pc, copy a folder with my portable VNC, put my phone into Linux mode and use it right there. This will be much more convenient than leaving traces of my sensitive information and passwords all over the province.

  2. BY Rob Reilly says:

    Katlego,

    I don’t know if you can do that. Serial communication between the Galaxy S3 and my Xubuntu machine has been problematic.

    Since the S3 running Ubuntu has a running X server, you could always SSH into the phone using the -X option. It would be secure and you could run whatever X application you needed. Perhaps the Chrome browser or LibreOffice. You mileage may vary.

    Why don’t you just put your favorite version of Linux (Xubuntu, for example) on a USB stick and run it “live”. Boot up to the USB/Linux stick and run it on the PC. You can even save data. Take a look at “Cool Tools: Linux On A USB Stick” http://news.dice.com/2012/05/15/cool-tools-linux-on-a-usb-stick/.

    Rob Reilly
    Dice Mobile Development and Linux community guide

  3. BY rochelle canale says:

    hello sir,
    I read your post about linux(ubuntu) installation over android device.Yesterday I downloaded the Complete Linux installer. And also the required ubuntu version. in my case it is 13.04. After that I unzipped it. By the way I choose small file. It is 2 gig size and has an md5 file. I placed this in sdcard/ubuntu. Then i proceed to the application and launch it. But the terminal is force closing. I don’t know why. I have 3 gig available in internal sdcard because I swapped the memory allocation. And I am also rooted and running ICS device. What should I do to run the .img file? Please help me thanks.

  4. BY rochelle canale says:

    Should I also need to install the core file?

  5. BY Dave says:

    Thank you!

    I did all that besides checking on their website to make sure my 1Ghz Dual Core Atrix 4G could run LOA. I downloaded the small Ubuntu .img and placed on the ext-sd. Open CLOA go to launch and 1. Go to Menu (upper right corner) brows to ubuntu.img on extsd card, choose that one an get back to CLOA launch page but CLOA can’t SEE the file I choose.
    And there is NO “Start” button to even choose to “Start.” Everything else looks like their screenshots, except no start button.

    I go to Android-Terminal but do not know the CODE to type to get this app running, and they are NOT answering any Questions over at linuxonandroid web site.

    So instead of bing, bang bam, we are on Linux now, some of us don’t even have a “Start” button/Icon to get started with.

  6. Pingback: How to Run a Linux Terminal on Your Android - Dice News

Post a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>