#!/system/bin/sh mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 / mkdir /mnt/ubuntu export mnt=/mnt/ubuntu export PATH=/usr/bin:/usr/sbin:/bin:$PATH export TERM=linux export HOME=/root export kit=/sdcard export USER=root export loopdev=/dev/block/loop99 echo "SETTING UP LOOP DEVICE" mknod /dev/block/loop99 b 7 99 losetup $loopdev $kit/ubuntu.img mount -t ext2 $loopdev $mnt mount -t devpts devpts $mnt/dev/pts mount -t proc proc $mnt/proc mount -t sysfs sysfs $mnt/sys echo " " echo "Type EXIT to end session" echo "Make sure you do a proper EXIT for a clean umount!" echo " " echo "Please reboot your device when you finished your work." chroot $mnt /bin/bash busybox umount -f /mnt/ubuntu/dev/pts /mnt/ubuntu/proc /mnt/ubuntu/sys