Anyways, here we go, I DUALBOOTED two different, independant ROMs on the S2
Video of dualboot in action: http://www.youtube.com/watch?v=l9-V_6Ua_D0
** WITH ICS (ANDROID 4.0.x) ROMS! **
-- this goes for custom ROMs as well as stock ROMs --
Icey Sammich compatibility will be added once Sammy released their ICS kernel sources.
!!! There now is an app for more convinient and easy setup of the dualboot !!!
(04.11.2011) DualBoot setup app v2.00: http://forum.xda-developers.com/show...7&postcount=94
(12.12.2011) App has been updated to 2.51, lot's of good new stuff! >> Free Version -- Donate Version <<
This is only a little experiment I did like "c'mon, has to be possible" - this is NOT (at least yet) tweaked for usability and anything the like, just a humble experiment.
That said, don't flame me if things are rather complexicated to do this ATM.
Maybe I'll come up with a more userfriendly way of setting this up, maybe someone else does, maybe no one does.
Also now that I found a base on what to do, there might be different ways (more easy ones maybe) to set this up, I'll keep toying around with it.
But let's cut to the chase, shall we
So, how was this set up? I'll give a brief rundown of what I did:
I edited a few .rc files in the initramfs of the kernel to make it actually perform a full boot when recovery mode was triggered and to fire up recovery mode when in battery-charging mode.
I also edited a few mounts in the boot .rc for the 2nd OS (in "recovery" mode) to use different partitions for /system and /data, so that we'd end up with really independant installs.
What partitions did I missuse for that:
- partition 12 (mostly unused, only when installing a stock ROM AFAIK) for /system - that's a neat choice IMO as p12 is 512MB in size, just as p9 where /system usually sits on
- partition 7 (which is usually /cache) for /data
gives us only 100MB of user data space, but for now that's OK, as said, it's only an experiment on how such a thing could be done.
- with the original partition for /cache "gone", I mounted a tmpfs for it.
So the OS still has a usable /cache
Then I set up the two OSes:
(dualboot kernel not yet flashed)
Launchprep part 1:
- I made a CWM backup of my normal installation I was running (stock XXKG6 at the time).
- I installed DevNull-Test AOSP as to it's instructions
- Some su'ed voodoo via a terminal while having the 2nd OS (the DevNull AOSP one, in this case) installed - best done in recovery mode via ADB:
rm -Rf /cache/*
cp -Rp /data/* /cache/
dd if=/dev/block/mmcblk0p9 of=/dev/block/mmcblk0p12 bs=4096
That did "set up" the 2nd OS to where it's supposed to go.
Launchprep part 2:
Then, "advanced restore" of the backup made a few minutes earlier:
At this point OS #1 is running again and OS #2 is sitting in hiding, prepared to roll - so, let's roll:
Flashed the modified "dualboot kernel" (via an App or Odin or magic, doesn't matter).
---> DONE <---
reached the point to where everything works as shown in the video.
As said above already, yes it needs some manual work to set it up, yes there's a lot of things that might not work, yes there are other/better ways to set it up.
It's only a humble experiment - lot's of space for improvement.
Maybe you like it - for those who do, I wanted to share this
Attached to this post you find the modified kernel I used, it's based on my v1.20 custom kernel (see sig) but with the above mentioned changes.