[XPERIA X10 Android Development] DooMLoRD:
DIFFICULTY

: HARD

These steps are for advanced users only!!!

Also I am not saying that this is the only way but rather that this is the way I managed to get it working…

A BIG THANK YOU TO ZDZIHU FOR GIVING US THIS NEW TOOL TO PLAY WITH

also thank you anantshri, rdannar & Chumby_666!!!

sorry for the delay...

was busy at work and some personal stuff...

i still didnt get time to write it in detail... but will post some short instructions here...

the whole procedure is similar to the one i posted here:

[W-I-P][DEVELOPMENT] Dual / Multi Boot Project: Devs Only

there are just some minor modifications to make it compatible with dualboot part posted by zdzihu...

i will be just highlighting the differences...

basically the whole problem was due to incorrect ownership on /system & /data

ownership on /data is a NIGHTMATE!!! so i recommend using a BLANK data img

[ its not a total loss... there is a possibility of using something like fix_permissions option in recovery but i am not sure if it fixes permissions on /data i am trying to find a equivalent command to be executed for the created ext2 images ]

ownership on /system is manageable and can be easily resolved looking at update-script

thats who i managed to get this working!!!

I recommend using linux to achieve this.. i personally used ubuntu in VirtualBox...

I recommend doing clean install of the rom u want to dualboot into and then creating a nandroid/recovery backup of it (currently only 2.1 for others read the limilations section i have posted below)

Short How-To:

Create a blank system.img (ext2 image) [will later have to be renamed to system.ext2] of reasonable size (~200 MB) using:

[APP] Windows: Create Your Own Data.img Maker Application, +/- From Existing data.img

u can later on resize the image using this same tool

Currently we will work only with system.img (yaffs), cause there a a LOT of issues related to ownerships on data.img

Extract the contents of ONLY system.img using the procedure mentioned at the Dual / Multiboot project thread

later mount the blank (ext2) system.img file created in step no.1 and copy the files extracted from the yaffs image using the procedure mentioned at the Dual / Multiboot project thread

once that blank file is populated with the files unmount it and copy it to /system/dualboot/ folder on ur X10

also create a blank (ext2) data.img of size ~150mb

copy this blank (ext2) data it to /data/dualboot/ folder on ur X10

now loop mount the system.img in android

# loop mounting
losetup /dev/block/loop2 /system/dualboot/system.img

# check ext2 fs
e2fsck -y /dev/block/loop2

# make mount points
mkdir /data/local/tmp/mnt_sys

# mount images to mount points
mount -t ext2 /dev/block/loop2 /data/local/tmp/mnt_sys

if losetup fails then directly mount ext2 img

# make mount points
mkdir /data/local/tmp/mnt_sys

# test mounting
mount -t ext2 -o rw,noatime,nodiratime /system/dualboot/system.img /data/local/tmp/mnt_sys

now open the update-script from update.zip of the rom u used to install and take backup

what we are interested in is setting correct permissions on /system

here is an example of the update-script of the rom i used:

set_perm_recursive 0 2000 0755 0755 SYSTEM:bin
set_perm 0 3003 02750 SYSTEM:bin/netcfg
set_perm 0 3004 02755 SYSTEM:bin/ping
set_perm_recursive 1002 1002 0755 0440 SYSTEM:etc/bluez
set_perm 0 0 0755 SYSTEM:etc/bluez
set_perm 1002 1002 0440 SYSTEM:etc/dbus.conf
set_perm 1014 2000 0550 SYSTEM:etc/dhcpcd/dhcpcd-run-hooks
set_perm 0 2000 0550 SYSTEM:etc/init.goldfish.sh
set_perm 0 0 06755 SYSTEM:bin/su
set_perm_recursive 0 0 0755 0555 SYSTEM:etc/ppp
set_perm_recursive 0 2000 0755 0755 SYSTEM:xbin
set_perm 0 0 04755 SYSTEM:recovery/sh
set_perm 0 1000 0755 SYSTEM:xbin/busybox

basically we have to correct ownership on /system

based on the above update-script here are the commands u need to use to set those ownerships:

chown root.shell /system/bin/*
chown root.inet /system/bin/netcfg
chown root.net_raw /system/bin/ping
chown bluetooth.bluetooth /system/etc/bluez
chown bluetooth.bluetooth /system/etc/bluez/*
chown bluetooth.bluetooth /system/etc/dbus.conf
chown dhcp.shell /system/etc/dhcpcd/dhcpcd-run-hooks
chown root.shell /system/etc/init.goldfish.sh
chown root.shell /system/xbin/busybox

after all this permission corrections is over just unmount the system.img mounted

umount /data/local/tmp/mnt_sys

finally rename:

/system/dualboot/system.img to /system/dualboot/system.ext2

/data/dualboot/data.img to /data/dualboot/data.ext2

thats it.. now just keep the following files provided by zdzihu in in /system/kernel/:

boot.sh

miniloader

splboot.ko

boot-stock.img

now test booting using xRecovery v1.0.0 ("boot custom kernel/ROM" option)

u can now customize the dualboot rom to ur linking (remove apps etc) and if required use the app in step 1 to resize the images

Current limitations:

due to the HORROR of ownership on /data, currently the above procedure will work only for system.imgs

since the custom kernel (boot-stock.img) posted by zdzihu seems to be containing a 2.1 ramdisk the custom kernel, as of now, will work only for 2.1 ROMs... it would be possible to modify the ramdisk for 2.2 / 2.3 roms (keeping the special mounting intact) but i am currently busy with work so wont be working on this right now.. will try it on this weekend.. if someone wants to try i will be glad to help out where-ever possible...

i might have missed a few small points here n there or might be some typos present... but i am sure u get the idea abt wht needs to be done... kindly forgive me for that... really tired and sleep right now ;)

a detailed how to will be posted in posted later ... [will reorganized the posts/contents later]