I love playing around with my android phone. The fact that it’s linux based makes it flexible and hackabel. In this tutorial, we are going to look at how to run the linux distro Backtrack on Googles Galaxy Nexus phone.
For this you need a rooted device along with a few free apps. Busybox is a set of unix tools which allows nix based systems to do stuff they would normally not be able to. Because it’s put together in a single very small executable file it’s ideal for portable device as android phones. Terminal emulator is basally just an app which emulates the command line shell from within the android OS. Finally, we have androidVNC, which is a VNC client for android used to connect to VNC serveres to get remote desktop access.
Allright – now that that we have the tool needed, we need the OS itself. Backtrack 5 comes precompiled for ARM processes, which is the preferred architecture for phones now a days.
2. Download Backtrack 5 for ARM architechture
The file BT5-GNOME-ARM.7z is downloaded. Different unzipping tools can unzip this type of file, if you don’t allready have one you can download 7zip for free.
3. Unzip the file BT5-GNOME-ARM.7z
One of the unzipped files will be named bt5.img.gz. Ones again you need a unzipping tool to unzip this file.
4. Unzip the file bt5.img.gz
5. Connect you android phone an create a folder on the sdcard named BT5
6. Copy the unzipped files from BT5-GNOME-ARM.7z along with the unzipped file from bt5.img.gz
Okay now we are all clear to get backtrack up and running.
7. Open Android Terminal Emulator and type sudo su to get root privileges
8. If prompted for root access allow this
9. Type sh /sdcard/BT5/bootbt
POW – and we are in a Backtrack shell! You can now do almost anything you would do on a normal machine running Backtrack. If you ask me, this is the easiest interface to work with. But just or the fun of it, let’s get the fancy GUI up and running. We will do this by setting up a VNP server on Backtrack and connecting to it via androidVNC. The display resolution on my Galaxy Nexus is 1280×720 so this is what will be set in this tutorial. Also we want to setup a user and a password for logging on to the VNP server.
10. Type tightvncserver -geometry 1280×720
The server software has a tendency to choose a random port to be used for connections. To check which port the service is running we do a quick nmap scan of the local host.
11. Type nmap 127.0.0.1
From the nmap scan we can see which port the VNC server is running on. In this tutorial it’s port 5902. We are going to need that information later. Now on to setting up the user and password.
12. Type export USER=root
13. Type vncpasswd
14. Type a password and repeat to verify it – in this tutorial Wednesday13
15. When promted for View-only password press n
We are now ready to connect to the VNC server
16. Minimize Terminal Emulator and open up androidVNC
17. Enter Nickname, Password and Port – here root, Wednesday13 and 5902
And here we are – in the GUI for Backtrack. Note when you want to close Backtrack, it is not enough to just close the VNC session, you need to go back to Terminal emulator ant type exit.
I the method should work on all android devices. I should also mention the method used is not my own idea. Credits goes to this guy.