Linux on Android

This post is about installing Linux on Android system on a HTC Evo 3D (GSM) phone. The type of the phone is just interesting because root privilege is necessary, and rooting method depends on the given phone. If you have root on your phone, you can also install Linux by the method presented here.

Why you may need Linux on Android?

  1. Just for fun.
  2. Maybe you want to learn more about Linux. Maybe you read something interesting about it, and would like to try it immediately on your phone. There are Terminal emulators (e.g. Android Terminal Emulator), there are online terminals, for example Webminal, but maybe you need root privileges to try something, or you just want your own system, that works even if you are offline.

I found a nice app that makes it possible to have Linux on Android: Linuxonandroid. As the requirements says, it needs rooted phone.

(Soft) Rooting HTC evo3D (GSM)

I must say that I was happy with this phone without rooting, and I feared to screw up its really nice Sense features. But I wanted Linux on my phone so much, and I embarked on rooting. The process worked on this phone:

Model number: HTC EVO 3D X515m
Android version: 4.0.3
HTC Sense version: 3.6

I followed these instructions, but I didn't want to S-OFF my phone, so after unlocking bootloader, I continued with installing custom recovery. Please read carefully the linked post, it has a lot of tips. As for the section about unlocking with HTC Dev I must admit that instead of the post I followed the HTC official instructions, but the post helped me to understand the process better.

Unlocking your phone has risks, please read carefully the cautions about it on HTCDev page.

HTC gives official support for developers to unlock the bootloader. It says that

After you have unlocked the bootloader, however, you will have lifted the restrictions on boot, recovery and system. This means you can customize boot, recovery and system images on your phone as you desire.

You have to register on HTCDev, then choose device (mine was EVO 3D EMEA, stands for Europe, the Middle East and Africa), and you can go unlocking. Please NOTE the required resources section on the unlocking instruction page. It says that before unlocking you need

  • Google Android SDK
  • Java Runtime Environment
  • HTC Sync (Windows Only)

Follow the unlocking instructions (they are really clear). If everything ok, then you will get an email from HTC with an attachment (Unlock_code.bin), and in this mail they will write the following steps. They will give instructions also in case you want to lock the bootloader again.

After unlocking, follow the steps of the linked post. If you want only a Linux, you don't need to S-OFF your phone, just continue with flashing recovery. After that I installed su patch, because I like Sense, and didn't want to experiment with other ROMs, but I needed su patch for root privileges.

So, you have root, what's next?

Install Linuxonandroid app

If you have root, you just have to install Linuxonandroid app. With the help of the app you can get a lot of Linux distributions, as for this writing: Ubuntu 13.04, 13.10, Debian 5 and 8, Kali Linux, Fedora 19, Arch Linux. I chose Ubuntu 13.04. The installation process is quite straightforward. You have the opportunity of using GUI, but on a phone I think it cannot be really enjoyable (maybe on phablet or tablet, I don't know). My aim was to use Linux in text mode, and you can achieve this with the help of the simple but very effective Terminal Emulator. You can launch your Linux from the app easily.

phone screen snapshot

Finally, I'd like to link the online book that made me think to install Linux on my phone while I was reading it: Machtelt Garrels: Introduction to Linux.



comments powered by Disqus