Results 1 to 2 of 2

Thread: 3 Different ways to store BT5 on Android Phone (SDCard Required)

Hybrid View

  1. #1
    Just burned his ISO
    Join Date
    Apr 2011
    Posts
    6

    Default 3 Different ways to store BT5 on Android Phone (SDCard Required)

    Original thread at XDA-Developers - http://forum.xda-developers.com/show....php?t=1158763

    ----------------------------------------------------------

    Zen's Backtrack 5 For HD2 (and other) Android Smartphones
    V0.3
    ----------------------------------------------------------

    Packed - 640mb

    Unpacked - 2.6gig (fits on 3.3 img now.)

    --GRAB THE UPDATED SCRIPTS ATTACHED TO THIS POST, THEY ARE NOT PACKAGED INTO THE ZIP--

    V0.3 Download - http://www.megaupload.com/?d=PFDJ5KRV

    MD5sum (of .7z file) - 9a4796f0ed96e03579c2b4a684d026f5


    --------------------
    Script pack contains
    --------------------

    btgo - mounts BT5, and askes how you would like to start, CLI or VNC
    bts - stops BT5, and unmounts everything for it.
    btl - used to login to bt5 after it has been mounted, to avoid all those "resource busy" messages
    mkcore - directory installation and swap file creation

    -------------
    What you need
    -------------

    Rooted Android Smartphone
    Linux on PC
    Busybox installed on your device
    SDcard adapter or reader, if neccesary

    ----------
    Lets begin
    ----------

    There are 3 different ways you can do this:

    1. Fresh install on EXT4 Sdcard partition ( I HIGHLY recommend this method if possible, much better, a bit faster (no double loops to write to)

    2. Create Fresh .img

    3. Replace old BT5 system .img


    =========================================
    1. Fresh install on EXT4 Sdcard Partition
    =========================================

    This portion of the guide is to install BT5 on a FRESH EXT4 partition on your SDcard. Throughout this porcess, you will:

    Backup your current sdcard (EVERY PARTITION, this is why we use PC-linux and not windows)
    Fully erase and repartition your SDcard
    Replace Android system and user data
    Install BT5 on third partition
    prepare system for chroot and VNC connection

    ----------------------------------------

    Boot into your Linux operating system. **I DO NOT recommend using virtualbox or vmware, as drivers for usb and SDcard connections arent direct, things can go wrong.**

    Shutdown your phone, and remove your SDcard. Do not use adb, or any other tools to do this.

    insert your SDcard into your computer (adapter or reader yada yada) and mount every partition.

    Make careful note of what is on which partition. safest way to back everything up is through the command line with the command

    Code:
    sudo cp -Rfvp /media/your-sdcard-partition/* /where/your/backup/folder/is
    Do this for each partition, whether you have 1, 2, 3, or more.

    In my case, my backup directory looks like this:
    Code:
    [hookup-cellular@Hookup sdcard-backup]$ ls -l
    total 12
    drwxrwxr-x. 2 hookup-cellular hookup-cellular 4096 Sep 13 18:48 ext2
    drwxrwxr-x. 2 hookup-cellular hookup-cellular 4096 Sep 13 18:48 ext4
    drwxrwxr-x. 2 hookup-cellular hookup-cellular 4096 Sep 13 18:48 fat32
    (ignore the empty directory sizes, my TRUE backup folder is MUCH more vulgar and i wont display it publicly, people may tear thier eyes out :P)

    After everything is backed up, open your partition manager (in Gnome it is gparted, cant remember the name in others)

    Navigate to your SDcard, and DELETE every partition. every one.

    afterwards, recreate them using this strategy:

    partition 1 - FAT32 size = total sdcard size minus ext2 and ext4 partition sizes
    partition 2 - EXT2 size = 256mb, 512mb, 1gb, depending on how you like your apps2sd
    partition 3 - EXT4 size = size you want for linux, minimum should be 4gb (mines at 10gb, i like my linux and got 3 different ones on it at the same time.)


    When you are done, copy back your fat32 and ext2 stuff using the SAME COMMAND AS ABOVE (sudo cp -Rfvp from/here to/here)

    Now, unzip/tar the .tar.gz package. I recommend extracting it to your pc before trying to put it on your sdcard.

    Using the copy command above, put the extracted files onto your sdcard's EXT4 partition.

    Double check the partition (navigate to it in nautilus or whatever filemanager your using) and ensure that it has the system copied over properly. You should see /boot /etc /root /sys so on and so forth, NOT just one folder with all of those inside of it.

    Insert your SDcard, power on your phone, go to terminal emulator, and enter this:
    Code:
    su
    cd /sdcard/scripts
    sh mkcore
    Swap file is damn near neccessary if your planning on using any GUI tools (armitage, zenmap)

    Your directory structure is now in place, swap file created, and you start BT5 by typing (from /sdcard/scripts OR /data/linux):
    Code:
    sh btgo

    =================================
    2. Fresh Image Creation
    =================================

    for this, we use the dd command and mkfs.ext4 command.

    Code:
    dd if=/dev/zero of=/path/to/where/you/want/the/img bs=1M count=3300
    Change this command as needed, running it as is wont do anything good. Change the of= to where you want your img to be located.

    next is mkfs.ext4

    Code:
    mkfs.ext4 /path/to/where/you/want/your/img
    select yes when it cautions about "not a block device"

    When this is finished, mount it using these commands:

    Code:
    su
    -your password-
    mkdir -p /mnt/bt5img
    mount -t ext4 /path/to/your/img /mnt/bt5img
    now, extract the BT5 package to a place on your Computer. When finished, run this command:

    Code:
    sudo cp -Rfvp /path/to/bt5/core/* /mnt/bt5img/
    changing parameters accordingly.

    After this, copy the .img to /sdcard/bt5 and run the start scripts from your terminal emulator.


    ================================
    3. Replace Existing Image
    ================================

    Mount your bt5 image, erase what is inside of it, and copy in the new system:

    Code:
    su
    -your password-
    mkdir -p /mnt/bt5img
    mount -t (your ext type) -o loop /path/to/your/bt5/img /mnt/bt5img
    rm -Rfv /mnt/bt5img/*
    cp -Rfvp path/to/bt5/core/* /mnt/bt5img/
    unmount your .img, place it on your sdcard, and your all set.






    ==============================
    Changes in v0.3
    ==============================

    - Trimmed alot of fat, fits inside of 3.3 image now, though space is SEVERLY limited (removed CUPS and sound stuff, who needs to print from within thier phone anyways?)

    - various small changes for performace improvements.
    - a few new tools installed, but not tested
    - restored my personal version that i nuked. It works now.

    NEW STUFF TO COME, STAY TUNED!!!
    File allegati File allegati

  2. #2
    Moderator g0tmi1k's Avatar
    Join Date
    Feb 2010
    Posts
    1,771

    Default Re: 3 Different ways to store BT5 on Android Phone (SDCard Required)

    Thanks for taking the time to post this, however the above guide & files haven't been tested by the backtrack-linux development team.
    No-one can not be held responsible if it doesn't work of if the attachment(s) contain any malicious code. You are on your own.
    Have you...g0tmi1k?

Similar Threads

  1. Booting bt5 from sdcard
    By dorddszv in forum BackTrack 5 Beginners Section
    Replies: 8
    Last Post: 09-16-2011, 01:07 PM
  2. Is it possible to run backtrack on an Android Phone?
    By sean9461 in forum Beginners Forum
    Replies: 16
    Last Post: 04-18-2011, 10:58 AM
  3. Script for saving changes to a live usb stick / sdcard
    By cleguevara in forum OLD BT3beta Bugs and Fixes
    Replies: 6
    Last Post: 04-15-2008, 07:09 PM
  4. Where does BT2.0 store the Airodump capture files?
    By virtthemaest in forum OLD LiveCD Support
    Replies: 5
    Last Post: 11-06-2007, 04:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •