yashsingh1/xdaforums huggingface dataset:
[XPERIA X10 Android Development] anantshri:
I tried that just now here is my status.txt and my chargemon modification however things don't change a bit though.

if [ -e /data/local/tmp/ubuntuboot ]
then
rm -rf /data/local/tmp/ubuntuboot
mount -o remount,rw rootfs /
cd /
rm -r /sdcard
rm init*
rm logo.rle
rm default.prop
echo "********** Start of system *************" > /data/local/status.txt
mount >> /data/local//status.txt
mount -o remount,rw -t yaffs2 `mount | busybox grep /system | busybox awk '{print $1}'` /system
mount -o remount,rw -t yaffs2 `mount | busybox grep '/data yaffs2' | busybox awk '{print $1}'` /data
mkdir /mnt/sdcard
echo "********* ReMount RW of system and data ***************" >> /data/local/status.txt
mount >> /data/local/status.txt
sleep 5
[B] echo "**********Listing all Devices************" >> /data/local/status.txt
ls -l /dev/block/ >> /data/local/status.txt
echo "**********DIR LISTING ENDS HERE**********" >> /data/local/status.txt
echo "********** Mounting SDCARD **************" >> /data/local/status.txt
mount -t vfat /dev/block/mmcblk0p1 /mnt/sdcard >> /data/local/status.txt
sleep 10
echo "*************** SDCARD mounting ***************" >> /data/local/status.txt
[/B] mount >> /data/local/status.txt
echo "1/1 : SD CARD Mounted" > /mnt/sdcard/status.txt
mknod /dev/block/loop0 b 7 0
echo "2/2 : create loop file" >> /mnt/sdcard/status.txt
ls -l /dev/block/loop* >> /mnt/sdcard/status.txt
echo -n "settingup loop : " >> /mnt/sdcard/status.txt
losetup /dev/block/loop0 /mnt/sdcard/ubuntu/ubuntu.img
echo $? >> /mnt/sdcard/status.txt
mkdir /data/local/tmp
mount -t ext2 /dev/block/loop0 /data/local/tmp
mount -t devpts -o bind devpts /data/local/tmp/dev/pts
mount -t proc -o bind proc /data/local/tmp/proc
mount -t sysfs -o bind sysfs /data/local/tmp/sys
echo "Mount Points" >> /mnt/sdcard/status.txt
mount >> /mnt/sdcard/status.txt
echo "END Mount Points" >> /mnt/sdcard/status.txt
ls -l /data/local/tmp >> /mnt/sdcard/status.txt
echo "Reached this level" > /data/local/tmp/root/status.txt
echo "nameserver 8.8.8.8" > /data/local/tmp/etc/resolv.conf
echo "nameserver 8.8.4.4" >> /data/local/tmp/etc/resolv.conf
echo "127.0.0.1 localhost" > /data/local/tmp/etc/hosts
echo "3/3 : Chrooting now " >> /mnt/sdcard/status.txt
chroot /data/local/tmp /root/xtr.sh
exit
fi
[XPERIA X10 Android Development] DooMLoRD:
thats interesting...

can u try the same with xRecovery 0.3 from here...

install xRecovery first then install the charger patch...

test xRecovery by rebooting and trying to get into recovery...

then test if u can get into android OS without any FC

and then finally insert the ubuntu booting part which u posted above...

i have a feeling that FreeXperia recovery doesnt play well with mounting SDCARD... because i am testing out DATA2SD with FreeXperia recovery with the user SErooted and the android system jsut keeps force closing... may be for sdcard mounting in chargemon xRecovery might be a more viable solution...
[XPERIA X10 Android Development] Neo.:
Just wanted to stop by and say excellent work guys
[XPERIA X10 Android Development] DooMLoRD:
thats brilliant dude!!!

wht was the change exactly from wht we discussed yesterday?

so now we start work on ubuntu_ramdisk.tar :)
[XPERIA X10 Android Development] DooMLoRD:
xrecovery.tar

hey i am attaching the ramdisk of xrecovery....

its a minimalist ramdisk with the following:

default.prop (so that adb is enabled during boot):

#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.service.adb.enable=1

init.rc

on init
export PATH /sbin
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard

on boot

ifup lo
hostname localhost
domainname localdomain

class_start default

service recovery /sbin/recovery

service adbd /sbin/adbd recovery

i guess we have to change the last two lines to load modules & start X

so after the removal commands in chargemon:

...
rm -rf /data/local/tmp/ubuntuboot
mount -o remount,rw rootfs /
cd /
rm -r /sdcard
rm init*
rm logo.rle
rm default.prop
....

we can have:

tar -xf /system/bin/ubuntu_ramdisk.tar
[XPERIA X10 Android Development] anantshri:
I have tried one simple change instead of mounting on /mnt i did it on /data/ and that worked.

so that's why i think it should work with free experia also.
[XPERIA X10 Android Development] anantshri:
I am trying to figure out one simple thing how to keep chroot inside linux till i say quit.
[XPERIA X10 Android Development] DooMLoRD:
meaning?

i didnt follow...
[XPERIA X10 Android Development] anantshri:
when we are doing chroot at that point we need some kind of a script which will keep running coz as soon as that script ends linux will shutdown.

I hope you got the point now.
[XPERIA X10 Android Development] Yperion:
Try an endless loop like:

while true; do

sleep 1

done

Use this on your script and lets hope that it works :p

ps: when you try to mount the sd on mnt, have you previously create the mnt/sdcard folder?

Regards.
[XPERIA X10 Android Development] anantshri:
yup i did tried that only.

mkdir /mnt/sdcard

and them the whole process you can see in a previous chargemon i was using
[XPERIA X10 Android Development] RaDi:
any state ?
[XPERIA X10 Android Development] anantshri:
as you can see we are right now focusing on dualbooting.

we have had hurdles like we were not getting chrooting done.

now chrooting is working

and now i am tring to get Xserver going on so that we can see some display going on.

in the mean time DooMLorD is working on custom ramdisk for this.

I will post more updates on my quest with X soon.

HEY BUDDY its weekend and its work time for this job....
[XPERIA X10 Android Development] GlossGhost:
Can somebody tell me..

Can I see the wifi chipset?
[XPERIA X10 Android Development] anantshri:
Didn't got what you wanted to know.
[XPERIA X10 Android Development] GlossGhost:
Okay... nvm for now ;)

Why You don't use 9.10? (btw in 11.04 there's nothing new >.<)
[XPERIA X10 Android Development] anantshri:
hey buddy there is some confusion where did i mentioned about 11.04 This is based on Lucid 10.04 LTS edition and not point releases.

LTS coz i want stable platform.
[XPERIA X10 Android Development] GlossGhost:
nowhere, I'm just saying ;)

Thanks, keep working :D
[XPERIA X10 Android Development] anantshri:
Progress Update

Hi All,

Just few more update steps.

I am stuck at multiple places and need community help now.

1) With mighty J's Help i got the boot sequence correct and now we need a custom kernel or atleast custom ramdisk inside boot.img

so i have started working on that.

however i have not idea on initrc for android and am trying to get that working.

what we need to do is .

Option 1

mount sdcard

mount img file

chroot and handover to init.

Option 2

mount sdcard partition 2

chroot and handover to init.

All hints are welcome.

Right now i am trying to edit the current kernel's ramdisk at later stage will do a kernel recompile.

Note : I was hoping if we could finish dual boot in next 5 days we could very well have completed the major sweat part of project within a month.
[XPERIA X10 Android Development] DooMLoRD:
Hey buddy i vote option 1

u can also check up ramdisks of current X10 roms...

once we get the desired ramdisk (init scripts) for ubuntu ready we can integrate them into the Nexus One custom kernel for ubuntu... so we have a x10 ready ubuntu booting custom kernel... :)
[XPERIA X10 Android Development] anantshri:
THe only concern for me with that part is .

we are loop mounting which seems to not at all work.

I am right now sleepy as hell will post my customized init.rc and we can have discussion on that tomorrow.
[XPERIA X10 Android Development] DooMLoRD:
wokay... sounds good... lets try it...

btw >> "we are loop mounting which seems to not at all work." ???
[XPERIA X10 Android Development] anantshri:
my current edit attempts didnt worked so i checked online found 2-3 places where people are either strugling or have abandoned loop mounting.
[XPERIA X10 Android Development] Meikrekel:
Any news regarding dual-boot?
[XPERIA X10 Android Development] anantshri:
Sorry bro in a hurry please check post 260 i am stuck at that still.
[XPERIA X10 Android Development] anantshri:
Quick Update

Hi All, Just few quick updates.

as part of my process to get dual booting i was trying to make my card recognizable with multiple partition and i have finally succedded in that -> http://xdaforums.com/showthread.php?t=1065348

Now this weekend i ma planing to get going with the dualboot debugging as right now me and DooMLorD are testing following thing's.

1) combining Z's custom kernel with ramdisk customized for ubuntu booting based on nexus ports earlier.

2) using stock kernel and just decompressing the ramdisk.

Expect some result soon.

as for the folks waiting for this to move in application side towards backtrack. Good News is Backtrack 5 will have an arm port. so all we need to do is make it runable on X10 and that would itself be a task coz right now they have targetted Xoom tablet, so screnesize and usability factor is what we have to work on.

However all that secondary rightnow my prime focus is in getting this system to dualboot properly.

Also we are trying to find a way to get debug messages printed on screen just like miniloader or sploader prints the debug messages onscreen.

Note : the slow progress is coz of two facts. I am stuck at office works most of the time second I can't even reboot my phone during normal day time leaving me small time for experiments except on weekends.
[XPERIA X10 Android Development] Meikrekel:
Heey, just checking by: any new results?
[XPERIA X10 Android Development] anantshri:
just trying various combination of ramdisk in boot.img

got two ramdisk samples right now.

http://android.galoula.com/en/LinuxInstall/

also i found one simplisting boot.img here

https://code.google.com/p/linux-on-android/

however boot are not directly integratable so just checking and doing test by modifying the code to see if we can achieve this....
[XPERIA X10 Android Development] anantshri:
Backtrack 5 working in chroot + update on dual boot.

Quick update

for backtrack fan's

[DEV] BACKTRACK 5 on Xperia X10 chroot

ON DUALBOOT OF UBUNTU progress so far is .

i am making certain progress in initramdisk work also.

from not booting at all of ubuntu i am on to WLOD's now.... :D
[XPERIA X10 Android Development] anantshri:
First attempt on Init Ramdisk

Hi All,

I am making small progress in ramdisk configuration however need some support here.

I have started to modify a custom kernel to create a good ramdisk for ubuntu booting.

this is what i suppose the sequence is

bootloader -> kernel -> custom kernel -> ramdisk;init on ramdisk -> init on machine.

so based on this right now i am trying to edit the ramdisk;init section trying to add a custom init script..

as linked earlier i saw few post's on various other sites however none of those init worked directly so i am making my own here based on my understanding of other init's.

Note : I am using v2 of Z's kernel which was FPS uncapped.

I have extracted the ramdisk and editing and again adding back ramdisk in new boot.img

so enough of my theory here is the code as of now.

#!/bin/busybox sh
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
[ -d /dev ] || mkdir -m 0755 /dev
[ -e /dev/console ] || mknod -m 0600 /dev/console c 5 1
echo "Loading, please wait..." > /dev/console
[ -d /disk ] || mkdir -m 0700 /disk
[ -d /sys ] || mkdir /sys
[ -d /proc ] || mkdir /proc
[ -d /tmp ] || mkdir /tmp
mkdir -p /var/lock
mount -t sysfs -o nodev,noexec,nosuid none /sys
mount -t proc -o nodev,noexec,nosuid none /proc

echo "Starting the process"
echo "There i go for console" >> /dev/console
SLEEP="busybox sleep 10"
ROOT=/data/linux
busybox mknod /dev/block/mmcblk0 b 179 0
busybox mknod /dev/block/mmcblk0p1 b 179 1
busybox mknod /dev/block/mmcblk0p2 b 179 2
busybox mknod /dev/block/mmcblk0p3 b 179 3
echo "Mounting rootfs"
#busybox mount -o noatime -t ext3 /dev/mmcblk0 /data
busybox mknod /dev/block/loop10 b 7 10
busybox mount -o rw -t vfat /dev/block/mmcblk0p3 /data
echo "SD MOUNTED" >> /data/log.txt
ls -l /data >> /data/log.txt
busybox losetup /dev/block/loop10 /data/ubuntu/ubuntu.img
busybox mount -t ext2 /dev/block/loop10 /data/linux
echo "Rootfs mounted"
busybox ls $ROOT >> /data/log.txt
echo "Chrooting"
$SLEEP
#busybox rm -rf /bin
#exec $ROOT/bin/busybox chroot $ROOT /sbin/init
exec run-init /data/linux /init "$@" </data/linux/dev/console >$/data/linux/dev/console
echo "init finished"

Right now i am getting WLOD.

sequence is

SE LOGO -> miniloader debug output then -> SE LOGO -> WLOD

and as per my debug code placed i am not getting any output @ log.txt in root of sdcard.

so sometime above first debug code is where we are having some error.
[XPERIA X10 Android Development] DooMLoRD:
@anantshri

are u trying to run this via chargemon?

cause busybox is not available when chargemon is executing... i learnt it the hard way when working on kernel manager...

suggestion:

make a folder

/system/ubuntu_boot/bin

in that place which every busybox version u want

/system/ubuntu_boot/bin/busybox

then create the symlinks for that busybox in:

/system/ubuntu_boot/bin/

u will need chmod / mount / sh / etc.... u get the idea...

and then is ur script use:

/system/ubuntu_boot/bin/sh

/system/ubuntu_boot/bin/chmod

etc...

also use the newest kernel k010 its based on 2.6.29.6 and has fps cap unlocked & overclocked
[XPERIA X10 Android Development] anantshri:
no buddy busybox is available in my ramdisk itself in correct location so that should not be the issue.

I am still not able to get how can we put debug code on console itself in case i don't want to mount any partition at all....
[XPERIA X10 Android Development] DooMLoRD:
btw the integrated ramdisk is executed AFTER chargemon execution is over...

any luck if u use different partitions to dump log? /system /data
[XPERIA X10 Android Development] anantshri:
integrated ramdisk????

also i am trying the other partition will revert in few minutes..
[XPERIA X10 Android Development] darkguy2008:
Hey, I'm having some problems here :(

It all goes ok until the chroot part, then it crashes with "Segmentation fault"... :/ this happens on any image (debian/ubuntu) I've tried. Any ideas? why would chroot segfault?
[XPERIA X10 Android Development] diament:
I know this is more for fun or testing purposes not for a daily use. And change root its a great piece of tool in linux indeed... But I think it is running slower then it should I mean GUI. Loading firefox takes about 5 minutes. Is it similar for you? Also what kind of sd card r u using?

I think it could be more painless if we could port some older and more lightweight distro.

Oh and ya think it could run much better if its booted directly from bootloader?

Regards.
[XPERIA X10 Android Development] anantshri:
direct bootloading is something we tried and are right now stuck at various places including finding a proper xorg.conf file.

also ttiming you are telling are on the far side.

try few things delete img file do a defrag of your sdcard then again copy the image again. also see if you can get a higher class sdcard.
[XPERIA X10 Android Development] sxrmafia:
Nice effort there dude
[XPERIA X10 Android Development] Jorge Claro:
I've read already half pages of this thread but I still don't understand one thing. Each time I want to run ubuntu, what do I have to do?

This runs in parallel with android?

Sorry about this questions, but I would thank you if somebody clear me up !
[XPERIA X10 Android Development] festa20:
Yes android still runs as Ubuntu will be running through vnc viewer
[XPERIA X10 Android Development] anantshri:
********** 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 ***************

this is what you need.
[XPERIA X10 Android Development] anantshri:
just a small update.

i was modifying the tuxcmd command and found this

if

busybox chroot $mnt /bin/bash

is replaced with

if [ $# -eq 0 ]
then
echo "Chrooting"
busybox chroot $mnt /bin/bash
else
echo "Executing The commands"
busybox chroot $mnt "$@"
fi
echo "Exiting"

This effectively allows you to go in and out of chroot environment quickly.

Not sure if someone could use it but i found it useful and thought would share with all..

will try to publish the revied scripts later sometime.
[XPERIA X10 Android Development] :
i want to confirm that ubuntu netbook works on my SE Neo! just a question, its very laggy and has no toolbar at the top with wifi and battery. did i miss something?
[XPERIA X10 Android Development] anantshri:
ubuntu netbook edition is where i have kept only unity 2d as a manager and hence no top bar is visible.

laggy it could be depending upon what applications are already running on your system.
[XPERIA X10 Android Development] :
So i downloaded the LDXE files but there is no img file or am i stupid?
[XPERIA X10 Android Development] anantshri:
when you download LXDE part 1 and part2 keep them in same folder and extract it that will give you img file and script set.
[XPERIA X10 Android Development] husseinb:
I am using this chroot with Unison to synchronize my sdcard to my computers. I wrote what I did on my website.

Edit: Updated and edited. Also included ideas for syncing Firefox and Keepass. I have also mirrored the files to help prevent the Dropbox problem.

Thanks!!
[XPERIA X10 Android Development] vitifj:
Work 100x100 in samsung galaxy s gti9000 .wuuuaoo...Thanks
[XPERIA X10 Android Development] 4llerbuntu:
deleted. bloody noob that i am
[XPERIA X10 Android Development] jimbo77:
I don't know if you have seen this but it may help to get our phones support for the Injection Method...

http://xdaforums.com/showthread.php?t=1271854

I took it from G1 Forums.....
[XPERIA X10 Android Development] anantshri:
thanks for the link buddy...

looking at it can't guarentee anything, something i also want... lets see what we can get out from there.
[XPERIA X10 Android Development] masterjet:
can you please reupload to mediafire?
[XPERIA X10 Android Development] anantshri:
will try to reupload as soon as possible however right now out of city so will only be uploading after 10th march.
[XPERIA X10 Android Development] masterjet:
Thanks, I'll be waiting
[XPERIA X10 Android Development] husseinb:
I tell people to download these frequently to use for their chroot. I read about your bandwidth problem so I mirrored a copy on my site with the appropriate credit to this thread. Please let me know if this is a problem for you. Otherwise, thank you for your hard work! I've used this on a Galaxy Tab and Galaxy S2X without a problem!

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/
[XPERIA X10 Android Development] anantshri:
no problem dude.

I will link these also on the front page.

however do check your service provider as these files will generate heavy traffic. > 500GB per month.
[XPERIA X10 Android Development] mynameisnafe:
Hi guys,

I remember trying the hack on Max Lees site a while back but had a few issues

I reckon this would work on my 404 Arc S..

Just had a scan through though and it's a bit confusing..

What are the official instructions, so I can be looking at lxde?

I am rooted, busyboxed, Android-VNC-Viewer'd

and I have /sdcard/ubuntu containing:

. ubuntu.img

. readme

. bootubuntu

. fsrw

. mountonly

. unionfs

. ubuntu.sh

But I don't understand this:

1) extract the content and copy then to /sdcard/ubuntu - cool

2) run 'sh ubuntu.sh' only once. - okay

3) run 'starttux' (is now made to work without userinput so if needed you can place it is startup using gscripts.) - from where now?

4) run 'tuxcmd' ?!

a) 'ui' inside tuxcmd to start vnc server - where's this?

to use GUI use any vncviwer and connect to localhost:5901

NOTE : VNCPASSWORD : 12345678

b) to kill vnc server : use 'killui' --and this?

5) when you want to stop ubuntu 'stoptux' -and this?

Do I copy from the developer part of OP int bash scripts? Then in the /sdcard/ubuntu folder?

Hope somebody is still watching this thread, I've been wanting this forever!
[XPERIA X10 Android Development] husseinb:
Type starttux and tuxcmd in the console for your android. Example, local connection on connect bot. You must be root though so enter su first.

Once you type tuxcmd you enter the chroot. Type ui to start the vnc server.
[XPERIA X10 Android Development] mynameisnafe:
I built a 4GB image with rootstock.. ubuntu.sh works and bootubuntu gets me in, but apt-get udate tells me to run 'dpkg --configure -a' - when I do that command it runs fine for a while before it tries to install/fix mysql and I start getting a bunch of what I assume is hex (something to do with setting mysqls root password?)

So thats where I'm stuck at, but i'm running it from root@localhost so I'm in ubuntu..

Anyways.. distraction aside:

with starttux and tuxcmd.. are they a part of ubuntu or do I need to create them as scripts in sdcard/ubuntu before I use them?

Sorry for being so uberly confused :/

PS I'm going to rootstock another 4GB ubuntu with like nothing except LXDE and tightvncserver and openssh-server i think..

Thanks for getting back to me, I really appreciate it.. this is too awesome of a hack to pass up!

---------- Post added at 11:47 PM ---------- Previous post was at 11:46 PM ----------

Also.. uninstall options?
[XPERIA X10 Android Development] husseinb:
ConnectBot:

-local connection

1. su

2. cd /sdcard/ubuntu

3. sh ubuntu.sh

4. starttux

5. tuxcmd

Uninstall: read ubuntu.sh and just remove the scripts it copies.
[XPERIA X10 Android Development] mynameisnafe:
Downloading connectbot now..Didn't know what it was would you beleive I just scanned my first QR code? And just found out SSH stands for secure shell.. :$ lol

Thanks dude! Am about to pop out for a while.. will try when I get back!
[XPERIA X10 Android Development] chriscx:
new development ?
[XPERIA X10 Android Development] ickysjazz:
A w e s o m e ! ! !

Good Job, i will wait 4 a guide to test it !
[XPERIA X10 Android Development] varunoza:
http://xdaforums.com/showthread.php?t=962023 can this be done on the x10i...sorry for the noob question...but has any1 tried this???
[XPERIA X10 Android Development] anantshri:
Hi varunoza,

This is exactly what you have pointed.

we are running ubuntu 10.04 LTS release for better stability.

However my approach has some salient features.

1) runs without any trouble even with phones using APP2SD or simmilar softwares. (testing with less then 99 apps installed.)

2) no need to keep the shell running in background to use the GUI.

3) once mounted anytime shell could be gained using tuxcmd command.

4) GUI is not on by default and hence good for those who prefer not to have GUI.

although its just one command away. all you need to do is "ui" and gui is started.

hope this clears your doubt.

Right now i am focusing on

1) creating a 2-3 step process to set all this up for the first time.

2) trying to see if i am use chargemon script to perform any of this.

3) also trying to read how can we go ahead with meego porting to Xperia.
[XPERIA X10 Android Development] Neo.:
Excellent. If you can use bypass and dual boot that wouuld be epic.
[XPERIA X10 Android Development] varunoza:
thats awesome..will be waiting for the 2-3 step process and dual booting if possible!!! cheers!