[Galaxy S III Mini Android Development] Android-Andi:
Reserved

Dual Boot FAQs

Adapted from [MENTION=4021423]ketut.kumajaya[/MENTION] s Dual-Boot FAQ,

original adapted from droidphile's "Dual Boot FAQs".

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

A. You don't have to.

You need one testing system and don't want to break your daylie Rom.

You can not decide between different Roms - use both :)

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 mmcblk0p24 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:-

Prerequisites for any setup is

a) Flash latest blackhawk's NEXT kernel.

b) Flash latest Extended PhilZ Touch recovery: http://xdaforums.com/showpost.php?p=54772218&postcount=2

c) Atleast 90% battery left.

d) 3 GB free on internal SD.

e) Some spare time

1) Present AOSP, setup AOSP as secondary:-

i) Reboot into recovery

ii) Select "Run Aroma Dual Boot Tool" in Advaced Menu, create system.img for CM/CM based ROM and then close it

iii) Reboot into secondary recovery (red on screen navigation buttons)

iv) Flash AOSP ROM as 2nd ROM

v) Flash blackhawk's NEXT kernel again

2) Present AOSP, setup aosp as primary:-

i) Reboot into recovery

ii) Nandroid backup your current sammy ROM

iii) Select "Run Aroma Dual Boot Tool" in Advaced Menu, create a 2nd system.img and then close it

iv) Reboot into secondary recovery (red on screen navigation buttons)

v) Nandroid restore your AOSP ROM as 2nd ROM

vi) Flash blackhawk's NEXT kernel again

vii) Reboot into primary recovery

viii) Flash AOSP ROM as 1st ROM

ix) Flash blackhawk's NEXT kernel again

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

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

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

A. Just flash it from secondary recovery. Flash blackhawk's NEXT kernel again

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. "Do I need to anything special before flashing a newer blackhawk's NEXT kernel?"

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

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

A. In primary recovery, flash blackhawk's NEXT tool or "Run Aroma Dual Boot Tool" in Advaced Menu from PhilZ Touch Blackhawk and delete 2nd ROM system image. OR delete .secondrom directory in /data/media while on 1st Rom.

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.

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

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

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

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

A. Yes, send your device to me.

26. "DB architecture?"

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

For primary rom, it's

mmcblk0p25 = /data

mmcblk0p22 = /system

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

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

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

- dev/block/mmcblk0p24 is mounted as /cache.

How to get important Logs

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