[XPERIA X10 Android Development] anantshri:
GOOD NEWS FOLKS

Looks Like CHROOT is working now

all we need is a good initscript now.

check my latest results

THIS IS WITH XRECOVERY i believe will work with free xperia too will test it some time later.

CHARGEMON

#!/system/bin/busybox sh
cat /dev/input/event2 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/recoveryboot ]
then
rm -r /data/local/tmp/recoveryboot
mount -o remount,rw rootfs /
umount -l /data
umount -l /cache
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
umount -l /system
chroot / /init
fi

/system/bin/charger

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 /data/sdcard
echo "********* ReMount RW of system and data ***************" >> /data/local/status.txt
mount >> /data/local/status.txt
sleep 5
/mmcblk0p1 /mnt/sdcard
echo "**********Listing all Devices************" >> /data/local/status.txt
ls -l /dev/block/ >> /data/local/status.txt
echo "List of MMC CARD " >> /data/local/status.txt
ls -l /dev/block/mmcblk0p1 >> /data/local/status.txt
echo "**********DIR LISTING ENDS HERE**********" >> /data/local/status.txt
rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
echo "********** Mounting SDCARD **************" >> /data/local/status.txt
mount -t vfat -o rw,noatime,nodiratime /dev/block/mmcblk0p1 /data/sdcard
sleep 5
echo "*************** SDCARD mounting ***************" >> /data/local/status.txt
mount >> /data/local/status.txt
echo "1/1 : SD CARD Mounted" >> /data/local/status.txt
mknod /dev/block/loop10 b 7 10
echo "2/2 : create loop file" >> /data/local/status.txt
ls -l /dev/block/loop* >> /data/local/status.txt
echo -n "settingup loop : " >> /data/local/status.txt
losetup /dev/block/loop10 /data/sdcard/ubuntu/ubuntu.img
e2fsck -y /dev/block/loop10
echo $? >> /data/sdcard/status.txt
mkdir /data/local/tmp
mount -t ext2 /dev/block/loop10 /data/local/tmp
sleep 5
echo "************** Setting up the image ************" >> /data/local/status.txt
mount >> /data/local/status.txt
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" >> /data/local/status.txt
mount >> /data/local/status.txt
echo "END Mount Points" >> /data/local/status.txt
ls -l /data/local/tmp >> /data/local/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 " >> /data/local/status.txt
date >> /data/local/status.txt
echo "********** END OF LOG ***********" >> /data/local/status.txt
chroot /data/local/tmp /root/xtr.sh
echo "CHROOT EXITED " >> /data/local/status.txt
date >> /data/local/status.txt
exit
fi

# remount rw
mount -o remount,rw rootfs /

cd /
rm -r /sdcard
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
insmod /system/lib/modules/splboot.ko

if [ -e /data/data/com.android.providers.telephony/databases/telephony.db ]; then
/system/bin/chroot / /init
exit
fi

chroot / /init

also find attached status.txt file

and this is what i get @ status.txt inside linux.

proving that chroot is indeed working.

root@localhost:~# cat status.txt
Reached this level
Welcome to CHROOT