Backtrack issue HTC jetstream - General Questions and Answers

Greetings.
Ive used following script , HTC jetsteam rooted unlocked bootloader.
Code:
if [ "$perm" != "0" ];then echo "This Script Needs Root! Type : su";exit;fi
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/bt
export bin=/system/bin
export mnt=/data/local/mnt
mkdir -p $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/loop2 ]; then
echo "Loop device exists"
else
busybox mknod /dev/loop2 b 7 0
fi
mount -o loop,noatime -t ext2 $kit/bt5.img $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 "127.0.0.1 localhost bt5" > $mnt/etc/hosts
busybox chroot $mnt /bin/bash
echo "Shutting down BackTrack ARM For Xoom"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
but keep getting error message .
can't execute /bin/bash no such file or directory.
Hope to hear from you guys.
Regards
Net_Spy

May be u might not have busybox installed after rooting ur phone
Hit thanks rather than typing it

Well I do have busybox installed in my device.
Regards
Net_Spy

Related

Setup Ubuntu Maveric with 3G Image It Works Running 2 Operating systems simultaneousl

UPDATE: 01/13/11 Scrap Most of this,
got a 3G working image works 10tmes better than anything i have seen.
UPDATE go here:http://forum.xda-developers.com/showthread.php?t=912544
have networking with hamachi, ssh works coolstuff:
trying to put it together (steps to create, and emulate on your computer, an image to get worken on your phone,) it works for the epic also which i have to say i prefer because of the slide-out, ya no wat. as soon as possible 2 DAYS TOPS
To Install Ubuntu Maveric on your Phone:
Of course you must have a rooted phone, since your rom must use a kernel with Loop support, I have only tested this on CyanogenMod Nightly build 199
make sure you have busybox installed
To create the image You have to start with a computer running Ubuntu or setup Virtual Box on a Windows computer,
or go here http://w3.impa.br/~gabrield/data/ubuntu-arm-development-rootfs.tar.bz2 to download the prebuilt one ( i havnt tested it)
1: Open Terminal in Ubuntu
2: Enter:
sudo apt-get install rootstock. After installing Rootstock, again in ubuntu terminal,
​Enter,
3: sudo rootstock --fqdn ubuntu --login ubuntu --password ubuntu --imagesize 2G --notarball .
​You can change login and password to your desire and ​also change imagesize 1G 2G and soforth
Your ubuntu-arm.img will be created in about 15 min or so. Take that arm.img and use Ark to crush it down to under 200meg if you would like or and or change name to ubuntu.img.
Using file manager, Create a folder (on your phone) /sdcard/ubuntu
and transfer ubuntu.img to your sdcard folder, ubuntu.
Copy the following text including the (#) and paste into notepad++
(get it http://notepad-plus-plus.org/download) or in linux gedit or Eqvlnt.
Save as sdcard/ubuntu/bootubuntu (no extension)nothing more.
#modprobe ext2
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
fi
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img
mount -t ext2 /dev/block/loop1 /data/local/ubuntu
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/loop1
AND DO THE SAME FOR THE NEXT 4 FILES AND NAME THEM CORRECTLY AND USE THE RIGHT TEXT EDITOR
This next file is called sdcard/ubuntu/unionfs (remember no file ext.)
busybox insmod unionfs
mount -t unionfs -o dirs=$mnt/etc=rw:/etc=ro unionfs /etc
mount -o remount,rw /
ln -s $mnt/lib /
for x in \
bin boot home media mnt \
opt selinux srv usr var
do
ln -s $mnt/$x /
done
rmdir /root
ln -s $mnt/root /
mount -o remount,ro /
mount -t unionfs -o dirs=$mnt/sbin=rw:/sbin=ro unionfs /sbin
mount -t unionfs -o dirs=$mnt/dev=rw:/dev=rw unionfs /dev
mount -t devpts devpts /dev/pts
This next file is called sdcard/ubuntu/fsrw (remember no file ext.)
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
echo "Filesytem remounted as read/write"
This next file is called sdcard/ubuntu/mountonly (remember no file ext.)
# Based on Saurik's remount.sh - modified by Mark Walker of http://www.androidfanatic.com
# Email [email protected]
modprobe ext2
clear
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/debian
export bin=/data/local/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
busybox insmod ext2
clear
echo " "
mount -o loop,noatime $kit/debian.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
echo "Custom Linux IMG Mounter V1.0 - by Mark Walker"
echo "WEB: http://www.androidfanatic.com"
echo "EML: [email protected]"
sleep 1
echo "AutoMounter started"
sleep 1
echo "REBOOT PHONE TO PROPERLY DISMOUNT"
echo " "
# chroot $mnt /bin/bash
This next file is called sdcard/ubuntu/ubuntu.sh (this one has .sh for file ext)
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
modprobe ext2
clear
rm -f /data/local/bin/fsrw
rm -f /data/local/bin/bootubuntu
rm -f /data/local/bin/unionfs
rm -f /data/local/bin/installer.sh
rm -f /data/local/bin/mountonly
mkdir /data/local/mnt
clear
rm /system/bin/fsrw
rm /system/bin/bootubuntu
rm /system/bin/unionfs
rm -/system/bin/mountonly
cp -f fsrw /system/bin
cp -f bootubuntu /system/bin
cp -f unionfs /system/bin
cp -f mountonly /system/bin
cd /sdcard/ubuntu
chmod 4777 *
cd /system/bin/
chmod 4777 *
cd /
clear
echo " "
echo "Ubuntu Chroot Bootloader v0.1"
echo "Ubuntu Bootloader is now installed!"
echo "This process does NOT damage Android OS!"
echo " "
echo "Original Installer by Charan Singh"
echo "Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net"
echo " "
echo "To enter the Debian Linux console just type 'bootubuntu'"
bootubuntu
After you have,
bootubuntu
fsrw
mountonly
unionfs
ubuntu.sh
ubuntu.img
in your /sdcard/ubuntu folder
Open adb shell
Enter:
su
cd /sdcard/ubuntu
sh ./ubuntu.sh
apt-get update
apt-get install tightvncserver
apt-get install lxde
export USER=root
vncserver :0 -geometry 1024x800
cat > front
export USER=root
cd /
rm -r -f /tmp
mkdir /tmp
cd /
vncserver :0 -geometry 1024x800
(cntrl D, cntrl D then Enter)
cat front /root/.bashrc > temp
cp temp /root/.bashrc
Get Android VNC for you phone (market)
open app
enter 5900 for port
enter password you setup for vncserver
set graphics for 24 bit
Connect
let the fun begin
Next update: How to network with Hamachi
It does work
ill give this a try tommorow..
Gonna, maybe, dive in.
Fire up an ubuntu image and then connect to it with vnc... I think I'll wait for the movie to come out and save the battery life. Hey wait, thats an idea. We could make a video of someone using ubuntu, and then play it on our phone so it feels like ubuntu. Might even do better on the battery life / "useful" factor.
(I've seen this method before, so keep in mind I am poking fun at the people who would want to do this and not you for sharing this with us.)
flexgrip said:
Fire up an ubuntu image and then connect to it with vnc... I think I'll wait for the movie to come out and save the battery life. Hey wait, thats an idea. We could make a video of someone using ubuntu, and then play it on our phone so it feels like ubuntu. Might even do better on the battery life / "useful" factor.
(I've seen this method before, so keep in mind I am poking fun at the people who would want to do this and not you for sharing this with us.)
Click to expand...
Click to collapse
What is your superior method?
I believe he's referring to the idea of running Ubuntu on a phone in general. I have trouble seeing the usefulness, but it's very interesting. Thanks for the post, OP.
Sent from my PC36100 using XDA App
TheMagicalSock said:
I believe he's referring to the idea of running Ubuntu on a phone in general. I have trouble seeing the usefulness, but it's very interesting. Thanks for the post, OP.
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
If that's the case, then I gave him too much credit. This is a fantastic How-To.
I put this to anyone:
UPDATE:
FIXED WILL POST FIX SOON (had to use MAKEDEV)
THIS IS GREAT YAHOOOO
Hi i was hoping you could help me with this problem:
I am using (on a dedicated ubuntu computer with Maverick edition)"https://wiki.ubuntu.com/ARM/RootfsFromScratch" example to create a qemu image using "sudo rootstock --fqdn ubuntu --login ubuntu --password ubuntu --seed nano --notarball --imagesize 3G".
I have also used the "sudo project-rootstock/rootstock --fqdn ubuntu --login ubuntu --password ubuntu --seed nano --notarball --imagesize 3G"
and: "sudo ./rootstock --fqdn ubuntu --login ubuntu --password ubuntu --seed nano --notarball --imagesize 3G" way.
They all work great. I am able to load the image with qemu, got ssh setup and working alls great in life.
The problem lies HERE.......
I am using these images (mostly for fun), to setup ubuntu onto my Evo and Epic smartphones using this method: "http://forum.xda-developers.com/showthread.php?t=881401" to chroot the image.
ITS AWSOME IT WORKS AND LOTS OF FUN!
well sorry for screaming but it really excites me this open source Ubuntu Stuff. (i am a win user, but I found a new toy)
Using the prebuilt image everything works excellent (except for the small image size 2G) that is why i need to use my 3G built image.
My problem: My built image works flawlessly as well, with one exception, (that i have noticed) is, inside ubuntu (on my phone chrooted with android) the terminals do not have a prompt# only black, square curser, and will not except input. I have to use the terminal program inside android to apt-get and such.
I have noticed with my build images, using apt-get during install, i see "Can not write log, openpty() failed (/dev/pts not mounted?)"
error. My reserch says terminals wont work if system cannot write to /dev/pts.
The prebuilt image does not have this issue.
What is the differance with the prebuilt that is offered here "wget -c http://w3.impa.br/~gabrield/data/ubuntu-arm-development-rootfs.tar.bz2", and the images I create using the steps outlined in the article.
Is there modifications prior to or after creation, or is this someting different altogether.
I really have been pulling the little bit of hair i have left out of my head for a week now
HELP.!!!
p.s. I have tried all builds etc; karmic,lucid same results
Try mounting dev/pts says it is mounted but busy
To Homefix :
Did you try "sudo apt-get install ..." ?
To change bash prompt did you try "export PS1=#" ?
What is an output of "id" command? If you get anything other than root, add that user to root group, or just "su" maybe?
Can someone please post some pics or a video of this working?
generalExpert said:
Can someone please post some pics or a video of this working?
Click to expand...
Click to collapse
Its the same as having Ubuntu on your desktop monitor only smaller
Wouldn't unity work better on a phone
Sent from my PC36100 using XDA App

[Tutorial] Ubuntu on Evo? Not Again! no wait, this is different

UPDATE GO HERE: http://forum.xda-developers.com/showthread.php?t=932754
Revised Ubuntu Installation Created By Homefix and RooferDave
I just put this together today, gotta get back to work, the snowstorms over (im from western NY) might be errors will edit and update as time permits
all scripts contain original authors and credits where aplicable.​This tutorial will show you how to create a Debian Image, Emulate that image using The Qemu Emulator in Ubuntu.And finally setup that image on your EVO
I cannot be held responsible if your foolish enough to do, what is outlined below!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I will take the time to post the credits soon.
However the scripts speak for themselves and the creators have left there info in them.
Thanks really goes out to them.
Most of this came from here: https://wiki.edubuntu.org/ARM/BuildArmPackages
Things you need:
# I hope you have the EVO (last i heard radio shack may have 1 left. DRIVE CAREFULLY, theres snow everywere).
# Computer BestBuy ? I prefer to build my own (Brite Computers Fishers NY).​and a small note, you need ubuntu ruuning do do any of the image creation-manipulation.
​I wasnt able to get VBOX to emulate the Image so... UPDATE yes i was able to get it working i was having a router issue.So give VBOX a try http://www.virtualbox.org/wiki/Downloads
you can either try to get it to work with VBOX,(goodluck), or dust off one of your old computers and get Ubuntu up.
But you may have to do what i did, i yanked out the family computer from the living room and fit in my literally 4' x 7' office to get this done.
i dont worry to much, i know they love me for spending the last 2 weeks with my face attached to the monitor.
# Rom: CyanogenMod-6. You could try others. (i tell my daughter who always copies her sister "you are your own nucklehead").​(good luck finding these links) http://wiki.cyanogenmod.com/index.php?title=Latest_Version#HTC_Evo_4G
Nightlies here: (i prefer this addiction over others). http://mirror.teamdouche.net/?type=nightly ​# PLENTY OF PATIENCE
Get your phone ready: http://forum.xda-developers.com/wiki/index.php?title=HTC_Supersonic/Guides_%26_Tutorials#Guides_For_Root
Root: http://forum.xda-developers.com/wik...Supersonic/Guides_&_Tutorials#Guides_For_Root
Setup ADB: http://forum.xda-developers.com/showthread.php?t=694250
Setup Ubuntu http://www.ubuntu.com/desktop/get-ubuntu/download
My 3G Karmic Rootstock Image http://www.megaupload.com/?d=SJY6ZB58
login dad
passwd f
root passwd not set
then go to line 1000
let me know if i have the right one posted.
Setup Rootstock ​IN THE BEGINING
In your Ubuntu terminal type: "mkdir /<your home directory>/qemuArm"
(dont includ the < >'s or the ""'s) your home directory usually is /home/<your user name>/
then: cd /<your home directory>/qemuArm
then: sudo apt-get install qemu qemu-kvm-extras
then: sudo apt-get install debootstrap (if you dont have it already)
then: sudo apt-get install fakeroot (if you dont have it already)
then: sudo apt-get install bzr (if you dont have it already)
then: (download rootstock bzr branch)
sudo bzr branch lp:roject-rootstock
then: (download kernel to /<your home directory>/qemuArm) just
make sure you dont leave the, /<your home directory>/qemuArm directory​CREATION
then: (create your image)
​sudo project-rootstock/rootstock --fqdn ubuntu --login ubuntu --password ubuntu --notarball --imagesize 3G --seed nano
or: custimize your image with the info in the readme file, in the /<your home directory>/qemuArm/project-rootstockfolder​(when your image is complete)
then: (make a copy)
cp qemu-armel-<replace with your #>.img <whatever you name it>.img (remove the <>'s)​EMULATION
Download the http://ports.ubuntu.com/ubuntu-ports/dists/lucid/main/installer-armel/current/images/versatile/netboot/ to ~/qemuArm
USE THIS WEBPAGE AND FIND THE LINK FOR YOUR KERNEL VERSATILE
https://wiki.edubuntu.org/ARM/BuildArmPackages
Then: (start your emulation) -----> dont forget to remove the <>'s <------
sudo qemu-system-arm -M versatilepb -cpu cortex-a8 -kernel ./vmlinuz -hda <whatever you name it>.img -m 256 -append "root=/dev/sda mem=256M devtmpfs.mount=0 rw"
then: (hopefully you will see a blank screen)
press alt-F1 if you do not see a login prompt go back to the begining​SO LET THER BE LIGHT
then: log in
then: (to change password)
sudo tmppwd ubuntu and to change login name never do "usermod -l newname -m -d /home/newname oldname" pic the right name at creation.
then: sudo tmppwd root (if you want to set root password) ​THEN THERE WERE TWO
In the Emulated terminal:
(configure network connections)​sudo nano /etc/network/interfaces
add: (under existing entries of the file):
auto eth0
iface eth0 inet dhcp ​then cntrl-X, confirm save, and exit.
then sudo ifconfig eth0 up
then sudo dhclient eth0
then sudo apt-get update (if it aint broke dont fix it) otherwise go back to the beginning​BORN AGAIN
On the Host System make sure Qemu is not running.
then: (install some more stuff)
sudo apt-get install bridge-utils
This assumes if you have a basic networking system with eht0 as interface
then: (configure network bridge)​
sudo nano /etc/network/interfaces
add: (under existing entries of the file)
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_maxwait 0 ​then: cntrl-X, confirm save, and exit.
then: sudo ifconfig eth0 0.0.0.0
then: sudo ifup br0
then: (Load the tun module (you can add tun to /etc/modules if you want it to load on boot)
sudo modprobe tun
then: set permissions
sudo chmod 0666 /dev/net/tun
then: (change Qemu Script)
sudo nano /etc/qemu-ifup
add: a "#" symbol to all existing entries except the first line (got it?)
add: (under existing entries of the file):
echo "Executing /etc/qemu-ifup"
echo "Bringing up $1 for bridged mode..."
sudo /sbin/ifconfig $1 0.0.0.0 promisc up
echo "Adding $1 to br0..."
sudo /usr/sbin/brctl addif br0 $1
sleep 2
​then: set permissions
sudo chmod +x /etc/qemu-ifup
then: start emulation
sudo qemu-system-arm -M versatilepb -cpu cortex-a8 -kernel ./vmlinuz -hda <whatever you name it>.img -m 256 -append "root=/dev/sda mem=256M devtmpfs.mount=0 rw" -net nic -net tap​then: login
then: sudo apt-get install openssh-server
if: that goes well, your home free (we'll discuss errors later)​LEARN TO TALK
Now: you can ssh into or scp to your ARM VM from the host.
get ip address to ssh into or scp to, by simply running ifconfig in the ARM terminal.
install your applications
Or just get right to it and see what this is all about​LEARN TO WALK
Now: we will setup the chroot
Change your imagename to ubuntu.img
Using file manager, Create a folder (on your phone) /sdcard/ubuntu,
and transfer ubuntu.img to your sdcard folder, ubuntu.​Copy the following text including the (#) and paste into notepad++ ​(get it http://notepad-plus-plus.org/download) or in linux gedit or Eqvlnt. ​Save as sdcard/ubuntu/bootubuntu (no extension)nothing more.​#modprobe ext2
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
fi
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img
mount -t ext2 /dev/block/loop1 /data/local/ubuntu
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/loop1
AND DO THE SAME FOR THE NEXT 4 FILES AND NAME THEM CORRECTLY AND USE THE RIGHT TEXT EDITOR
This next file is called sdcard/ubuntu/unionfs (remember no file ext.)
busybox insmod unionfs
mount -t unionfs -o dirs=$mnt/etc=rw:/etc=ro unionfs /etc
mount -o remount,rw /
ln -s $mnt/lib /
for x in \
bin boot home media mnt \
opt selinux srv usr var
do
ln -s $mnt/$x /
done
rmdir /root
ln -s $mnt/root /
mount -o remount,ro /
mount -t unionfs -o dirs=$mnt/sbin=rw:/sbin=ro unionfs /sbin
mount -t unionfs -o dirs=$mnt/dev=rw:/dev=rw unionfs /dev
mount -t devpts devpts /dev/pts
This next file is called sdcard/ubuntu/fsrw (remember no file ext.)
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
echo "Filesytem remounted as read/write"
This next file is called sdcard/ubuntu/mountonly (remember no file ext.)
# Based on Saurik's remount.sh - modified by Mark Walker of http://www.androidfanatic.com
# Email [email protected]
modprobe ext2
clear
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/debian
export bin=/data/local/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
busybox insmod ext2
clear
echo " "
mount -o loop,noatime $kit/debian.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
echo "Custom Linux IMG Mounter V1.0 - by Mark Walker"
echo "WEB: http://www.androidfanatic.com"
echo "EML: [email protected]"
sleep 1
echo "AutoMounter started"
sleep 1
echo "REBOOT PHONE TO PROPERLY DISMOUNT"
echo " "
# chroot $mnt /bin/bash
This next file is called sdcard/ubuntu/ubuntu.sh (this one has .sh for file ext)
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
modprobe ext2
clear
rm -f /data/local/bin/fsrw
rm -f /data/local/bin/bootubuntu
rm -f /data/local/bin/unionfs
rm -f /data/local/bin/installer.sh
rm -f /data/local/bin/mountonly
mkdir /data/local/mnt
clear
rm /system/bin/fsrw
rm /system/bin/bootubuntu
rm /system/bin/unionfs
rm -/system/bin/mountonly
cp -f fsrw /system/bin
cp -f bootubuntu /system/bin
cp -f unionfs /system/bin
cp -f mountonly /system/bin
cd /sdcard/ubuntu
chmod 4777 *
cd /system/bin/
chmod 4777 *
cd /
clear
echo " "
echo "Ubuntu Chroot Bootloader v0.1"
echo "Ubuntu Bootloader is now installed!"
echo "This process does NOT damage Android OS!"
echo " "
echo "Original Installer by Charan Singh"
echo "Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net"
echo " "
echo "To enter the Debian Linux console just type 'bootubuntu'"
bootubuntu
After you have,
bootubuntu
fsrw
mountonly
unionfs
ubuntu.sh
ubuntu.img
in your /sdcard/ubuntu folder
Open adb shell
Enter: su
then: cd /sdcard/ubuntu
then: sh ./ubuntu.sh
then: apt-get update
then: apt-get install tightvncserver
then: apt-get install lxde
this is LINE 1000
then: export USER=root
then: vncserver :0 -geometry 1024x800
then: cat > front
then: export USER=root
then: cd /
then: rm -r -f /tmp
then: mkdir /tmp
then: cd /
then: vncserver :0 -geometry 1024x800
then: press "cntrl D", "cntrl D" again, then Enter)
then: cat front /root/.bashrc > temp
then: cp temp /root/.bashrc
then:
Get Android VNC for you phone (market)
open app
enter 5900 for port
enter password you setup for vncserver
enter (for nick) username you picked during creation
enter (for address) localhost
set graphics for 24 bit
Connect
let the fun begin
Next update: How to network with Hamachi
It does work
nice work
Lol im usually all for this stuff but this looks much too frigthening
thetony said:
Lol im usually all for this stuff but this looks much too frigthening
Click to expand...
Click to collapse
Its really easy, download the zip,
put the ubuntu folder on your sdcard go to line 1000 in the tutorial.
Can u make or received call
alphaeagle777 said:
Can u make or received call
Click to expand...
Click to collapse
yes you have full function of your phone
Alright, I'm going to give this a try while I'm at work (shhhh). I'm curious though, why did you use Karmic? Is it possible with Maverick?
ioos said:
Alright, I'm going to give this a try while I'm at work (shhhh). I'm curious though, why did you use Karmic? Is it possible with Maverick?
Click to expand...
Click to collapse
Well? How did it go?
Hemidroids said:
Well? How did it go?
Click to expand...
Click to collapse
yes it works with maverick theres really no differance that i noticed

[Tutorial] Ubuntu on Epic ? Not Again! no wait, this is different

UPDATE GO HERE:
http://forum.xda-developers.com/showthread.php?p=10972597#post10972597
Revised Ubuntu Installation Created By Homefix and RooferDave
This tutorial will show you how to create a Debian Image, Emulate that image using The Qemu Emulator in Ubuntu.And finally setup that image on your EPIC​
I just put this together yesterday, its from my EVO post: http://forum.xda-developers.com/showthread.php?t=881401 .gotta get back to work, the snowstorms over (im from western NY) might be errors will edit and update as time permits
This is made for the epic, but i will try to catch all the changes, i think i got most of em.
Listen up you knuckles, on the evo i can ssh, setup and use samba shares(using hamachi network for connectability), nautilus-shares works, programs dont close, cpu meter works, it truly is like a mini computer in your pocket.
I hope with CyanogenMod i can have the same results because obviosly the epic exceeds the evo because of the keyboard (for this kind of stuff). It sucks to loose half your screen to the input method (with the evo), But i wish the screensize was larger.
For now until there are some kernel changes(hamachi does not work) I have to spend my time playing with that.(Hamachi works in the Evo
However ubuntu seems to run better on the evo
UPDATE cant get Hamachi installed gotta wait for kernel changes -
I guess you can never have the best of both worlds
all scripts contain original authors and credits where aplicable.
I cannot be held responsible if your foolish enough to do, what is outlined below!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I will take the time to post the credits soon.
However the scripts speak for themselves and the creators have left there info in them.
Thanks really goes out to them.
Most of this came from here: https://wiki.edubuntu.org/ARM/BuildArmPackages
Things you need:
# I hope you have the Epic (last i heard radio shack may have 1 left. DRIVE CAREFULLY, theres snow everywere).
# Computer maybe , BestBuy ? I prefer to build my own (Brite Computers Fishers NY).
and a small note, you need ubuntu ruuning do do any of the image creation-manipulation.
I wasnt able to get VBOX to emulate the Image so...
you can either try to get it to work with VBOX,(goodluck), or dust off one of your old computers and get Ubuntu up.
UPDATE: got VBOX working was router issue. so give it a try.
But you may have to do what i did, i yanked out the family computer from the living room and fit in my literally 4' x 7' office to get this done.
i dont worry to much, i know they love me for spending the last 2 weeks with my face attached to the monitor.
# Rom: CyanogenMod-6. You could try others. (i tell my daughter who always copies her sister "you are your own nucklehead").
http://android.stolenrobot.com/Epic4G/epic.htm
Nightlies here: (i prefer this addiction over others). http://mirror.teamdouche.net/?type=nightly
# PLENTY OF PATIENCE
Get your phone ready: http://forum.xda-developers.com/showthread.php?t=770388
Setup ADB: http://forum.xda-developers.com/showthread.php?t=694250
Setup Ubuntu http://www.ubuntu.com/desktop/get-ubuntu/download
My 3G Prebuilt Image is http://www.megaupload.com/?d=SJY6ZB58
login dad
passwd f
root passwd not set
DO NOT USE THOSE SCRIPTS USE THESE: http://www.megaupload.com/?d=1NLU3XDU
sorry im late, having trouble upload (free account). this is for the evo. let me know if you can create new files on your desktop, if not you will have to wait until i foward the epic image.
Setup Rootstock
IN THE BEGINING
In your Ubuntu terminal type: "mkdir /<your home directory>/qemuArm"
(dont includ the < >'s or the ""'s) your home directory usually is /home/<your user name>/
then: cd /<your home directory>/qemuArm
then: sudo apt-get install qemu qemu-kvm-extras
then: sudo apt-get install debootstrap (if you dont have it already)
then: sudo apt-get install fakeroot (if you dont have it already)
then: sudo apt-get install bzr (if you dont have it already)
then: (download rootstock bzr branch)
sudo bzr branch lproject-rootstock
then: (download kernel to /<your home directory>/qemuArm) just
make sure you dont leave the, /<your home directory>/qemuArm directory
CREATION
then: (create your image)
sudo project-rootstock/rootstock --fqdn ubuntu --login ubuntu --password ubuntu --notarball --imagesize 3G --seed nano
or: custimize your image with the info in the readme file, in the /<your home directory>/qemuArm/project-rootstockfolder
(when your image is complete)
then: (make a copy)
cp qemu-armel-<replace with your #>.img <whatever you name it>.img (remove the <>'s)
EMULATION
1.Download the http://ports.ubuntu.com/ubuntu-port...aller-armel/current/images/versatile/netboot/ to ~/qemuArm
USE THIS WEBPAGE AND FIND THE LINK FOR YOUR KERNEL VERSATILE
https://wiki.edubuntu.org/ARM/BuildArmPackages
Then: (start your emulation) -----> dont forget to remove the <>'s <------
sudo qemu-system-arm -M versatilepb -cpu cortex-a8 -kernel ./vmlinuz -hda <whatever you name it>.img -m 256 -append "root=/dev/sda mem=256M devtmpfs.mount=0 rw"
then: (hopefully you will see a blank screen)
press alt-F1 if you do not see a login prompt go back to the begining
SO LET THER BE LIGHT
then: log in
then: (to change password)
sudo tmppwd ubuntu and to change login name never do "usermod -l newname -m -d /home/newname oldname" pic the right name at creation.
then: sudo tmppwd root (if you want to set root password)
THEN THERE WERE TWO
In the Emulated terminal:
(configure network connections)
sudo nano /etc/network/interfaces
add: (under existing entries of the file):
auto eth0
iface eth0 inet dhcp
then cntrl-X, confirm save, and exit.
then sudo ifconfig eth0 up
then sudo dhclient eth0
then sudo apt-get update (if it aint broke dont fix it) otherwise go back to the beginning
BORN AGAIN
On the Host System make sure Qemu is not running.
then: (install some more stuff)
sudo apt-get install bridge-utils
This assumes if you have a basic networking system with eht0 as interface
then: (configure network bridge)
•sudo nano /etc/network/interfaces
add: (under existing entries of the file)
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_maxwait 0
then: cntrl-X, confirm save, and exit.
then: sudo ifconfig eth0 0.0.0.0
then: sudo ifup br0
then: (Load the tun module (you can add tun to /etc/modules if you want it to load on boot)
sudo modprobe tun
then: set permissions
sudo chmod 0666 /dev/net/tun
then: (change Qemu Script)
sudo nano /etc/qemu-ifup
add: a "#" symbol to all existing entries except the first line (got it?)
add: (under existing entries of the file):
echo "Executing /etc/qemu-ifup"
echo "Bringing up $1 for bridged mode..."
sudo /sbin/ifconfig $1 0.0.0.0 promisc up
echo "Adding $1 to br0..."
sudo /usr/sbin/brctl addif br0 $1
sleep 2
then: set permissions
sudo chmod +x /etc/qemu-ifup
then: start emulation
sudo qemu-system-arm -M versatilepb -cpu cortex-a8 -kernel ./vmlinuz -hda <whatever you name it>.img -m 256 -append "root=/dev/sda mem=256M devtmpfs.mount=0 rw" -net nic -net tap
then: login
then: sudo apt-get install openssh-server
if: that goes well, your home free (we'll discuss errors later)
LEARN TO TALK
Now: you can ssh into or scp to your ARM VM from the host.
get ip address to ssh into or scp to, by simply running ifconfig in the ARM terminal.
install your applications
Or just get right to it and see what this is all about
LEARN TO WALK
Now: we will setup the chroot
Change your imagename to ubuntu.img
Using file manager, Create a folder (on your phone) /sdcard/ubuntu,
and transfer ubuntu.img to your sdcard folder, ubuntu.
Copy the following text including the (#) and paste into notepad++
(get it http://notepad-plus-plus.org/download) or in linux gedit or Eqvlnt.
Save as sdcard/ubuntu/bootubuntu (no extension)nothing more.
Hold on HERE: these scripts are for the EVO modify the loop1 entries to loop2 or loop5 and modify mtdblock3 to mtdblock2 if things dont work
(i cant do everything)
#modprobe ext2
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
fi
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img
mount -t ext2 /dev/block/loop1 /data/local/ubuntu
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/loop1
AND DO THE SAME FOR THE NEXT 4 FILES AND NAME THEM CORRECTLY AND USE THE RIGHT TEXT EDITOR
This next file is called sdcard/ubuntu/unionfs (remember no file ext.)
busybox insmod unionfs
mount -t unionfs -o dirs=$mnt/etc=rw:/etc=ro unionfs /etc
mount -o remount,rw /
ln -s $mnt/lib /
for x in \
bin boot home media mnt \
opt selinux srv usr var
do
ln -s $mnt/$x /
done
rmdir /root
ln -s $mnt/root /
mount -o remount,ro /
mount -t unionfs -o dirs=$mnt/sbin=rw:/sbin=ro unionfs /sbin
mount -t unionfs -o dirs=$mnt/dev=rw:/dev=rw unionfs /dev
mount -t devpts devpts /dev/pts
This next file is called sdcard/ubuntu/fsrw (remember no file ext.)
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
echo "Filesytem remounted as read/write"
This next file is called sdcard/ubuntu/mountonly (remember no file ext.)
# Based on Saurik's remount.sh - modified by Mark Walker of http://www.androidfanatic.com
# Email [email protected]
modprobe ext2
clear
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/debian
export bin=/data/local/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
busybox insmod ext2
clear
echo " "
mount -o loop,noatime $kit/debian.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
echo "Custom Linux IMG Mounter V1.0 - by Mark Walker"
echo "WEB: http://www.androidfanatic.com"
echo "EML: [email protected]"
sleep 1
echo "AutoMounter started"
sleep 1
echo "REBOOT PHONE TO PROPERLY DISMOUNT"
echo " "
# chroot $mnt /bin/bash
This next file is called sdcard/ubuntu/ubuntu.sh (this one has .sh for file ext)
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
modprobe ext2
clear
rm -f /data/local/bin/fsrw
rm -f /data/local/bin/bootubuntu
rm -f /data/local/bin/unionfs
rm -f /data/local/bin/installer.sh
rm -f /data/local/bin/mountonly
mkdir /data/local/mnt
clear
rm /system/bin/fsrw
rm /system/bin/bootubuntu
rm /system/bin/unionfs
rm -/system/bin/mountonly
cp -f fsrw /system/bin
cp -f bootubuntu /system/bin
cp -f unionfs /system/bin
cp -f mountonly /system/bin
cd /sdcard/ubuntu
chmod 4777 *
cd /system/bin/
chmod 4777 *
cd /
clear
echo " "
echo "Ubuntu Chroot Bootloader v0.1"
echo "Ubuntu Bootloader is now installed!"
echo "This process does NOT damage Android OS!"
echo " "
echo "Original Installer by Charan Singh"
echo "Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net"
echo " "
echo "To enter the Debian Linux console just type 'bootubuntu'"
bootubuntu
After you have,
bootubuntu
fsrw
mountonly
unionfs
ubuntu.sh
ubuntu.img
in your /sdcard/ubuntu folder
Open adb shell
Enter: su
then: cd /sdcard/ubuntu
then: sh ./ubuntu.sh
then: apt-get update
then: apt-get install tightvncserver
then: apt-get install lxde
then: export USER=root
then: vncserver :0 -geometry 1024x800
then: cat > front
then: export USER=root
then: cd /
then: rm -r -f /tmp
then: mkdir /tmp
then: cd /
then: vncserver :0 -geometry 1024x800
then: press "cntrl D", "cntrl D" again, then Enter)
then: cat front /root/.bashrc > temp
then: cp temp /root/.bashrc
then:
Get Android VNC for you phone (market)
open app
enter 5900 for port
enter password you setup for vncserver
enter (for nick) username you picked during creation
enter (for address) localhost
set graphics for 24 bit
Connect
let the fun begin
Next update: How to network with Hamachi
It does work <-----Havent gotten that far with the epic
Let me buy you a beer or whatever you sip. I just wanted to save someone the headace of setting this up and creating there own image instead of using someone else's.
SEE ya
NICE
A very nice tutorial, TY for the attention to details.

[Q] spending lots of time with segmentation fault error (chroot)

spending lots of time with segmentation fault error (chroot)
I success to open up ubuntu GUI on my android
with following site
(first googled site with "cyanogenmod ubuntu")
but fail with other imgs(such as img in nexusonehack)
for now, I am trying to bootup ubuntu 10.10 on my gw620(smart phone whose cpu is ARMv6 Qualcomm MSM7200)
by my self.
with selfmade rootstock img and busybox and chroot
I made img my self withroot stock with following option
rootstock -f kty1104-Notebook -l kty1104 -p 1 --imagesize 2047M --notarball --seed linux-image-omap,lxde,build-essential,openssh-server,tightvncserver,x11-xserver-utils
and change name to ubuntu.img and place to /sdcard/
and apply to bootubuntu.sh
bootubuntu.sh contents is this
===============================================
#!/system/bin/sh
# Original script by Paolo Sammicheli xdatap1
#
# Based on Saurik's remount.sh modified version by Mark Walker of
# URL is here but I can't write url b/c of my account privilege
# Modified version for Cyanogenmod by potoc samdroid
mkdir /mnt/ubuntu
#remount system as read/write
remount rw
export mnt=/mnt/ubuntu
export PATH=/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
export kit=/sdcard
export loopdev=/dev/block/loop4
losetup $loopdev $kit/ubuntu.img
mount -t ext2 $loopdev $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
cat $mnt/root/logo.txt
echo " "
echo "Type EXIT to end session"
echo "Make sure you do a proper EXIT for a clean umount!"
echo " "
echo "Please reboot your device when you finished your work."
chroot $mnt /bin/bash
busybox umount -f /mnt/ubuntu/dev/pts /mnt/ubuntu/proc /mnt/ubuntu/sys /mnt/ubuntu
===============================================
do I need more option for rootstock?
or do I need special sh file for it?
I can mount ubuntu.img with
# mknod -m640 /dev/loop0 b 7 8
losetup /dev/loop0 /sdcard/ubuntu.img
mount -t ext2 /dev/loop0 /mnt/ubuntu
but when it comes to chroot, it sprit [1] segmentation fault chroot ${mnt} /b...#
if there are missing information please let me know, I will write it down
Regards.
Taeyun
I know I musn't revive old threads... but the question and the problem is already set up here.
I'm having the same problem with my HTC Magic 32A. Anybody knows what's up with the segfault?
Thanks!
I've spent a lot of time on this issue too, and as far as I can tell it's because Ubuntu versions over 9.04 (jerking jackalope or whatever idiot name they use) no longer support ARMv6. This means I can't run BT5, which is based on 10.x, but I believe Debian still supports v6.

[Guide][Video]

How To Create a Swap Partition for Android
http://www.youtube.com/watch?v=OWAbpWWwJ9Y
Commands: fdisk -l dev/block/mmcblk_
swapon /dev/block/mmcblk_p_
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
vi /system/etc/init.d/05userinit
#Activate swap at boot
#!/system/bin/sh
swapon -a
chmod 750 /system/etc/init.d/05userinit
vi /system/etc/fstab
/dev/block/mmcblk_p_ swap swap
echo vm.swappiness=60 >> /system/etc/sysctl.conf

Categories

Resources