Backtrack 5 on Google Nexus

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.

Gnex1_edited

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.

1. Download and install these apps: Android Terminal Emulator, BusyBox and androidVNC

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

Gnex2_edited

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

Gnex3_edited

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

Gnex4_edited

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

Gnex6_edited

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.

Gnex5_edited

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.

Please follow and like me:
Bookmark the permalink.

7 Responses to Backtrack 5 on Google Nexus

  1. Liam says:

    there is a LOT missing from this guide, like ADB and the readme inside the BT5 download. A lot is missing from the readme too @_@ I sat and fucked with this stupid thing for almost 5 hours, to no avail. I tried to use the SDK manager, but I have to close java and cmd to install the updated version of SDK, which closes the program. Please revise and redo?

  2. Hegelund says:

    Hi Liam and tanks for your comment

    A prerequisite for this tutorial is that your device is rooted. So I do not think there is anything mising in this tutorial. I beleve that is where your problem is. The ADB driver is not needed if you allready have a rooted device.
    Have a look here for help regarding rooting: http://galaxynexusroot.com/

  3. Liam says:

    Phone is rooted and running Cyanogenmod (nexus 4)
    superuser for terminal, BT5 unzipped twice and stored in BT5 folder.

    At sh /sdcard/bt5/bootbt I get a string of errors.
    ioctl LOOP_SET_FD failed: device or resource is busy
    mount: no such file or directory
    mount: no such file or directory
    mount: no such file or directory
    net.ipv4.ip_forward = 1
    /sdcard/bt5/bootbt [23] : can’t create /data/local/mnt/etc/resolv/conf: no such file or directory
    /sdcard/bt5/bootbt [24] : can’t create /data/local/mnt/etc/hosts: no such file or directory
    chroot: can’t execute ‘/bin/bash/’ : no such file or directory
    shutting down BackTrack ARM for Xoom
    failed: no such file or directory
    failed: no such file or directory
    failed: no such file or directory
    failed: Invalid argument
    Thanks for the reply as well, I would really like to get this working on my phone D:

  4. Hegelund says:

    Hi Liam

    Sorry I can’t help you with that error. What device are you using?

    My best advice would be to google the error “LOOP_SET_FD failed: Device or resource busy” Seem you are not the only one having this problem. You are welcome to post the solution here if you find one.

  5. zxcasd says:

    Just my $0.02: This tutorial is excellent. I had no trouble getting BT5 running on my Nexus 7.

  6. Dario says:

    Hi,
    Sdcard is not executable on Nexus 4. I have my phone rooted with stock ROM. How did you run bootbt?
    Thanks in advance

  7. Vaibhav pawar says:

    u0_a79@S5+:/ $ su
    root@S5+:/ # cd /sdcard/BT5
    root@S5+:/sdcard/BT5 # sh bootbt
    Loop device exists
    open backing file failed: No such file or directory
    mount: No such file or directory
    mount: No such file or directory
    mount: No such file or directory
    net.ipv4.ip_forward = 1
    chroot: can’t execute ‘/bin/bash’: Permission denied
    Shutting down BackTrack ARM For Xoom
    failed: No such file or directory
    failed: No such file or directory
    failed: No such file or directory
    failed: Invalid argument
    1|root@S5+:/sdcard/BT5 #

    What I do..?? #there is showing permission denied in busybox chroot..#give me solution for that..

Leave a Reply

Your email address will not be published. Required fields are marked *