[Galaxy S III Original Android Development] droidphile:
DualBoot FAQs

1. "Why would I wanna dual-boot?"

A. You don't have to.

Suppose you're more of an aosp rom fan. But you kinda miss the HDMI out, FM radio and may be you love sammy camera more. You can do a minimal installation of sammy rom and boot into it when in need of these features and use aosp rom otherwise.

Or you might be a sammy rom fan but love the responsiveness and pure android feel that aosp roms give.

And while you can dual boot two sammy or two aosp roms, it doesn't make any sense.

2. "What if I don't need dual booting?"

A. No issues. Kernel won't force to setup 2 roms. You can single boot as before. And if you don't want to see the Siyah logo as well, create a .nobootlogo file without any extension or content in internal SD.

3. "I want to setup dual booting."

A. There are four situations:-

1) Sammy rom now. Want to use aosp as secondary.

2) Sammy rom now. Want to use aosp as primary.

3) Aosp rom now. Want to use sammy as secondary.

4) Aosp rom now. Want to use sammy as primary.

Prerequisites for any setup is

a) Flash latest siyah

b) Flash alternate recovery provided by gm.

c) Have any sammy ics rom zip downloaded.

d) Atleast 90% battery left.

e) 2 GB free on internal SD.

1) Present sammy, setup aosp as secondary:-

Method 1:

i) Reboot to recovery. Clone 1st rom to 2nd rom. (Sammy is now secondary as well as primary)

ii) Flash ICS rom with a full wipe. Boot to the rom. Reboot to recovery.

iii) Full wipe and install the JB aosp.

iv) Swap 1st Rom and 2nd Rom in recovery.

OR

Method 2:

i) Nandroid backup sammy rom.

ii) Flash ICS rom with a full wipe. Boot to the rom. Reboot to recovery.

iii) Full wipe and install the JB aosp.

iv) Clone 1st Rom to 2nd Rom in recovery.

v) Restore the nandroid of sammy rom.

2) Present sammy, setup aosp as primary:-

Carry out first three steps in Method 1

3) Present aosp, setup sammy as secondary:-

i) Nandroid backup your aosp rom.

ii) (Without exiting recovery) Full wipe and install sammy rom. Boot to rom.

iii) Reboot to recovery. Clone 1st Rom to 2nd rom in recovery.

iv) Flash ICS rom with a full wipe. Boot to the rom. Reboot to recovery.

v) Restore nandroid of aosp rom.

4) Present aosp, setup sammy as primary:-

Carry out steps as above, then swap 1st rom and 2nd rom from recovery.

NOTE: Makes sure to flash your zips (themes/scripts/mods/apps) to your second rom before cloning it to secondary using "clone 1stRom to 2ndRom" option. And flash Siyah again after setting up db, just to be sure.

4. "How to boot into primary rom?"

A. Wait for the 3 second timeout or press volume up to skip 3 second timeout.

5. "How to boot into secondary rom?"

A. During the 3 second timeout, press volume down or power button.

6. "Is kernel partition shared?"

A. Yes. Same kernel boots both roms.

7. "If I flash another kernel (that doesn't support db) do I lose dual booting?"

A. Yes

8. "I lost dualbooting after flashing another kernel. I didn't do anything to second rom files in sdcard/.secondrom. How can I get db back?"

A. Just flash the latest Siyah.

9. "Will there be any performance degradation on the rom used as secondary?"

A. NO

10. "Will my phone run slow overall because of db?"

A. NO

11. "How to flash a newer version of 1st rom?"

A. As usual, just flash it from recovery.

12. "How to flash newer version of 2nd rom?"

A. Swap 1st and 2nd rom in recovery, flash the newer version, swap again.

13. "I miss the recovery I used before, so much.."

A. After you have setup dual booting, you can odin flash any recovery you like. It won't break dualbooting. But when you wanna play with db settings later on, you need GM's alternate recovery.

14. "User apps of 1st rom are automatically available for second rom?"

A. NO. However, if you had backed them up using Titanium Backup or similar apps, just restore apps while on second rom.

15. "I wanna keep separate backup for apps in both the roms, since I use one Rom for say entertainment and other productivity."

A. Setup different backup directory in Titanium Backup in 1st and 2nd rom.

16. "I don't see Stweaks app in second rom."

A. Delete /system/.siyah/stweaks-installed file in 2nd rom. Reboot to second rom.

17. "Do I need to anything special before flashing a newer Siyah?"

A. NO. Just flash kernel as tar or in recovery - whichever you used to do. Kernel image is copied to the unified kernel partition.

18. "How can I run same STweaks settings of 1st Rom in 2nd Rom?"

A. While on 1st rom, copy /data/.siyah/default.profile to /data/media/data/.siyah directory.

19. "How do I remove everything related to DB and run single boot again?"

A. Delete .secondrom directory in /data/media while on 1st Rom.

20. "DB architecture?"

A. Like you know, every rom has a /data, /system, /cache partition and a kernel to boot.

For primary rom, it's

mmcblk0p12 = /data

mmcblk0p9 = /system

mmcblk0p8 = /cache

And these won't change whether you're single booting or dual booting.

For secondary rom, data and system is stored in internal sd, cache in hidden partition. Note that internal sd in our device is mounted to /data/media.

We have data as a directory, System as an image in data/media/.secondrom. Cache in mmcblk10 which is hidden partition and not used otherwise.

- When second rom is booting, second rom data is bind mounted to mmcblk0p12 as /data/

- data/media/.secondrom/system.img partition is mounted as /system.

- mmcblk0p10 is mounted as /cache.

21. "If secondrom files are kept in /data/media, will wiping data in recovery erase second rom files?"

A. NO. /data/media is skipped in CWM recovery.

More FAQs will be added and be kept in some convenient place. Moreover, there will be easier way of setting up DB when all the DB options in recovery are implemented. But please don't clutter dev thread asking questions on these q&a. Use discussion thread for the same.