[chroot] BT5 chroot scripts - AT&T Samsung Galaxy Note I717

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:
scripts http://dl.dropbox.com/u/4109264/chroot.zip
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/bt5.img
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
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

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

very interested in this... is this BT5 regular or or is this the version 5 R1 release?
- Dan

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

Any luck finding an image?

images posted. ubuntu image soon.

edounn said:
images posted. ubuntu image soon.
Click to expand...
Click to collapse
Can't wait.
Thanks uploader.

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 said:
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?
Click to expand...
Click to collapse
do you have busybox installed? if not, do that. if so, try running it twice.

Johnsondr80 said:
Can't wait.
Thanks uploader.
Click to expand...
Click to collapse
np guy with 379px signature ;-)

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 said:
Yes, I have the newest version 1.19.4 from the installer but no avail.
Sent from my SGH-I717R using xda premium
Click to expand...
Click to collapse
looks like it doesn't like your loop back for some reason
type in your terminal:
ls -l /dev/block | grep loop
you'll get a result back that shows loop## maybe try on of those instead of loop255

Yep, I am getting the same error as dan.expo

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

dan.expo said:
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
Click to expand...
Click to collapse
make sure you have losetup -d/dev/block/looop255 in your script.

Anyone fix error yet?
Sent from the best phone in the world Galaxy Note!!!

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

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

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.

dan.expo said:
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
Click to expand...
Click to collapse
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

Related

Debian on the X10

[MESSAGE TO MODS, I could not include urls so have added spaces to pass spam filter.. please change?]
Well now we finally have root on our shiny devices I decided to crack open
the beers and get to work getting debian running on the X10..
the process is actually pretty straight-forward.
(as it turns out the x10's kernel already has support for most things needed
such as the ext2 filesystem)
-- step 1--
firstly we need to create a debian image for the phone, there are a few already out there but you can use the following to create your own
Code:
apt-get install debootstrap
dd if=/dev/zero of=debian.img seek=749999999 bs=1 count=1
mke2fs -F debian.img
mkdir debian
mount -o loop debian.img debian
debootstrap --verbose --arch armel --foreign lenny debian [ht]tp:[//]ftp. de. debian. org/debian
umount debian
how ever if you would prefer to use a ready built one (recomended for less techies ) you can get one from: rapidshare. com/files/161776007/debian-armel-750.img.bz2
(had to include spaces in the url to pass spam filter, could a mod please change this?)
now copy this too the root of your sdcard and make sure its called debian.img
-- step 2 --
I have created a script to do most of the other work for you:
Code:
alias b=busybox
export PATH=/data/local/bin:/usr/bin:/usr/sbin:/bin:$PATH
b mknod /dev/loop0 b 7 0
b mount -o loop,noatime /sdcard/debian.img /data/local/mnt
echo 'nameserver 4.2.2.2' >data/local/mnt/etc/resolv.conf
b chroot /data/local/mnt
mount -t devpts devpts /dev/pts
mount -t proc proc /proc
mount -t sysfs sysfs /sys
rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab
put this in your sdcard to.
-- step 3 --
Finally in any terminal emulator cd to the location of the startdeb.sh file
and do the following:
Code:
chmod 777 ./startdeb.sh
./startdeb.sh
!! and your done !!
you should now be within the debian system.. i suggest running
Code:
apt-get update
and installing what ever apps you want
(my first choices were gcc, python and tightvncserver)
[ EXTRA ]
now your on debian you can use
Code:
apt-get install tightvncserver
to get the xwindow system and the vnc server
now set both your HOME and USER variables
Code:
export HOME=/root
export USER=root
(or what ever user you choose)
and run
Code:
tightvncserver
(your also gonna have to download lxde and do a few other bits of setup
have a look around for X11 "Ported" to android post on these forums)
you could also change the config so that the desktop is displayed
at the right size for the screen
just use a vnc client from the market to connect to your GUI
Kool. I had ubuntu running on my htc touch pro once but wasnt really worth having apart from the cool factor. This looks promising.............. ill wait a while till I play around, the rooting factor is still new and I dont see the major gain to root yet.
Way awesome, thanks for the guide.
Nice work, will give this a try after I get the R2B rooted on my phone.
Next step for me would be to get the arm cross compilation toolchain and start porting goodies for the android....
wow this looks sooooo awesome!! any screen shots? don't make me google
when i try mounting debian.img using ur cmd i got following error
Code:
Usage: mount [-r] [-w] [-o options] [-t type] device directory
seems my mount requires -t parameters, so i try again, but still having error
Code:
mount -o loop,noatime -t ext2 /sdcard/debian.img /data/local/mnt
ioctl LOOP_SET_FD failed: Device or resource busy
please help thanks!
aget1 said:
when i try mounting debian.img using ur cmd i got following error
Code:
Usage: mount [-r] [-w] [-o options] [-t type] device directory
seems my mount requires -t parameters, so i try again, but still having error
Code:
mount -o loop,noatime -t ext2 /sdcard/debian.img /data/local/mnt
ioctl LOOP_SET_FD failed: Device or resource busy
please help thanks!
Click to expand...
Click to collapse
Are you running the script as root? If you not you might wanna try that.
This may sound kind of noobish, but would this be a dual-boot (I.e. running both android and debian on different boots of the phone, or would this be debian, until you reset the phone to be android again.
Sent from my X10a using XDA App
ddewbofh said:
Are you running the script as root? If you not you might wanna try that.
Click to expand...
Click to collapse
Still the same
Code:
whoami
whoami: unknown uid 0
mount -o loop,noatime -t ext2 /sdcard/debian.img /data/local/mnt
ioctl LOOP_SET_FD failed: Device or resource busy
aget1 said:
Still the same
Code:
whoami
whoami: unknown uid 0
mount -o loop,noatime -t ext2 /sdcard/debian.img /data/local/mnt
ioctl LOOP_SET_FD failed: Device or resource busy
Click to expand...
Click to collapse
And I assume you're either running the script or doing those commands manually? Including the mknod part?
ddewbofh said:
And I assume you're either running the script or doing those commands manually? Including the mknod part?
Click to expand...
Click to collapse
i run the script and found no luck, so i type in both adb and console, of coz mknod is done, either mkdir /data/local/mnt is done or not gives the same result, tried also mounting without loop,noatime and gives
Code:
mount: Block device required
would it be rooting problem or mount problem?
also tried losetup -d /dev/loop0, no luck
Code:
losetup: /dev/loop0: Device or resource busy
Keegan_P said:
This may sound kind of noobish, but would this be a dual-boot (I.e. running both android and debian on different boots of the phone, or would this be debian, until you reset the phone to be android again.
Sent from my X10a using XDA App
Click to expand...
Click to collapse
i see this to be a remounting of debian system on your phone, no modification on your phone so no, no dual boot
anybody can post a video tutorial please?
and the debian and android works together or just debian?
thx
A video tutorial would be amazing.
Sent from my X10a using XDA App
I will upload a video tutorial asap but at the moment I am having to use a 3G dongle for my internet (just moved out, am poor.. all donations to [email protected] on paypal ;-)) also this runs along side (or on top of) android so you'll still be able to get your texts and calls.. finally there are already a lot of debian apps compiled for ARM systems so have a look to see if the app you want is on apt (make sure you've run apt-get update first) please pm me if you have any problems
Thanks,
Sam Aldis
I tried to run it on the latest firmware and it seems loop device kernel module is not available in it.
Also the script is not fully functional :
you need to 'mkdir /data/local/mnt/'
also it's '/data/local' instead of 'data/local'
I haven't spend much time on this, so it's not working for now on my phone.
So help is welcome
Quick question:
Has anyone at all gotten this to work?
nope. I doubt it.
mod edit:..
sorry for stupid me, i don't know i can create loop device more than loop 0
i create loop0,loop1,loop2,loop7 and try mounting again, it success this time
so here is my script:
Code:
#!/system/bin/bash
export PATH=/data/local/bin:/usr/bin:/usr/sbin:/bin:$PATH
if [ ! -d /data/local/mnt ]
then
mkdir /data/local/mnt
fi
if [ ! -b /dev/loop2 ]
then
mknod /dev/loop0 b 7 0
mknod /dev/loop1 b 7 0
mknod /dev/loop2 b 7 0
mknod /dev/loop7 b 7 0
fi
if [ ! -d /data/local/mnt/bin ]
then
mount -o loop,noatime /sdcard/debian.img /data/local/mnt
fi
echo "nameserver 4.2.2.2" >data/local/mnt/etc/resolv.conf
chroot /data/local/mnt
mount -t devpts devpts /dev/pts
mount -t proc proc /proc
mount -t sysfs sysfs /sys
rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab
Edited:
I just brick my device after some more work, every command even ls do no output, reboot machine freezes at sony ericsson logo, now i am re rooting the device......
Edited 2:
Should be not the problem of debian, seems working fine.

[DEV] [HACK] Maemo 5 via VNC (UPDATE)

This hasn't been thoroughly tested as i'm on a Desire and have issues getting Ubuntu to start up due to some kernel issues regarding loopback devices but this should (Theoretically ) work.
If you'd like to test this out you have to first use the following tutorial
http://forum.xda-developers.com/showthread.php?t=718952
Then replace the ubuntu.img of that package with this... (I kept the .img named ubuntu.img so as to alleviate the need to modify the bootubuntu chroot script)
http://www.multiupload.com/CO5NRRKN80
Post back here if it works.
I've attached a file with the five scripts that you need to boot this .img. Do NOT download the package in the first thread as that is for ubuntu.
In short...
1. Create a folder on the root of your sdcard called ubuntu
2. Extract both scripts.rar and ubuntu.rar in that folder
3. Follow the tutorial as posted in the first thread that I linked.
Upon performing sh ./ubuntu.sh and bootubuntu with new ubuntu.img, i received the following:
Code:
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net
To enter the Debian Linux console just type 'bootubuntu'
# bootubuntu
mknod: /dev/loop2: File exists
mount: can't setup loop device: No such file or directory
mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/mnt/proc failed: No such file or directory
mount: mounting sysfs on /data/local/mnt/sys failed: No such file or directory
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/mnt/etc/hosts: directory nonexistent
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
umount: can't umount /data/local/mnt/dev/pts: No such file or directory
umount: can't umount /data/local/mnt/proc: No such file or directory
umount: can't umount /data/local/mnt/sys: No such file or directory
umount: can't umount /data/local/mnt: Invalid argument
#
So ur saying replace the Ubuntu img nd replace it with what u posted maemo 5? N how how I boot then
Su
Su
Bootubuntu?
Sent from my Nexus One using XDA App
got a loop /dev/loop1:no such devices or address
lemme try these new scripts..
got this
# su
# bootubuntu
failed: No such file or directoryk3 on /system
mknod: not found
mount: not found
mount: not found
mount: not found
mount: not found
sysctl: not found
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
: directory nonexistentte /data/local/mnt
: directory nonexistentte /data/local/mnt
Setting localhost on /.etc/hosts
: directory nonexistentte /data/local/mnt
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: not found
: not found
: not found
Shutting down Ubuntu but when i replace them with my old ubuntu files, ubuntu runs fine on or off the computer...mayb make this directory /data/local/mnt?
Yes, su su bootubuntu
I think I may need to make a slight modification to together boot script. Bear with me.
http://forum.xda-developers.com/attachment.php?attachmentid=359312&d=1279019428
Updated scripts.
Has anyone tried the new scripts yet?
Edit: double post...
I Did, i re-ran sh ./ubuntu.sh and then just in case, ran su su twice, then ran bootubuntu. results:
Code:
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net
To enter the Debian Linux console just type 'bootubuntu'
# su
# su
# bootubuntu
failed: No such file or directoryk3 on /system
mknod: not found
mount: not found
mount: not found
mount: not found
mount: not found
sysctl: not found
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
: directory nonexistentte /data/local/mnt
: directory nonexistentte /data/local/mnt
Setting localhost on /.etc/hosts
: directory nonexistentte /data/local/mnt
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: not found
: not found
: not found
Shutting down Ubuntu
umount: not found
umount: not found
umount: not found
umount: not found
#
cmonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
It would be really good if we can modify the scripts so we are able to still run ubuntu and maemo5 don't you guys think?

[DEV] Reworked process for running Ubuntu on Nexus One (Device busy error eliminated)

Few months ago, there was a post on XDA:
http://forum.xda-developers.com/showthread.php?t=718952
and a link to:
http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/
They explain how to install and run Ubuntu on Nexus One.
But a lot of people got problems when running script bootubuntu and ubuntu.sh, and I was one of them.
After Cyanogen Mod 6.0 was released, I could successfully run Ubuntu according to given instructions, but later I discovered the two scripts (ubuntu.sh and bootubuntu) don't always work, and I found them very complex and unnecessary statements can be removed.
Since few months ago I've been refining the two scripts to make them able to boot Ubuntu with less likelihood to get error. I thought I would like to share my findings to everyone interested.
Here are some reasons why it's useful to have Ubuntu on Nexus One
1. Fully functional web browser Firefox
2. Fully functional office suite OpenOffice
3. Fully functional Linux terminal with lots of ultilities
4. Fully functional image manipulation tool Gimp
5. Ability to run lots of useful native Linux programs
6. Python, gcc, g++..
I'll talk about my findings in next few posts.
Post #2: simplify ubuntu.sh, remove unnecessary script files
Post #3: simplify bootubuntu, forcibly umount
Post #4: how to shutdown Ubuntu properly if terminal application was closed by Android
Post #5: a little script which should be run before exiting from Ubuntu
Post #6: how to start GNOME desktop (instead of LXDE) and get correct keyboard mapping
Post #7: a possible solution to loop device's "resource or device busy" error
About my Nexus One:
bought on 2nd March
Cyanogen Mod 6.0
IntersectRaven HAVS CM CFS 1020 kernel
Busybox 1.17
Radio 5.0.8
Gapps hdpi 20101020.1
Please don't hesitate to tell me if I made any mistake, I'm a Linux beginner because I taught myself Linux, my University will teach Unix next semester.
Attachment: ubuntu_scripts.zip
contains all modified scripts.
Finding #1:
In original Zip package, there are five scripts, but only two of them are actually used to install and boot up Ubuntu.
fsrw, mountonly, unionfs are not necessary to install and boot ubuntu, thus their reference can be removed from ubuntu.sh
Here is my simplified version of ubuntu.sh
#-------------------------------
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
rm -f /system/bin/bootubuntu
rm -r -f /data/local/ubuntu
cp -f bootubuntu /system/bin
cd /
echo "Type 'bootubuntu' to boot Ubuntu"
#-------------------------------
Simplified ubuntu.sh removed unnecessary statements to reduce risk of error.
Also I discovered:
Files in /sdcard/ubuntu can not be chmod, and it's unnecessary to chmod 4777 to them.
chmod 4777 /system/bin/* will cause some Android softwares to malfunction (e.g. Orbot), also it *possibly* cause some roms to fail to boot up next time (CM6.0)
Finding #2:
Here's my simplified bootubuntu script, there are minor changes to script flow and removed all unnecessary statements:
#-------------------------------
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
echo "SETTING VARIABLES"
export bin=/system/bin
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
fi
echo "SETTING UP LOOP DEVICE"
losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img
echo "MOUNTING"
mount -t ext2 /dev/block/loop1 /data/local/ubuntu
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
echo "SETTING UP NETWORK"
sysctl -w net.ipv4.ip_forward=1
echo "nameserver 208.67.222.222" > $mnt/etc/resolv.conf
echo "nameserver 208.67.220.220" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "Brought to you by NexusOneHacks.net and the open source community! "
chroot $mnt /bin/bash
echo "UMOUNTING"
umount -lfr $mnt/dev/pts
umount -lfr $mnt/proc
umount -lfr $mnt/sys
umount -lfr $mnt
losetup -d /dev/block/loop1
#-------------------------------
and it forcibly,lazily,read-only-if-failed umount $mnt, thus losetup -d will less likely to fail and eliminate the problem when booting ubuntu second time.
Finding #3:
If terminal application is terminated automatically by Android system, in this situation, the Ubuntu is not properly umounted.
Thus we change ubuntu.sh into:
#------------------------------
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
rm -f /system/bin/bootubuntu
rm -f /system/bin/exitu
rm -r -f /data/local/ubuntu
cp -f bootubuntu /system/bin
cp -f exitu /system/bin
cd /
echo "Type 'bootubuntu' to boot Ubuntu"
#------------------------------
and we create a new script named "exitu" in sdcard/ubuntu directory:
#------------------------------
export mnt=/data/local/ubuntu
echo "UMOUNTING"
umount -lfr $mnt/dev/pts
umount -lfr $mnt/proc
umount -lfr $mnt/sys
umount -lfr $mnt
losetup -d /dev/block/loop1
#------------------------------
remember to run "sh ./ubuntu.sh" to copy new exitu script into /system/bin.
Then whenever you went back to terminal, found Ubuntu terminal is gone, simply type exitu (remember to be su first) to exit ubuntu, then bootubuntu again to enter ubuntu terminal. It's harmless to execute exitu multiple times to ensure $mnt is umounted successfully.
Sometimes exitu still can not successfully remove loop1 assignment with /sdcard/ubuntu/ubuntu.img, but seems like it doesn't really matter, ubuntu still can boot up successful even loop1 was not unassigned successfully
Finding #4:
To reduce likelihood of getting "device or resource busy" error when removing loop device assignment, it's good to have this script in your Ubuntu, and run the script before exiting from Ubuntu:
#-------------------
export USER=root
vncserver -kill :1
vncserver -kill :2
sudo reboot
sudo halt
#-------------------
(remember, the script should be in your Ubuntu's file system, not your android's file system!)
run the script before you exiting from Ubuntu, this will greatly reduce likelihood of getting device or resource busy error when exiting.
Finding #5:
For those of you who prefer to enter GNOME desktop manually (no automatically start-up), this script may help, also this script should be able to fix androidVNC keyboard mapping problem:
(this script should be in Ubuntu)
#--------------------
cd /
rm -r -f tmp
mkdir tmp
cd /
export USER=root
export XKL_XMODMAP_DISABLE=1
vncserver -geometry 800x600
#--------------------
regarding the guide:
http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/
if you would like to enter gnome and not to autostart desktop environment, please don't follow its instruction on making change to /root/.vnc/xstartup and /root/.bashrc
instead, create a script as I mentioned above, and run the script to bring up VNC server, and you will get GNOME desktop in VNC with correct keyboard mapping
Finding #6
If you're constantly getting "device or resource busy" error when mounting loop1 to /data/local/ubuntu, the reason might be caused by Android App2SD (Froyo version), if you have any software installed on SD card, it may cause all loop devices to be busy all the time (even newly created loop device!) And busy loop device can not be mounted, thus generates "device or resource busy" error message.
Most people had the same problem few months ago, when they execute bootubuntu, they get an error saying loop device is busy, and even changing loop device wouldn't help.
Now I think the reason is determined. After uninstalled all applications which are on SD card (or move all of them from SD card to internal storage), the Ubuntu can boot successfully without getting "device or resource busy" error when mounting loop device.
Edit 2010-11-04:
If bootubuntu gets executed before Android loads all app2sd applications, it is possible solves the loop device busy error even with App2SD applications installed. It requires a very perfect timing, today after few experiments on my phone, I worked out a process which can always boot up Ubuntu on my phone:
1. Reboot phone
2. as soon as you enter lock screen, unlock screen
3. quickly go to terminal emulator
4. become su by typing su and enter
5. type bootubuntu and wait (type it fast... practice )
-------------
1-5 must be done before SD "Checking for errors" notification disappears, if you fail to do so.. reboot and try again
------------
6. as soon as SD "Checking for errors" notification disappears, hit enter IMMEDIATELY
Now you should be able to enter Ubuntu terminal.
Do NOT exit from your Android terminal (don't press back or home button), wait 1-2 minutes for Android to load applications on SD card.
Once you reboot your phone, you'll need to repeat the above procedure again to enter Ubuntu successfully.
Also chmod 4777 is horrible from a security point of view. It makes all the system bin files writable by anyone and run with root privileges (setuid root).
Sent from my Nexus One using XDA App
houzuoguo said:
Finding #6
If you're constantly getting "device or resource busy" error when mounting loop1 to /data/local/ubuntu, the reason might be caused by Android App2SD (Froyo version), if you have any software installed on SD card, it may cause all loop devices to be busy all the time, thus loop device can not be mounted to /data/local/ubuntu anymore.
Most people had the same problem few months ago, when they execute bootubuntu, they get an error saying loop device is busy, and even changing loop device wouldn't help.
Now I think the reason is determined. After uninstalled all applications which are on SD card (or move all of them from SD card to internal storage), the Ubuntu can boot successfully without getting "device or resource busy" error when mounting loop device.
Click to expand...
Click to collapse
This is because with Froyo apps to SD android creates an encrypted loopback device for each app on the SD card, so depending on the number of apps on your SD card loop0-7 may be in use. I solve this by using a high loop number with losetup - loop99.
Sent from my Nexus One using XDA App
Use a higher loop device, the best option
It worked for me on loop7, but to be on the safe side, decided to use a higher loop number as suggested, but it requires to create the loop device as it doesn't exists, use mknod:
Code:
echo "SETTING UP LOOP DEVICE"
mknod /dev/block/loop99 b 7 99
losetup /dev/block/loop99 /sdcard/ubuntu/ubuntu.img
Now is working on loop99 too!. The clean up section for both bootubuntu and exitu scripts:
Code:
echo "UMOUNTING"
umount -f $mnt/dev/pts
umount -f $mnt/proc
umount -f $mnt/sys
umount -f $mnt
losetup -d /dev/block/loop99
rm /dev/block/loop99
I'm not sure about how I am cleaning up the new node, rm erases it... but is this the best method? rebooting the phone will erase the node anyway so maybe an if clause to test for the node loop99 before creating it will be better.
fralacos said:
It worked for me on loop7, but to be on the safe side, decided to use a higher loop number as suggested, but it requires to create the loop device as it doesn't exists, use mknod:
Code:
echo "SETTING UP LOOP DEVICE"
mknod /dev/block/loop99 b 7 99
losetup /dev/block/loop99 /sdcard/ubuntu/ubuntu.img
Now is working on loop99 too!. The clean up section for both bootubuntu and exitu scripts:
Code:
echo "UMOUNTING"
umount -f $mnt/dev/pts
umount -f $mnt/proc
umount -f $mnt/sys
umount -f $mnt
losetup -d /dev/block/loop99
rm /dev/block/loop99
I'm not sure about how I am cleaning up the new node, rm erases it... but is this the best method? rebooting the phone will erase the node anyway so maybe an if clause to test for the node loop99 before creating it will be better.
Click to expand...
Click to collapse
thanks a lot
I tried this idea already but it seems doesn't work under CM6.0...
and the problem was, every newly created loop device will always be busy, if app2sd is used. (Don't know why)
I'm going to try a different approach, I try to mount loop device to /data/local/ubuntu before Android mounts all app2sd applications
mathrock said:
This is because with Froyo apps to SD android creates an encrypted loopback device for each app on the SD card, so depending on the number of apps on your SD card loop0-7 may be in use. I solve this by using a high loop number with losetup - loop99.
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
thanks.
my finding is, Android froyo app2sd uses dm-xx loop devices for sd applications, for example, now I have three games on sd card, by entering mount in terminal, i read that
/dev/block/dm-0,dm-1,dm-2 are used.
After I removed all SD applications and reboot system, all of those dm-xxx devices are not mounted anymore.
Also the only difference between mount result with app2sd and mount result without app2sd is usage of dm-xx devices.
Finally I've found solution to the "device or resource busy" error
but it seems like people are now less interested in running Ubuntu on Nexus One
the original post got more than 35k hits and more than 200 replies
Hi houzuoguo!!
I'm trying to type bootubuntu when enter in system, but i think i'm not fast enough or that not work for me. Everytime i get:
# bootubuntu
SETTING VARIABLES
SETTING UP LOOP DEVICE
losetup: /dev/block/loop1
MOUNTING
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resource busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or directory
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or directory
SETTING UP NETWORK
net.ipv4.ip_forward = 1
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
UMOUNTING
umount: can't forcibly umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't forcibly umount /data/local/ubuntu/proc: No such file or directory
umount: can't forcibly umount /data/local/ubuntu/sys: No such file or directory
umount: can't forcibly umount /data/local/ubuntu: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
#
Whats the problem then?¿?
Thanks in advance.
devex said:
Hi houzuoguo!!
I'm trying to type bootubuntu when enter in system, but i think i'm not fast enough or that not work for me. Everytime i get:
# bootubuntu
SETTING VARIABLES
SETTING UP LOOP DEVICE
losetup: /dev/block/loop1
MOUNTING
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resource busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or directory
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or directory
SETTING UP NETWORK
net.ipv4.ip_forward = 1
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
UMOUNTING
umount: can't forcibly umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't forcibly umount /data/local/ubuntu/proc: No such file or directory
umount: can't forcibly umount /data/local/ubuntu/sys: No such file or directory
umount: can't forcibly umount /data/local/ubuntu: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
#
Whats the problem then?¿?
Thanks in advance.
Click to expand...
Click to collapse
I worked on that problem for few weeks and finally I discovered, once I moved all SD applications back to Internal storage, loop1 no longer be busy.
Are you using Froyo app2sd?
houzuoguo said:
thanks a lot
I tried this idea already but it seems doesn't work under CM6.0...
and the problem was, every newly created loop device will always be busy, if app2sd is used. (Don't know why)
I'm going to try a different approach, I try to mount loop device to /data/local/ubuntu before Android mounts all app2sd applications
Click to expand...
Click to collapse
Some of us are still interested in this info but ubuntu runs pretty slow on the nexus. I say it would be nice to have the newest ubuntu (10.10) installed on the nexus one. Possibly the netbook remix version.
Lou2serious said:
Some of us are still interested in this info but ubuntu runs pretty slow on the nexus. I say it would be nice to have the newest ubuntu (10.10) installed on the nexus one. Possibly the netbook remix version.
Click to expand...
Click to collapse
thanks haha, good to hear that I'm not the only one still interested in running Ubuntu on Nexus One.
I'm thinking, if Nexus Two can be overclocked to 1.4Ghz, together with top class SD card, the speed will be enough to run Ubuntu fluently.
Hi! Thanx for ur work! It helped me.....
Now i´m having another issue....i´m triying either to resize the ubuntu.img to make it bigger so i can install the stuff i want ( clean install has 100 mb left) or (preffered option) mounting my sdcard so i can install the native programs from there...any ideas?¿
I think the simple way is just to create another file bigger.
funkatiko said:
Hi! Thanx for ur work! It helped me.....
Now i´m having another issue....i´m triying either to resize the ubuntu.img to make it bigger so i can install the stuff i want ( clean install has 100 mb left) or (preffered option) mounting my sdcard so i can install the native programs from there...any ideas?¿
Click to expand...
Click to collapse
You might want to build your own rootfs - check this site out - it worked great for me.
https://wiki.ubuntu.com/ARM/RootfsFromScratch

DEVELOPMENT : Ubuntu Lucid CHROOT: updated scripts

*********************************************************
For LXDE : check Update 12 April 2011
For netbook launcher : Check update 13 April 2011
for Dropbox Links : check Below. : UPDATE : DROPBOX LINKS MIGHT BE BLOCKED
Screenshots : POST no 5
*********************************************************
Hi All
I am a linux user and have been trying to get my phone to run linux too... so finally after a lot of messing around i got Ubuntu 10.04 aka Lucid runing on my phone.
I used a stack image provided by https://code.google.com/p/android-cruft/ This image is a stripped down version of the Ubuntu img file and hence a good setup for customization.
However the problems i had with this as well as other images so far was following.
1) 2GB is very small when you want and LXDE to run : good for showoff not good for actual working conditions.
2) bootubuntu or bootdebian scripts won't let me keep the system mounted.. as soon as i exit the shell my ubuntu gets unmounted.
3) All the scripts wont play well with APP2SD or simmilar applications.
REQUIRED:
Rooted and busybox installed phone.
Android terminal software would be needed for commands.
Android VNC Viewer.
Alternate Download link (mirror provided by husseinb )
LXDE.7z.001 http://glycogen.net/download/3/
LXDE.7z.002 http://glycogen.net/download/4/
NETBOOK_parts.7z.001 http://glycogen.net/download/5/
NETBOOK_parts.7z.002 http://glycogen.net/download/6/
NETBOOK_parts.7z.003 http://glycogen.net/download/7/
NETBOOK_parts.7z.004 http://glycogen.net/download/8/
DROPBOX Links as alternate download option
NOTE : please use them for alternate download only I have already got one warning for excessive usage.
LXDE
LXDE part 1 : MD5 : 82af57faf360b3f1921b6def4acfe466
LXDE part 2 : MD5 : a59025db138780db79d69f417c4e9f91
NETBOOK
NETBOOK part 1 : MD5 : 08818edcb1b3fff293557d8e56a65bc4
NETBOOK part 2 : MD5 : 58f0561ed74f0f815f045b9014895313
NETBOOK part 3 : MD5 : 4dd9da548d04d7dece03468959a6993a
NETBOOK part 4 : MD5 : 345804d086054bd446397384245ac2db
UPDATE : 13 April 2011
first Post cleared with all old data and only new updated images kept now.
NETBOOK LAUNCHER PRECONFIGURED IMAGES : http://www.megaupload.com/?d=I3V10B4I
UPDATE : 12 April 2011
LXDE preinstalled package : http://www.megaupload.com/?d=657SPCB5
These file contains all the stuff you need.
GUIDE FOLLOWS BELOW
************* USER PORTION START HERE ******************
******STEPS TO FOLLOW ****************
1) extract the content and copy then to /sdcard/ubuntu
2) run 'sh ubuntu.sh' only once.
3) run 'starttux' (is now made to work without userinput so if needed you can place it is startup using gscripts.)
4) run 'tuxcmd'
a) 'ui' inside tuxcmd to start vnc server
to use GUI use any vncviwer and connect to localhost:5901
NOTE : VNCPASSWORD : 12345678
b) to kill vnc server : use 'killui'
5) when you want to stop ubuntu 'stoptux'
********** STEPS END HERE ************
********** THINGS TO KNOW ************
The whole script portion visible is divided into 4 scripts.
Ubuntu.sh <- setup script required to be run once in whole lifecycle.
starttux <- chroot setup script required to be run after every reboot.
tuxcmd <- script to get console based access to ubuntu
stoptux <- script to stop linux.
Besides these 4 files two important commands are available when you login to tuxcmd.
`ui` <- used to start the vnc server
`killui` <- used to stop the vnc server
once you have the image inside tuxcmd you can run vncpasswd to change password.
to use GUI use any vncviwer available in android market.
point it to localhost:5901.
NOTE : VNC PASSWORD : 12345678
******************* USER PORTION END HERE ***************
******************* DEVELOPER SECTION ********************
below i have provided code for all the files mentioned above
Note : I will keep updating the code as and when i do the updation.
UBUNTU.SH
Code:
echo " "
echo "Ubuntu Chroot v0.2-anant-netbook"
echo "This process does NOT damage Android OS!"
echo " "
echo "Original Script by Charan Singh"
echo "Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net"
echo "Xperia Customized by Anant shrivastava http://anantshri.info "
echo " "
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
echo "Cleaning up old Chunks . . ."
rm /system/bin/tuxcmd
rm /system/bin/starttux
rm /system/bin/stoptux
echo "Creating necessary directories"
if [ ! -d /data/local/mnt ]
then
mkdir /data/local/mnt
fi
#copy the files to places
echo "Setting up files"
cp -f starttux /system/bin
cp -f stoptux /system/bin
cp -f tuxcmd /system/bin
echo "Ubuntu is now configure!"
echo " "
echo "to Start ubuntu type 'starttux'"
echo "once ubuntu started use tuxcmd to gain shell"
echo "when you want to shutdown type 'stoptux'"
STARTTUX
Code:
#Mount SYSTEM RW
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
#exporting useful variables
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
# Mounting Image to the farthest loop point
# FIXME : check if mount sucessfull otherwise abort whole process.
mknod /dev/block/loop255 b 7 255
busybox losetup /dev/block/loop255 $kit/ubuntu.img
busybox 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
# Mounting SD Card inside the CHROOT
busybox mount -o bind /sdcard /data/local/mnt/sdcard
#seting environment
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 "Brought to you by NexusOneHacks.net and the open source community! "
echo "Customized by Anant shrivastava http://anantshri.info"
echo "Ubuntu configured to use it just type 'tuxcmd'"
TUXCMD
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo "Customized by Anant shrivastava http://anantshri.info"
echo " "
busybox chroot $mnt /bin/bash
STOPTUX
Code:
#Cleanup
#After exit command is executed clear it all up
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
echo "Cleaning the Ubuntu leftover and returning back the memory to Android."
echo "by Anant Shrivastava http://anantshri.info "
echo "Shutting down Ubuntu"
sync
busybox umount -l $mnt/sdcard
busybox umount -l $mnt/dev/pts
busybox umount -l $mnt/proc
busybox umount -l $mnt/sys
busybox umount -l $mnt
busybox losetup -d /dev/block/loop255
mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
echo " "
echo "Please reboot to properly unmount Ubuntu"
echo "Specially If you recieved an error before this line"
UI <- available inside chroot
Code:
if [ `pgrep Xtightvnc` ]
then
echo "VNC SERVER Already running"
else
vncserver -geometry 850x480
fi
KILLUI
Code:
kill -KILL `pidof Xtightvnc`
rm /tmp/.X11-unix/X1
rm -rf /tmp/.X1-lock
These launcher Settings are obtained using VNC xstartup file
so posting some sample xstartup files
for default GNOME UI
Code:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
"$VNCDESKTOP Desktop" &
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession
for LXDE same startup file becomes
Code:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession
for netbook i am using this xstartup
Code:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
"$VNCDESKTOP Desktop" &
x-window-manager &
export XKL_XMODMAP_DISABLE=1
maximus &
netbook-launcher-efl &
**************** DEVELOPER SECTION END *****************
nice done mate
would love to see a video
or maybe screenshots,
this sounds very well
PlayGunsta said:
nice done mate
Click to expand...
Click to collapse
Thanks
fiscidtox said:
would love to see a video
Click to expand...
Click to collapse
I am weak at video's so that might take some time.
tremendouz said:
or maybe screenshots,
this sounds very well
Click to expand...
Click to collapse
Screenshots I will keep adding here
Standard Command prompt
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
LXDE running
a bonus which i am working on right now
Metasploit unleashed on Xperia
Netbook Launcher
Cool!
How's it running... smooth ?
kozxmartt said:
Cool!
How's it running... smooth ?
Click to expand...
Click to collapse
Running Smothly.
However i prefer using console more then gui so for me CLI is smooth.
anantshri said:
a bonus which i am working on right now
Metasploit unleashed on Xperia
Click to expand...
Click to collapse
Thats all what we need
Great work mate....
pretty cool, well done mate
however, the X10's screen is 854x480, not 850x480 (in the UI script)
Adolf1994 said:
pretty cool, well done mate
however, the X10's screen is 854x480, not 850x480 (in the UI script)
Click to expand...
Click to collapse
Thanks
I did tried 854x480 however the VNC Server every time was showing me resolution as 856x480 and 2 pixels where floating off the screen
that's why i prefered 850 and fixed value.
try running them before the OS boots...
u can test this by adding the commands to the file /system/bin/chargemon
*** this is a major system modification and can break recovery/OS booting ***
this looks awesome so i dont completely follow your guide ... is this stuff dual bootable?
DooMLoRD said:
try running them before the OS boots...
u can test this by adding the commands to the file /system/bin/chargemon
*** this is a major system modification and can break recovery/OS booting ***
Click to expand...
Click to collapse
I have tried on my mini pro with the debian port, but dont work because the linux cannt use the screen or any other device on the phone. We must port the drivers first and then try this...
KingCifer said:
this looks awesome so i dont completely follow your guide ... is this stuff dual bootable?
Click to expand...
Click to collapse
Sorry not yet a dual boot ... would love to do that though.
the GUI you see is a VNC view of the machine.
DooMLoRD said:
try running them before the OS boots...
u can test this by adding the commands to the file /system/bin/chargemon
*** this is a major system modification and can break recovery/OS booting ***
Click to expand...
Click to collapse
Right now Xperia is my one and only handset so playing a bit safe..
also right now trying to understand the whole bootloader bypassing concept and then only will try dual booting also..
Yperion said:
I have tried on my mini pro with the debian port, but dont work because the linux cannt use the screen or any other device on the phone. We must port the drivers first and then try this...
Click to expand...
Click to collapse
I read some discussion somewhere about the meego or meamo porting to xperia those code base do have all such support.
can any one make a scarpit for all this ? ?
thanx
anantshri , nice one sir
anantshri said:
....
Right now Xperia is my one and only handset so playing a bit safe..
also right now trying to understand the whole bootloader bypassing concept and then only will try dual booting also..
...
Click to expand...
Click to collapse
luckily the Xperia androids are pretty much un-brickable...
u can always use SEUS to repair device OR flashtool to flash stock ROM...
DooMLoRD said:
luckily the Xperia androids are pretty much un-brickable...
u can always use SEUS to repair device OR flashtool to flash stock ROM...
Click to expand...
Click to collapse
this is the only good thing on x10's locked bootloader and bypassing method
Ahmed radi said:
can any one make a scarpit for all this ? ?
thanx
anantshri , nice one sir
Click to expand...
Click to collapse
Working on exactly that point
creating set of scripts which can automate most of these task's....
will upload and update all with the details soon.
Now that we can bypass the bootloader, would the following thing be possible: http://forum.xda-developers.com/showthread.php?t=889433??
Meikrekel said:
Now that we can bypass the bootloader, would the following thing be possible: http://forum.xda-developers.com/showthread.php?t=889433??
Click to expand...
Click to collapse
This seems like a good start, Let me read all the detail's.
also as suggested by DoomLord, Would try the chargemon script hook for dual booting.
not very soon... i am expecting to do this by next weekend.

Need help with Chroot Ubuntu

I need some help with running chroot ubuntu on my TFP. I had the chroot BT5 ( http://forum.xda-developers.com/showthread.php?t=1428475 ) image running a week ago then I decided to try out my own image of ubuntu 11. I got it to run once using this process but now I get this:
Code:
# su
[email protected]:/ # cd sdcard/ubuntu/
[email protected]:/sdcard/ubuntu # sh bootubuntu.txt
mknod: /dev/loop5: File exists
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
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu.txt[23]: cannot create /data/local/ubuntu/etc/resolv.conf: No such file or directory
bootubuntu.txt[24]: cannot create /data/local/ubuntu/etc/resolv.conf: No such file or directory
Setting localhost on /etc/hosts
bootubuntu.txt[26]: cannot create /data/local/ubuntu/etc/hosts: No such file or directory
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
losetup: /dev/block/loop5: No such device or address
1|[email protected]:/sdcard/ubuntu #
This is the bootubuntu script I am running:
Code:
#modprobe ext2
mount -o remount,rw -t yaffs2 /dev/block/mmcblk0p1 /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
export USER=root
mknod /dev/loop5 b 7 0
losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
mount -t ext2 /dev/block/loop5 /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/block/loop5
Help! I feel like I'm going crazy because this worked a week ago but now it doesn't.
Okay, I changed busybox from 1.19.3 to 1.19.2 and now I get this:
Code:
# su
[email protected]:/ # cd sdcard/ubuntu/
[email protected]:/sdcard/ubuntu # sh bootubuntu.txt
mknod: /dev/loop5: File exists
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu.txt[23]: cannot create /data/local/ubuntu/etc/resolv.conf: No such file or directory
bootubuntu.txt[24]: cannot create /data/local/ubuntu/etc/resolv.conf: No such file or directory
Setting localhost on /etc/hosts
bootubuntu.txt[26]: cannot create /data/local/ubuntu/etc/hosts: No such file or directory
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
losetup: /dev/block/loop5: No such device or address
1|[email protected]:/sdcard/ubuntu #
Hmmm, is the Bash command line executable located in a different folder with ubuntu 11? Edit that bootubuntu sh file. Or maybe try removing the loop file under the /dev/ dir.
Thanks philleonard for responding. I checked and bash is definitely in /bin/ and I also tried deleting the loop5 file in /dev/ but that didn't help. Is it a bad image file? The weird thing is that I can't even get the BT5 image to run with the bt.sh script either. This is killing me.
I'm thinking that it's an issue with the loop device not mounting the ubuntu.img but not sure how to fix it.
Try changing: losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
to: losetup /dev/block/loop5 /sdcard/ubuntu/ubuntu.img
Hmmm, maybe try reinstalling busybox. Im running BT5 and Ubuntu 9.10 (I think it is) on my Transformer Prime. BT5 i installed through the script provided in this tutorial; http://forum.xda-developers.com/archive/index.php/t-1074723.html Its for the Xoom but seems to work just fine.
Cannot connect to VNC
Ive got [email protected] but when I try to connect to vnc i get this. Anyone care to elaborate? I cant apt-get install openssh-server it says failed to fetch. I try apt-get install tightvncserver and it says it cannot fetch. It says it cannot update when I run it. There is no sh run.sh command. I try to run export USER=root
vncserever -geometry 1200x800 and get command not found.
I type le or whatever and it pulls up my connections and I have the 127.0.0.1 port 5901 found but when I put it in the vncviewer it says connection rejected. Please can someone help me I am frustrated with ubuntu ever since trying to run it on my phone.

Categories

Resources