[Android General] <JohnCarter>:
Ever wanted to try a new rom without having to waste our time on making backups then trying the rom and then again restoring it, and if another rom pleases you at the moment , you'll have to perform the same drill again and again ... Well Now NO MORE of this frustrating business.

Here i present you my very own method of Dual Booting almost ANY two roms you like on YOUR device.

But make sure to try at your risk.. as per DoomLord many devices can be hardbricked too.

Do Not use this method

on newer (post 2012) qualcomm chipsets the TA and Bootloader, reside on similar partitions... if u screw with these partitions device gets HARD BRICKED!

As the partition maps vary from device to device it may not work for you and you may get your device hard bricked!

Also your device must use older bootloader bypass based kernels i.e boot.img format and has SD-card slots for this method to work !!

Before we begin here's what Dual Booting means :

- Dual booting is the process through which you can switch between any two or more roms without the need of wiping data or making backups before flashing ,all you need to do is switch between the roms ,meanwhile all the apps you've insatlled remain intact in their specific rom.

for ex- If you are using cm10 and you have installed a lot of apps, and you want to test other rom ,but you don't want the fuss of backing up then flashing.. This dual booting method is for you !!​

So to begin with make sure you meet the following prerequisites :

Your Device which can run android :P

an class 6 or above SD-Card

an Os on the PC to make partitions on the SD-card

ubuntu for kernel specific changes

notepad ++

ConCentRation

If you meet all the above requirements you are good to go ;)

Now to Before we get our hand in the filth remember : You need to have and an SD-Card that's class 6 or above because we would be using it extensively , and slow cards may not keep up

SO LET'S ROLL :

In this method

[/CENTER]

Primary Rom = The rom which is modded and remains on the Sd-ext partitons

Secondary Rom = any rom you wish (any android version for ex- cm9 , cm10.1 and even stock !) [ make sure that the secondary rom doesn't use sd-ext partitions]​

I would be dividing the process in tow steps : 1) Kernel level changes and 2)SD-card and Rom level changes

1- Kernel Level Changes :

Get the source of any kernel for your device (if you don't know what's kernel compilation you can go to xda-university to learn it.)

-Now open the defconfig file (usually present in : "arch/arm/config" -folder)

-Search for LBDAF and then change the line consisting it as follows :

CONFIG_LBDAF=y

and now compile the kernel

This is done so that our Primary Rom can support multiple SD-ext partitons

-Now grab the boot.img of your Primary Rom , unpack it using any tool of your convenience(Google : chanpionwimmer's kernel tools -- i use it ) now open the ramdisk part , then open init.rc

-Search for the rom's mounting functions it will be like:

mount yaffs2 mtd@system /system
mount yaffs2 mtd@system /system ro remount

it will vary from device to device.. proceed only if you know the correct mount points for your device.. otherwise you WILL hardbrick your device

-Now replace the following lines from the mounting functions to this Make sure you know the correct mount points of your device :

# Mount SD-SYSTEM
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
wait /dev/block/mmcblk0p2
mount ext4 /dev/block/mmcblk0p2 /system
mount ext4 /dev/block/mmcblk0p2 /system ro remount

# Mount SD-DATA
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
wait /dev/block/mmcblk0p3
mount ext4 /dev/block/mmcblk0p3 /data nosuid nodev noatime nodiratime barrier=0 data=ordered commit=15 noauto_da_alloc nouser_xattr errors=continue

# Mount SD-CACHE
wait /dev/block/mmcblk0p4
wait /dev/block/mmcblk0p4
wait /dev/block/mmcblk0p4
wait /dev/block/mmcblk0p4
mount ext4 /dev/block/mmcblk0p4 /cache nosuid nodev noatime nodiratime barrier=0 data=ordered commit=15 noauto_da_alloc nouser_xattr errors=continue

-Now recompile the kernel and you are good to go

more in the 2nd post ..​