How to Install Ubuntu Linux on the HTC Evo 4G
In this article
Installing a full desktop Linux operating system on the HTC Evo 4G allows you to repurpose the older hardware as a tiny portable computer, web kiosk, or dedicated monitoring device. This process works by running Ubuntu as a guest operating system inside the Android environment using a chroot container, meaning it runs alongside Android rather than replacing it. This guide focuses on the "Ubuntu Single-Boot" style installation methods that were popular for this device, which create a functional Linux environment accessible via a Virtual Network Computing (VNC) viewer or an external display.
What You'll Need
- HTC Evo 4G (Supersonic) with a custom recovery installed (such as ClockworkMod or Amon Ra).
- An active internet connection on the device or a PC to download files.
- A computer to transfer files to the phone's SD card.
- USB cable for file transfer.
- Android Terminal Emulator app installed from the Play Store.
- AndroidVNC (or similar VNC viewer app) installed from the Play Store.
- Sufficient battery life (above 50%) or the device plugged into a charger.
Step-by-Step
- Prepare the SD Card: The Ubuntu system image is large. Connect your HTC Evo 4G to your computer via USB and mount the SD card as a disk drive. Ensure you have at least 2GB of free space. If you plan to use a dedicated partition, you may need to partition the SD card using a tool like GParted on a PC or via the custom recovery menu, but for most users, installing to the FAT32 partition is simpler.
- Download the Ubuntu Image: On your computer, locate a compatible Ubuntu port for the HTC Evo 4G (often labeled "Ubuntu for HTC Supersonic" or "Ubuntu 10.10/12.04 port"). These are typically found in developer archives like XDA Developers. Download the compressed
.zipfile containing theubuntu.imgand installation scripts. - Transfer Files to the Phone: Copy the downloaded
.zipfile to the root of your SD card. If the archive contains a folder namedubuntu, extract it and place the folder directly on the SD card root. Ensure theubuntu.imgfile is inside this folder. - Install via Recovery (Method A): If the developer provided a flashable
- Install via Terminal (Method B): If you have the raw image files, open the Android Terminal Emulator app on your phone. You will need to navigate to the folder containing the scripts. Type
- Start the Ubuntu Environment: Once installed, you must start the Linux services manually. Open the Terminal Emulator and navigate to the Ubuntu directory again (
cd /sdcard/ubuntu). Run the boot script, often namedbootubuntuor similar, by typingsh bootubuntu. If successful, the terminal prompt will change to a Linux-style prompt (e.g.,root@localhost:/#). - Configure the Graphical Interface: Ubuntu on mobile devices typically does not output directly to the phone's screen like a standard desktop. Instead, it runs a VNC server. In the terminal, type
startvncortightvncserver(depending on the specific build). Set a password when prompted; you will need this to log in. - Connect via VNC Viewer: Open the AndroidVNC app on your phone. Create a new connection. The IP address is
127.0.0.1(localhost) because the server is running on the device itself. The port is usually5901(display :1) or5900. Enter the password you set in the previous step. Connect, and you will see the Ubuntu desktop interface on your phone's screen.
.zip, boot your phone into recovery mode by holding the Volume Down button while powering on, then selecting "Recovery" using the Power button. In the recovery menu, select "Install zip from sdcard" (or "Flash zip"), navigate to the file you transferred, and confirm the installation. Reboot the phone when finished.
cd /sdcard/ubuntu and press Enter. Then run the installation script by typing sh install.sh (or sh ubuntu.sh depending on the specific script provided). Grant Superuser permissions if prompted by the Superuser app.
Common Mistakes
A frequent error is attempting to run the terminal commands without Root access. Ensure your phone is properly rooted and that the Terminal Emulator has been granted Superuser permissions. Another common issue is incorrect file paths; the scripts must be run from the exact directory where the ubuntu.img is located, or the script will fail to find the image file. Additionally, users often forget to start the VNC server before trying to connect; the Ubuntu OS runs in the background, and the VNC app is the window into that system.
Tips
For the best experience, use an external Bluetooth keyboard and mouse. Interacting with a desktop interface via a touchscreen can be difficult. If you plan to use this frequently, consider creating a dedicated ext3 or ext4 partition on your SD card for the Ubuntu image; this improves performance compared to running it on a FAT32 partition. Always check the specific developer thread for your version of Ubuntu, as some builds require specific tweaks to the startvnc script to set the correct screen resolution for the Evo 4G's display.
Troubleshooting
If the terminal returns "Permission Denied," verify that the script files have executable permissions. You can set this by running chmod +x scriptname.sh in the terminal. If the VNC viewer cannot connect, ensure the VNC server is actually running by typing ps | grep vnc in the terminal. If it is not running, try starting it again and check for error messages. If the screen appears black or distorted, the resolution settings in the VNC startup script may be incorrect for the Evo 4G; edit the script to use the device's native resolution (800x480). If the installation fails due to lack of space, check that the SD card is not corrupted and has sufficient free space.
Frequently Asked Questions
Does this replace Android on the phone?
No, this method runs Ubuntu inside Android. Android remains the primary operating system, and Ubuntu runs as a container. You can switch between them by starting or stopping the Ubuntu scripts.
Can I use the phone features while Ubuntu is running?
Yes. Since Android is still running in the background, phone calls, SMS, and mobile data should still function, though heavy system load may cause lag.
Is this a full desktop version of Ubuntu?
It is a port of the desktop ARM architecture. Most command-line tools work perfectly, but the graphical interface may be slower than a native desktop PC due to the phone's hardware limitations.
Why do I need a VNC viewer?
The Android kernel on this device does not natively support displaying X11 graphical output directly. The VNC server captures the graphical output and sends it to the VNC viewer app for display.
Will this work on other HTC phones?
This specific guide is for the HTC Evo 4G (Supersonic). While the process is similar for other devices, you must download the image and scripts specifically compiled for your exact phone model.
How do I uninstall it?
Simply delete the ubuntu folder from your SD card. If you created a dedicated partition, you can format that partition using the recovery menu or a PC.