[chroot] BT5 chroot scripts

Search This thread

edounn

Senior Member
Dec 6, 2010
97
16
Austin, TX
Bt5 & ubuntu chroot scripts, slighly modified from att GNote version. credit goes to (i assume) msullivan

scripts
http://dl.dropbox.com/u/4109264/chroot.zip
image
BT5 https://www.box.com/s/bi2ix44bi1urufdpatjq
Or Download it from Backtrack's website.
choose BT5
Arch: arm
Image: IMG
http://www.backtrack-linux.org/downloads/

::Ubuntu image and scripts:::
http://ubuntuone.com/1Ew1232e3D51PCjYOkkQU7
http://ubuntuone.com/6majPjQf42Mplb0RZpMjIF


unzip chroot.zip into /sdcard/bt5/ on your phone

(I can't give you the bt5.img I have, it already has a bunch of my stuff in it, just download the bt5.img here, from msullivans post, and take just the bt5.img and put it in your /sdcard/bt5/ folder with that you unzipped earlier.

You should have these files in /sdcard/bt5
bt.sh
mountonly
unionfs
fsrw
bt5.img

Once your files match what's shown above open terminal and:
gain root access for terminal
Code:
su
run the script from the directory
Code:
sh /sdcard/bt5/bt.sh
or change to the dir /sdcard/bt5
Code:
cd /sdcard/bt5
and run sh bt.sh
Code:
sh bt.sh

You should see it start up, and you'll be prompted to start VNC. type Y, for yes, enter

Because our phones are awesome, we want 1280X800 on our images. So, after you have answered yes to starting VNC, we need to edit /usr/bin/startvnc file.
Code:
vi /usr/bin/startvnc
change the last line to (it should say something like vncserver -geometry 800X480)
vncserver -geometry 1280x800

At this point the easy way is restart your phone, and start up bt5 again.

then go to VNC

Nickname: BackTrack5
Password: root
Address: 127.0.0.1
Port: 5901

_______________________________________________________

TL;DR:

  • edit /usr/bin/startvnc (in chroot) to vncserver -geometry 1280x800
  • restart phone, run bt.sh; sh /sdcard/bt5/bt.sh, and start up VNC


It's awesome, and works great with the BT mouse/keyboard, and the extra resolution makes it feel better than the old OQO's :). it's awesome
capture_03.png
 
Last edited:

edounn

Senior Member
Dec 6, 2010
97
16
Austin, TX
also, if you want ubuntu, download the ARM ubuntu.img on XDA (there are everywhere) and just drop it in the folder, rename it to bt.img. (easy way) or change the bt.sh to reflect ubuntu.img everywhere it says bt.img
 

DanMc85

Senior Member
Jan 6, 2008
631
264
USA
very interested in this... is this BT5 regular or or is this the version 5 R1 release?

- Dan
 

edounn

Senior Member
Dec 6, 2010
97
16
Austin, TX
Mine is regular bt5, not sure what the images i linked to are. My image is a year old and was used on my atrix too. But i see no reason a new image would'nt work. I'll try to post an image tonight
 
Last edited:

dan.expo

Senior Member
Sep 10, 2009
78
5
Sorry to bother you but I'm getting the following error:

$ export PATH=/data/local/bin:$PATH
$ su
# sh /sdcard/bt5/bt.sh
mkdir failed for /data/local/mnt, File exists
Loop device exists
losetup: /dev/block/loop255: No such file or directory
mount: Invalid argument
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/bt.sh: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
/sdcard/bt5/bt.sh: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
/sdcard/bt5/bt.sh: cannot create /data/local/mnt/etc/hosts: directory nonexistent
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device

chroot: can't execute '/bin/bash': No such file or directory
Shutting down BackTrack ARM
failed.
failed.
failed.
failed.
losetup: /dev/block/loop255: No such device or address
#

Any ideas?

Sent from my SGH-I717R using xda premium
 

dan.expo

Senior Member
Sep 10, 2009
78
5
Yes, I have the newest version 1.19.4 from the installer but no avail.

Sent from my SGH-I717R using xda premium
 

dan.expo

Senior Member
Sep 10, 2009
78
5
Ya it looks like I only have loop 1-7 so I guess I need to edit the script to one of those?

Sent from my SGH-I717R using xda premium
 

edounn

Senior Member
Dec 6, 2010
97
16
Austin, TX
it works fine on mine and my buddies. I'll upload the script I have once more. The ones having problems? have you flashed anything? Both the ones I have seen personally working, mine and my buddies, both are stock, rooted, normal stuff.


/mnt/sdcard/bt5 # cat bt.sh
Code:
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires root! Type: su"; exit; fi
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/bt5
export bin=/system/bin
export mnt=/data/local/mnt
export USER=root
mkdir $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
if [ -b /dev/block/loop255 ]; then
	echo "Loop device exists"
else
	busybox mknod /dev/block/loop255 b 7 255
fi
#mount -o loop,noatime -t ext2 $kit/bt5.img $mnt
losetup /dev/block/loop255 $kit/bt5.img
mount -t ext2 /dev/block/loop255 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost bt5" > $mnt/etc/hosts
echo "Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:"
ifconfig eth0
echo " "
busybox chroot $mnt /bin/bash

echo "Shutting down BackTrack ARM"
umount $mnt/dev/pts
umount $mnt/proc 
umount $mnt/sys 
umount $mnt
losetup -d /dev/block/loop255
 
Last edited:

dan.expo

Senior Member
Sep 10, 2009
78
5
I have the overclock kernel and stock rogers rom. I managed to get the universal phone bt5 script working without issue (not optimized for the note mind you).

Sent from my SGH-I717R using xda premium
 

edounn

Senior Member
Dec 6, 2010
97
16
Austin, TX
i think i changed something, and uploaded the normal one, just change the vnc file as per the instructions on the main post, and it'll be ready to go.
 

x3maniac

Inactive Recognized Developer
Sep 2, 2008
361
453
New York
www.novaspirit.com
Sorry to bother you but I'm getting the following error:

$ export PATH=/data/local/bin:$PATH
$ su
# sh /sdcard/bt5/bt.sh
mkdir failed for /data/local/mnt, File exists
Loop device exists
losetup: /dev/block/loop255: No such file or directory
mount: Invalid argument
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/bt.sh: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
/sdcard/bt5/bt.sh: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
/sdcard/bt5/bt.sh: cannot create /data/local/mnt/etc/hosts: directory nonexistent
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device

chroot: can't execute '/bin/bash': No such file or directory
Shutting down BackTrack ARM
failed.
failed.
failed.
failed.
losetup: /dev/block/loop255: No such device or address
#

Any ideas?

Sent from my SGH-I717R using xda premium

check your mount

type mount and look for /dev/block/mmcblk0pXX /system something like that where XX is the number you need to change in the script file.
should look somethinig like this

mount -o remount,rw /dev/block/mmcblk0p24 /system

24 depending on what you see in your file system.

i'm on Tmobile Galaxy Note. and i was able to use this script by changing that
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Bt5 & ubuntu chroot scripts, slighly modified from att GNote version. credit goes to (i assume) msullivan

    scripts
    http://dl.dropbox.com/u/4109264/chroot.zip
    image
    BT5 https://www.box.com/s/bi2ix44bi1urufdpatjq
    Or Download it from Backtrack's website.
    choose BT5
    Arch: arm
    Image: IMG
    http://www.backtrack-linux.org/downloads/

    ::Ubuntu image and scripts:::
    http://ubuntuone.com/1Ew1232e3D51PCjYOkkQU7
    http://ubuntuone.com/6majPjQf42Mplb0RZpMjIF


    unzip chroot.zip into /sdcard/bt5/ on your phone

    (I can't give you the bt5.img I have, it already has a bunch of my stuff in it, just download the bt5.img here, from msullivans post, and take just the bt5.img and put it in your /sdcard/bt5/ folder with that you unzipped earlier.

    You should have these files in /sdcard/bt5
    bt.sh
    mountonly
    unionfs
    fsrw
    bt5.img

    Once your files match what's shown above open terminal and:
    gain root access for terminal
    Code:
    su
    run the script from the directory
    Code:
    sh /sdcard/bt5/bt.sh
    or change to the dir /sdcard/bt5
    Code:
    cd /sdcard/bt5
    and run sh bt.sh
    Code:
    sh bt.sh

    You should see it start up, and you'll be prompted to start VNC. type Y, for yes, enter

    Because our phones are awesome, we want 1280X800 on our images. So, after you have answered yes to starting VNC, we need to edit /usr/bin/startvnc file.
    Code:
    vi /usr/bin/startvnc
    change the last line to (it should say something like vncserver -geometry 800X480)
    vncserver -geometry 1280x800

    At this point the easy way is restart your phone, and start up bt5 again.

    then go to VNC

    Nickname: BackTrack5
    Password: root
    Address: 127.0.0.1
    Port: 5901

    _______________________________________________________

    TL;DR:

    • edit /usr/bin/startvnc (in chroot) to vncserver -geometry 1280x800
    • restart phone, run bt.sh; sh /sdcard/bt5/bt.sh, and start up VNC


    It's awesome, and works great with the BT mouse/keyboard, and the extra resolution makes it feel better than the old OQO's :). it's awesome
    capture_03.png