[Galaxy Tab 2 10.1" Android Development] ketut.kumajaya:
Dual Boot FAQs

Adapted from droidphile's "Dual Boot FAQs" with permission.

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

A. You don't have to.

Suppose you're more of an aosp rom fan. But misses the HDMI out, bluetooth hands-free and love sammy camera more. Do a minimal installation of sammy rom and boot into it when in need of these features and use aosp rom otherwise.

Or you are a sammy rom fan but love the responsiveness and pure android feel of aosp roms.

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.

3. "Will dual booting change my bootloader or do any dangerous stuff like setting my phone on fire?"

A. NO. Changes are at kernel and ramfs level only. Some space in your internal sd card is used, and also the unused hidden partition mmcblk0p11 is used to store cache of second rom. Dual booting doesn't repartition the filesystem or perform anything scary.

4. "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 blackhawk's NEXT kernel

b) Flash new ducati vendor blobs (since 1.8.x)

c) Flash latest PhilZ Touch - blackhawk repack version - recovery

d) Atleast 90% battery left.

e) 2 GB free on internal SD.

f) Some spare time

1) Present sammy, setup aosp as secondary:-

i) Reboot into recovery

ii) Flash blackhawk's NEXT tool, create system.img for CM/CM based ROM and then close it

iii) Reboot into secondary recovery

iv) Flash aosp ROM as 2nd ROM

v) Flash blackhawk's NEXT kernel again

vi) Flash new ducati vendor blobs again (since 1.8.x)

2) Present sammy, setup aosp as primary:-

i) Reboot into recovery

ii) Nandroid backup your current sammy ROM

iii) Flash blackhawk's NEXT tool, create system.img for Samsung stock/stock based ROM and then close it

iv) Reboot into secondary recovery

v) Nandroid restore your sammy ROM as 2nd ROM

vi) Flash blackhawk's NEXT kernel again

vii) Flash new ducati vendor blobs again (since 1.8.x)

viii) Reboot into primary recovery

ix) Flash aosp ROM as 1st ROM

x) Flash blackhawk's NEXT kernel again

xi) Flash new ducati vendor blobs again (since 1.8.x)

3) Present aosp, setup sammy as secondary:-

Same as (1), instead of flashing aosp to second, flash sammy to second.

4) Present aosp, setup sammy as primary:-

Same as (2), instead of flashing aosp to first ROM, flash sammy.

NOTE:

-To dual boot Two Aosp or Two Sammy roms, just follow (1) or (2) (depending on which one of them you want as primary/secondary), just flash Sammy instead of aosp or aosp instead of sammy.

5. "What things should I be taking care off while dealing with dual booting?"

A. - Make sure where you are: in primary or secondary recovery.

6. "How to boot into primary rom?"

A. AROMA based boot menu will help you on every boot.

7. "How to boot into secondary rom?"

A. AROMA based boot menu will help you on every boot.

8. "Is kernel partition shared?"

A. Yes. Same kernel boots both roms.

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

A. Yes

10. "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 blackhawk's NEXT kernel, flash new ducati vendor blobs again (since 1.8.x)

11. "Will there be any performance degradation on the rom used as secondary compared to primary?"

A. NO

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

A. NO

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

A. As usual, just flash it from primary recovery. Flash blackhawk's NEXT kernel again, flash new ducati vendor blobs again (since 1.8.x)

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

A. Just flash it from secondary recovery. Flash blackhawk's NEXT kernel again, flash new ducati vendor blobs again (since 1.8.x)

15. "Would upgrading 1st or second rom cause other rom to fail on boot?"

A. No. Partitions of other rom are not touched during upgrading.

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

A. PhilZ Touch not bad at all.

17. "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.

18. "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.

19. "I don't see STweaks app in second rom."

A. This is blackhawk's NEXT dual boot solution for Galaxy Tab 2, a free implementation of gokhanmoral's Siyah dual boot.

20. "Do I need to anything special before flashing a newer blackhawk's NEXT kernel?"

A. NO. Just flash kernel in primary and secondary recovery. Yes, on both 1st and 2nd ROM. Just flash kernel in recovery - whichever you used to do. Kernel image is copied to the unified kernel partition (since 1.4 version). Flash new ducati vendor blobs (since 1.8.x) on both ROM may be required to ensure vendor blobs match to the kernel

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

A. This is blackhawk's NEXT dual boot solution for Galaxy Tab 2, a free implementation of gokhanmoral's Siyah dual boot.

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

A. In primary recovery, flash blackhawk's NEXT tool and delete 2nd ROM system image. OR delete .secondrom directory in /data/media while on 1st Rom.

23. "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.

24. "I was using ExFat card on sammy rom without any issues. I have setup dual boot with aosp and now after booting into CM it says microSD card is corrupted."

A. Aosp roms doesn't support ExFat out of the box. The data was corrupted by aosp vold. Even if you boot back to Sammy rom, it still would be corrupted. To recover data, manually mount the card in recovery, copy contents to internal SD and reformat card to a Fat32.

Also try

chkdsk X: /f (where X is the drive letter of microsd), you may be able to copy data.

25. "I read somewhere that both rom data partition use the same space. Doesn't that mean my apps are shared across roms?"

A. NO. It just means they uses same partition. They're still different directories.

1st rom data = /data

2nd rom data = /data/media/.secondrom/data

26. "Will hitting "Boot into Secondary Recovery" in recovery boot menu change my recovery?"

A. NO. It just runs (not flash) an alternate recovery so that you can configure dualboot settings.

27. "How do I backup 1st Rom and 2nd Rom?"

A. To backup 1st Rom, do what you did to backup rom while you were single booting a while ago.

To backup 2nd Rom, use the secondary recovery.

28. "Is there an easier way for dual-boot?"

A. Yes, send your device to me.

29. "DB architecture?"

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

For primary rom, it's

mmcblk0p10 = /data

mmcblk0p9 = /system

mmcblk0p7 = /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 mmcblk0p11 which is hidden partition and not used otherwise.

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

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

- mmcblk0p11 is mounted as /cache.

More FAQs will be added and the list will be updated as DB is improved.