Silly Clone

Random crap, like its hot

How to 2nd ROM with Siyah Kernel – Dual Boot

Like many Android users, you might get bored with the standard stock Ice Cream Sandwich (ICS) ROM. Here is how to flash a custom ROM with Siyah kernel. If I was able to do it, anyone can. Here’s a guide for noobs.

I did this with the Cyanogenmod 9 ROM on my Samsung Galaxy S2. But it should work similarly on all Android devices.

First,  you will need to download Odin for your computer. You will use Odin to flash Siyah kernel.

Next, download Siyah kernel.

Ensure your phone has enough battery life (more than 50%, just to be safe). Also ensure you have enough free storage space (about 1Gb).

Switch your phone off and boot it into Odin mode. This can be done by pressing the following key combination when your phone is off: The volume-down button + the home button + the power button. It will display a warning, and you have to press volume-up button again to continue. Once in Odin mode, open Odin on your computer and connect your phone via USB.

Odin will pick up that your phone was connected. Next, click on PDA and browse to the Siyah kernel you downloaded earlier.

Now flash the PDA. Odin will display a ‘success’ status. Now you’ve got a rooted phone. If that is all you want, you’re done.

But if you’d want a custom ROM, like Cyanogenmod, read on.

The Siyah kernel replaced your default bootloader. Now you can dual boot with stock ICS and a custom ROM if you want.

Next, download the latest Cyanogenmod build for your device on your PC. Now you have to move that .zip file to your phone’s memory to be used later by Siyah kernel. You can put your phone into USB file transfer mode to transfer the Cyanogenmod ROM to your phone’s memory.

When you have the .zip file on your phone, go to the CWM app on your phone. This app was added by Siyah kernel. Select Boot Recovery to reboot your phone into Siyah kernel’s bootloader. This is where the magic will happen.

Now we are going to flash Cyanogenmod (or other ROM compatible with Siyah kernel) as the secondary ROM. This way, you keep your original ROM (stock ICS), and dual boot with Cyanogenmod ROM, allowing you to use CM and see if you like it first, before making it your primary.

In CWMR Touch (the Siyah kernel’s recovery loader) menu, select “dual-boot options”. Next, select “Install zip to 2ndROM from internal SD”, or external SD, depending on where you stored the previously downloaded Cyanogenmod zip file.

Browse to the .zip file and select it. Choose Yes to flash. It may take a while to install. CWMR Touch (Clockword mod) will display a “success” message when done. Now you have  Cyanogenmod as your second ROM!

Every time you power on your phone, the boot loader will allow you to choose which ROM you’d like to use (currently stock ICS is default, CM9 is secondary).

If you like your newly installed ROM and would like to make it your primary ROM, you can do the following. Reboot into CWMR Touch (Siyah kernel’s recovery mode), and select “Dual-boot options” again. Now select “Swap 1stROM and 2ndROM”. It will take a while to back up your primary ROM, move your secondary ROM to your phone’s primary ROM position, and restore your original primary ROM (stock ICS) to the secondary ROM position. Now your phone will automatically load the Cyanogenmod ROM when it boots, but you still have the option to load the original stock ICS ROM if you prefer at boot time..

How to update custom ROM

To update your custom ROM when a newer version is released requires that you first swap your primary and secondary ROM again (making stock ICS primary and Cyanogenmod secondary). If you kept ICS as your primary ROM from the start, this step isn’t necassary.

Next, you have to save the .zip file of the updated ROM you’d like to install to your phone’s memory and load it with Siyah kernel’s recovery bootloader, just like done previously. You will be overwriting the current Cyanogenmod version on your phone with the new version. The update will be non-wipe, so you won’t loose any of your apps or settings.

Disclaimer: This process will count towards your device’s custom binary counter, which cannot be reset, meaning your warranty will be void. There is also always the possibility that you might soft brick your phone. I accept no responsibility for what you do with your phone (duh!.).

Frequently asked questions (FAQs):

1) What is dual booting?
Dual booting is the ability to boot into two different Ice Cream Sandwich-based ROMs (like CM9 and your stock ICS ROM). You are given the opportunity to choose which ROM to boot each time your phone starts.

2) How is this done?
This is achieved by sharing the kernel and using a hidden partition in dev/block to store the 2nd ROM’s /system and the /sdcard (Internal storage) to store /data and /cache inside a hidden folder (/sdcard/.secondrom)

3) How long does it take to clone a ROM?
It should take around 7 minutes

4) How do I choose which ROM I want to load?
When you get the splash screen to choose between ROMs, touch the screen or press volume UP to enter the PRIMARY ROM, and press the Home button or volume down for the SECONDARY ROM.

5) How can I remove the Dual boot and its partitions?
Just use the “Remove 2nd ROM” option in the Dual Boot options menu.

6) If I format my /sdcard, will my second ROM go kaput?
Yep, because you’re wiping the folder that contains /data and /cache.

7) Can I dual boot a gingerbread ROM in a ICS ROM?
Nope. You can’t mix ICS-based ROMs with Gingerbread ROMs.

8) What’s the basic architecture behind dual booting?
Any rom will have /system, /data, /cache partitions and requires a kernel to boot. Primary rom has all these partitions on the same location and partitions as if you were single-booting. ie, /dev/block/mmcblk0p12 for /system and rootfs for /data and /cache. Secondary rom uses a hidden partition (/dev/block/mmcblk0p9) for /system and sdcard to store /data and /cache partitions. They’re stored in /sdcard/.secondrom directory as mountable ext4 block device images (data.img and cache.img).
Kernel partition is shared, so same kernel boots both the roms. If you switch from Siyah to a different kernel, dual booting will not be available even though there’s a clone of secondary rom. Internal sdcard, external plastic sdcard, /efs, /emmc, other kernel related virtual filesystem directories, etc are shared among roms.

9) How much time was it to clone a rom?
There’s /system, /data/ and /cache to clone. 2 GB data + 103mb cache + 513 mb system = 2.6 gb
Shell prompt read speed = 7mb per second.
Total Time = 2.6*(1024/7) = 380 secs = 6/7 minutes.

10) Will i get a prompt to dual-boot if i’m not using dual boot, as in i haven’t cloned any rom to use as secondary?

11) I don’t like waiting for 3 seconds to boot into primary ROM.
A. Touch the screen/press volume up key immediately upon prompt.

12) How to undo dual booting?
Use “Remove 2ndRom” from dual-boot options in recovery.

13) How to remove secondary rom if “Remove 2ndRom” in touch recovery fails for some reason?
Format 2nrom /system partition from dualboot options in recovery, remove data.img and cache.img under /sdcard/.secondrom directory manually by booting into primary rom. Also delete /secondrom directory.

14) So if at all i format /sdcard, my second rom is gone?

15) Can i have both aosp roms/both samsung roms/first aosp, second samsung/first samsung,second aosp?

16) Can i have one GB rom and second ICS rom?

17) Why?
Kernel partition is shared between roms. Dual boot functionality is implemented in ICS kernel. ICS kernel can run only ICS roms.

18) Can i have different kernels for the two roms?
NO. Kernel partition is shared.

19) USB mass storage works?
Yes. Both cards will be mounted for primary and secondary roms. MTP works too.

20) If i had the same /data partition shared between roms, i could use same apps on both roms.
Data partition can not be shared as they’re incompatible between roms. (Sometimes dev asks you to perform full wipe even if you’re switching between versions of the same rom right). Even if they were shared, separate dalvik caches has to be used and hence every boot will take a long time to rebuild dalvik.

21) Are init.d scripts and extweaks profiles shared across the roms so that i can make changes by booting into any rom and the other rom automatically inherits the settings?
NO. Roms have differet /system partitions so different init.d directories. Roms uses different /data partitions so different extweaks settings since extweaks profiles are stored under /data/.siyah. Configure both separately. Initramfs scripts are shared anyway because Roms use the same kernel.

22) Can i use titanium to backup and restore apps on both roms?
Yes. With the default settings of titanium backup, it uses /sdcard/TitaniumBackup directoryto backup apps. Assume you have the same app installed in both roms and you backed up the app from both roms. Then when you restore app+data, the last backup is restored. (regardless of from which rom was it backed up last. Because the app database is overwritten for each backup). If you want to maintain exclusiveness between apps in the two roms, use a different backup directory in second rom. Reason for exclusivity could be – you need different settings for same app in the roms OR you have reached level 2 of a game in rom1 and level 6 in rom2 and you need to maintain that, etc.

21) After setting up Second Rom, i don’t see a prompt to boot into second rom.
Try wiping Second Rom Cache and Dalvik.

22) What’s happening when i wipe /data and /cache of 2ndROM during the first time setup of dual boot?”
Two empty mountable EXT4 images – data.img and cache.img are created in /sdcard/.secondrom. While flashing zips to second rom, /data and /cache of second rom needs to be mounted in respective mmcblk. This empty .img files helps zip flashing without having the trouble to create them first.

23. Will flashing a rom zip to second rom (when i already have dual booting) change kernel? I may lose dual boot if so.
NO. Flashing kernel is prevented for second rom if the zip contains a kernel.

Most of this info I found on the XDA forums, specifically the  Dual Boot Guide thread, the Siyah Kernel thread, and this post by droidphile.


Single Post Navigation

9 thoughts on “How to 2nd ROM with Siyah Kernel – Dual Boot

  1. Oskar on said:


    Nice guide but i wonder i few things. I have a I9300 and i have CF-Root and CM9 installed on my device. I want to install Siyah to get NTFS support and all the other goodies. I have tried to install it as a zip file throught CWM but i dont get all the feutures then. Can i flash Siyah with Odin or will that remove my CM9 install and remove my nandroid backups?

    • To get all the features of Siyah, you need to install the free version of ExTweaks from the Play store.
      If you want to flash Siyah again via Odin be sure to download the .tar file and not the zip file

      • Oskar on said:

        Thank you for your answer but can you answer my other questions please. I have tried to install ExTweaks from play store but it just freezes at startup. What i really want to know is if it is possible for me to install Siyah over odin when i have CF-Root and CM9 already installed? Will the Siyah install remove anything like my nandroid backups?

      • Yes you can. Siyah won’t in uninstall any of your backups. You can still revert to any of your backups at a later time. I prefer flashing zip through CWM instead of using Odin

      • Oskar on said:

        Hm i installed Siyah over Odin and i have ExTweaks installed now but NTFS still does not work. I connect an NTFS formatted USB drive to the phone with my OTG cable but it just says Sd card mounted and i cannot find an NTFS folder or anything like that when i browse for it?

  2. Oskar on said:

    Ok thank you. Yea i prefer that to but like i said before it didnt work as it should. I cannot install exTweak and NTFS does not work so i guess i have to install it with Odin

  3. Pingback: Samsung S2 – Neatrom And Siyah Kernel | Silly Clone

  4. Pingback: Siyah Kernel’s Developer, Gokhanmoral, Interview | Silly Clone

  5. Pingback: Dualboot Android sur Samsung Galaxy S2 | Développeur freelance Android à Paris

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: