FORUMS

What Do You Think About Fingerprint Scanners?

More and more phones are featuring fingerprint scanners, and with many promising … more

What’s Next for Samsung and Its Flagships?

If we were to say that the Galaxy S6 was a leap of faith made by Samsung, we … more

The Ultimate Showcase of dBrand Skins

In the search for ways to protect, accessorize, and personalize; a user has many options. One … more

Huawei’s Rapid Rise to Third Place in the Smartphone Race

Huawei has quickly grown to become one of the world’s biggest … more

[DEV] Chroot Ubuntu

665 posts
Thanks Meter: 265
 
By Jhinta, Senior Member on 28th June 2011, 08:11 PM
Post Reply Subscribe to Thread Email Thread
here you go chroot ubuntu

So you have a working rootfile system like hd2
put the root file system on sdcard location /sdcard/ubuntu
place the two files in /sdcard/ubuntu
(run as root ) just install with -> sh install.sh And READ

installing vnc

in ubuntu linux terminal ->

export USER=root
vncserver -geometry 1024750
nano /root/.bashrc

Add this to the beginning
###########################
export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 1280750
########################### ctrl+x to save

Thanks to,
aligatro2010 4 resolution
poltak11 4 helping you guyś with some more info

now connect with your own password and port 5900 or 5901 ad localhost with VNC Android !!

Just download the rootfs from the HD2 form

Ubuntu Chrootenv. <- new
Last edited by Jhinta; 29th June 2011 at 05:15 PM.
The Following 14 Users Say Thank You to Jhinta For This Useful Post: [ View ]
 
 
28th June 2011, 08:11 PM |#2  
Jhinta's Avatar
OP Senior Member
Thanks Meter: 265
 
Donate to Me
More



So how does this works -->

# DONT TOUCH FIRST LINE !!!!
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system ## lets mount the nand RW so that we can make folders
echo "SETTING VARIABLES"
export bin=/system/bin ## divine where bin is
export mnt=/data/local/ubuntu ## divine where mnt is
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH ## set path so that we can run things anywhere
export TERM=linux ## divine term
export HOME=/root ## divine home
if [ ! -d /data/local/ubuntu ] ## if there go else create data/local/ubuntu
then
mkdir /data/local/ubuntu
fi

echo "MOUNTING"
mount -t ext2 -o loop /sdcard/ubuntu/rootfs.ext2 /data/local/ubuntu ## mount a ext2 loop file from dir to dir
mount -t devpts devpts $mnt/dev/pts ### mount android devpts in root (mnt/dev/pts)
mount -t proc proc $mnt/proc ## same as above
mount -t sysfs sysfs $mnt/sys ### same as above

echo "SETTING UP NETWORK"
sysctl -w net.ipv4.ip_forward=1 ## ip forward so that we have internet from android
echo "nameserver 208.67.222.222" > $mnt/etc/resolv.conf ### as is
echo "nameserver 208.67.220.220" >> $mnt/etc/resolv.conf ### as is
echo "127.0.0.1 localhost" > $mnt/etc/hosts ## as is
echo "All credits to original creator !!!!!!!"


chroot $mnt /bin/bash #### finally lets chroot the dir and init /bin/bash meaning lets start a vm on that dir


and thats all to chrooting
Last edited by Jhinta; 1st July 2011 at 06:44 PM.
The Following 8 Users Say Thank You to Jhinta For This Useful Post: [ View ]
29th June 2011, 03:04 AM |#3  
corwinmortac's Avatar
Senior Member
Flag Dallas
Thanks Meter: 23
 
More
ok this is pure awesome but...it would mean running 2 OS's just like the old day of running multiple os types off my old winmo phone...right?
29th June 2011, 03:20 AM |#4  
Senior Member
Thanks Meter: 23
 
More
Wow, great work! Wish the xda app had a thanks button

Sent from my SPH-D700 using XDA App
29th June 2011, 04:04 AM |#5  
Senior Member
Thanks Meter: 9
 
More
"So you have a working rootfile system like hd2
put the root file system on sdcard location /sdcard/ubuntu"

Would anyone mind explaining that beginning part? Seems like I have the folder on my SD card and the 2 files but I am missing the "working rootfile system like hd2". Does this mean i need to make an image of an already running root file system.

My apologies in advance if I am asking a noob question.
29th June 2011, 04:31 AM |#6  
Senior Member
Flag Toronto
Thanks Meter: 10
 
More
Exclamation
i dont understand what is hd2

So you have a working rootfile system like hd2
29th June 2011, 04:38 AM |#7  
lithiasalesjs's Avatar
Senior Member
Flag Grand Forks
Thanks Meter: 4
 
More
What is HD2 ? And do we put the two files on the Removable ( REAL SD CARD ) or the Asus Transformer ?

rm failed for -f No such file or directory
CP Can't create '/system/bin/ubuntu: Permission Denied
Type 'sh ubuntu' to boot Ubuntu
29th June 2011, 04:39 AM |#8  
Senior Member
Thanks Meter: 9
 
More
I suspect they are refering to the ubuntu.img available in the HD2 Ubuntu Dev forum, im downloading now to test, i'll post my results.
29th June 2011, 04:44 AM |#9  
lithiasalesjs's Avatar
Senior Member
Flag Grand Forks
Thanks Meter: 4
 
More
Im guessing put them on the Removable
29th June 2011, 05:02 AM |#10  
lithiasalesjs's Avatar
Senior Member
Flag Grand Forks
Thanks Meter: 4
 
More
# ls
install.sh ubuntu
# sh install.sh
Type 'sh ubuntu' to boot Ubuntu
# sh ubuntu
SETTING VARIABLES
MOUNTING
ioctl LOOP_SET_FD failed: Bad file number
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
SETTING UP NETWORK
net.ipv4.ip_forward = 1
ubuntu: line 22: can't create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
ubuntu: line 23: can't create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
ubuntu: line 24: can't create /data/local/ubuntu/etc/hosts: nonexistent directory
All credits to original creator !!!!!!!
chroot: can't execute '/bin/bash': No such file or directory
#
29th June 2011, 05:18 AM |#11  
Senior Member
Thanks Meter: 38
 
More
I installed from http://androidadvocate.com/?p=339 and it works great, but running ubuntu native would be much, much better.
The Following User Says Thank You to aligatro2010 For This Useful Post: [ View ]

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes