Remove All Ads from XDA
Honor 7x
Win an Honor 7X!

Ubuntu / Backtrack on Android [Complete Solution]

8,924 posts
Thanks Meter: 9,518
Post Reply Email Thread
This guide had been on the Thunderbolt forum for quite some time and I decided it was time to share with the rest of the community

Having reviewed almost every other option I can safely and honestly say this is the most simplified, thorough, and customizable install available since its original launch. I will gladly retract this statement when it becomes false, but until then...

Installing Ubuntu onto Thunderbolt/Droid/Droid2/Etc:

Create a folder on the sdcard named ext2ubuntu, which is /sdcard/ext2ubuntu when listed in terminal or adb

Required files for Ubuntu install:

Custom Packages for AutoConfig:
Coming soon

You will also want to download either an ubuntu image or archive. The major difference is that the image must be the same size as your ubuntu installation, so they are larger downloads, or need to be resized before you use them.

Ubuntu Prebuilt tar and img downloads:
(img: Extract only ubuntu.img and place in /sdcard/ext2ubuntu)
(tar: Rename, if desired, and put archive in /sdcard/ext2ubuntu)

(This image DOES need to be resized, see next post)

10.10 img:
(This image file does NOT need to be resized)

11.04 tar:

Backtrack img:
Borrowed from
(This image file does NOT need to be resized)

How to build your own Ubuntu Image:

The ubuntu mount folder is symlinked to /system/sd-ext allowing access to it there also.

First off you should have a running ubuntu install on your computer or at least a live cd running to create the ext2 partition.
Use gparted to add a 4gb (or whatever size you want) ext2 partition to your sdcard. I did this while the phone was mounted in disk drive mode, so you dont need to take the card out.

Ubuntu: Get gparted in synaptics or in terminal enter:
sudo apt-get install gparted
Widows: *Paragon Partition Manager*
If you do not need to partition, skip this step.

Use adb to run /sdcard/ext2ubuntu/
adb shell
sh /sdcard/ext2ubuntu/
Or from terminal (only supported on some ROMs)
bash /sdcard/ext2ubuntu/
All required scripts will download and install themselves automatically. Currently only and the chosen ubuntu image need to be placed in /sdcard/ext2ubuntu for proper install. Scripts include an autoupdate feature that will also keep them current.

Follow the instructions and select the appropriate options for your system configuration and download choices.

You can now open terminal and type "bootubuntu" to test install

A new Sdcard Direct option was added allowing user to replace the installed scripts with a unified "ubuntu" command that runs the scripts directly from the sdcard. This option was offered due to the frequency of updates to allow the user to simply replace the files in /sdcard/ext2ubuntu with newer versions that would run without any further steps.

If you get a localhost prompt, you are in but still need a couple things to move past command line.
Here is where we part from borrowed and modified instructions that recommend lxde and ice and all the dinky handheld ubuntu shells, and move to the Thunderbolt method.

Update vs Restore scripts: Update will base what scripts are put in system on the ones currently there, while restore determines what scripts are currently available on the sdcard.

For automatic installation of ubuntu applications, you will want to enter these commands next:

Choose your options

To view your ubuntu desktop, you will want a vnc viewer for android. I use real vnc, but android-vnc-viewer is free and has all the same features (i just liked the layout of realvnc)

The address for ubuntu is
The port is 5901
The password is the tightvncserver one you set.

i recommend making a folder named android in "your mounted ubuntu folder"/home/ for your personal files since /root is your local folder, but causes permission issues.

From your new ubuntu you can use synaptics and download eclipse there, but it can also be downloaded from the localhost prompt using "apt-get install eclipse" I also recommend downloading the android-sdk. To run the sdk from the localhost prompt, simply cd to the android-sdk directory and issue the command:

tools/android update sdk -u -s
and if you want to specify the downloads performed add
-t [specific items such as platform, platform-tool]
If you need help with any commands you can add
to your existing command

The htc kitchen can be downloaded from ubuntu using the same instructions found:

After it is installed, you have the option to launch this kitchen either from inside your ubuntu install, or from the localhost prompt, which avoids having to run vnc to use it.

A compiler toolchain is available by choosing download the latest release. I use gnu/linux even though it seems to be eabi included in the android source, but I have never used it to be sure. I have been told this one is a lot easier to use anyway.

I recommend backing up the ext2 once everything is done. This can be done by (entering "exit" at the localhost prompt and then) entering "backubuntu" in terminal.

backubuntu can also update newly downloaded scripts without having to use root explorer or worry about permissions. Just put any new versions in your sdcard/ubuntu folder and select the update option.

This replaces the ubuntu2.img with your backup so you dont have to "apt-get" everything over again. This will also save your tightvnc password so make sure you remember it.

Sent from my ADR6400L using Tapatalk
The Following 2 Users Say Thank You to twistedumbrella For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes