Running Ubuntu in Android with ODROID-X Development Board

I’ve had several people asking me about running Linux on Android in the last few months, but I did not look into it into details, because I thought we would just be able to run server apps. That is until Rohith left a comment on CNX Software Facebook timeline,  that it’s possible to run Linux in Android, and access the user interface via VNC (sort of simple, but I did not think of it). You probably need at least 1GB of memory and a multi-core processor to run this sort of setup correctly, so I finally decided to give it a try by running Ubuntu 12.04 with Unity interface in ODROID-X development board.

I mainly followed the instructions available at http://linuxonandroid.org/ and inside the Android app. Most of the steps I followed can also be replicated on other rooted Android hardware platforms. Apart from Ubuntu 10.04 & 12.04, you can also install Debian and Backtrack distributions.

Updating Android, rooting and installing the Play Store on ODROID-X

Since I hadn’t used the board since August, I decided to update Android to the latest version. This step is optional, and if you’re using another device, you can completely skip this section. I’m using an eMMC with my board, if you want to boot from SD card, following the instructions on hardkernel forums.

  1. Download Android 4.0 Alpha 3.5 (ODROID-X_eMMC_image_14-Nov-2012.zip) and extract it
  2. Enter into fastboot mode.
    If you have any, remove your SD-card and make sure JP2 is unconnected.
    • If you have the USB-UART kit, press any key within 3 seconds in your terminal software after power on, and enter ‘fastboot’ in u-boot prompt.
    • If you don’t have the USB-UART kit, press & hold the “user” button (SW3) of ODROID-X board and power on, and after 6~7 seconds, release the button.
  3. Connect your board to the host PC with a micro-USB cable.
  4. If you don’t have it, install fastboot on your host PC . (Instructions)
  5. Copy the kernel, ramdisk and system images to the eMMC module:
  6. Reboot and let Android perform the update

In order to run Linux in Android, you’ll need a rooted device and the Play Store app to install relevant applications.

Due to legal reasons, Hardkernel can’t install Google Play Store in the image they provide, but they can provide instructions to do so:

  1. Download and extract gapps-ics-20120429-signed.zip
  2. Copy the file to the /system directory
  3. Reboot the system to complete the installation

To root ODROID-X board, download unlockroot utility and follow the instructions (See ODROID-X review for details).

Setting Up Android to Run Ubuntu

This is where the instructions to prepare your rooted Android system to run Ubuntu or another Linux distribution start.

  1. Install Complete Linux Installer from Google Play.
  2. Start the application, click on Install Guides, and select your OS (e.g. Ubuntu 12)
  3. Follow the instructions:
    How to install Ubuntu for Android
    1. Download one of the Ubuntu images via http or bittorrent. There are 3 images:
      • Core Ubuntu Image – ~200MB to download and 750MB once extracted. It includes the basics without GUI.
      • Small Ubuntu Image – ~400MB to download and 2GB once extracted. It includes LXDE desktop
      • Large Ubuntu Image – ~1.3GB to download and 3.5GB once extracted. This image features the Unity interface as well as a range of other programs such as Firefox and LibreOffice

      However, the http link did not seem to work in Android, and the current version of Android ofr ODROID-X is known to hang during p2p downloads, so I decided to download the “Large Ubuntu Image” (Torrent or http) on my PC.

    2. Install the Android VNCViewer App.
    3. Install the Android Terminal Emulator App.
  4. Extract the downloaded image, can copy the 2 files (ubuntu.img and ubuntu.img.md5) to a directory (e.g. ubuntu) in the eMMC or a fast SD card.

Running Ubuntu in Android

We’ve now got all the required components and are ready to run Ubuntu in Android.

  1. Go back to Complete Linux Installer main menu, click on Launch,  and if the path is OK, you can just click on Start. If you run from SD card in ODROID-X, you’ll need to create a new config or edit the image path to /mnt/ext_sd/ubuntu/ubuntu.img.
  2. As you click on Start, the app will launch the Android Terminal, and for the very first boot, a script will check the image checksum (it will take a while), ask you to provide a password for Ubuntu user, ask if you want to start VNC and SSH server, request the size screen (1360×720 in my case), and finally ask if you want to save the settings, before entering the Linux shell. At this point, you are already using Ubuntu.
  3. Start VNC Viewer, enter the connection nickname, password, address (localhost), port (5900) and username (ubuntu). For better looking graphics, I chose 24-bit color depth (4 bpp).
  4. Click Connect, wait for the Ubuntu to show up and start a few applications.
Ubuntu on Android (Click to Enlarge)

At first, I ran Ubuntu from a cheap SD Card, and the desktop was rather sluggish, but I still decided to launch Libre Office 3 Writer… and it took over 5 minutes! So I decided to copy the Ubuntu image to the eMMC module. Ubuntu become more responsive, and Libre Office 3 Writer launched within 20 to 45 seconds the few times I tested (after “reboot’ each time).

You can watch the video below to see the step required to start (and stop) Ubuntu in Android, and assess the performance in ODROID-X board.

This method does not offer the great integration or performance that would be available with Canonical’s Ubuntu for Android, but it’s still usable as long as you use a fast storage device, and I can imagine this being useful for people who need to access application not available on Android, such as Libre Office for Android, and edit office files from their phones when they don’t have access to a computer.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
4 Comments
oldest
newest
11 years ago

Serious? Running a Dalvik virtual Java machine on a bare linux kernel to run a linux kernel as virtual machine? (a virtual machine inside a virtual machine)

Don’t think it will ever fly. This way, or the Canonical way.

Boardcon Rockchip and Allwinner SoM and SBC products