[MOD][2014-01-19][Pre-Alpha Test] Use multiple ROMs: MultiROM Xperia M

Search This thread

alvinhochun

Senior Member
Oct 3, 2010
175
202
Disclaimer
I (alvinhochun) am NOT responsible for events including but not limited to bricking any electronic or non-electronic devices, losing data, fever, heart attack, thermonuclear war, or the cooling down of the Sun, either caused by or not caused by downloading or installing this mod.

You are expected to back up all your data by your own means before installing this mod.

You should always only follow tested instructions and install only tested ROMs with a tested setup, or else you should have extended knowledge in the inner workings of Android, Linux and MultiROM Xperia.​

Notice
This is an unofficial port of MultiROM.

Before anything else, I would like to say thanks to @Tasssadar who developed the original MultiROM (thread for Nexus 7). Without him, this mod wouldn't be here.

Unless otherwise specified, anything that is designed for just "MultiROM" (without "Xperia" after it) will not work for this because there are some operational differences between "MultiROM" (original) and "MultiROM Xperia" (this mod).​

Introduction
Perhaps you want to try the new CyanogenMod 11 ROM, but don't want to erase your phone to flash it because you need to keep your stock ROM and all your data, and don't want to bother backing up and restoring every single time? Don't worry! MultiROM Xperia can help you.

MultiROM Xperia is a mod which lets you install alternative Android ROMs to your internal memory, microSD cards or USB storage connected via OTG and boot them. Together with a kernel with kexec-hardboot patch, you can even boot ROMs with kernels different from the one you've installed!

The idea is that you can install ROMs to external storage spaces via a modified TWRP recovery, but it is not ready yet.

This mod is mostly ready for testing, but since the installer is not ready yet, I've uploaded the boot image (to be flashed with `fastboot flash boot`) and the files of unofficial CM11 Beta 1 (Thanks to @PecanCM) to be placed on the microSD card or USB device in the form of a zip archive. At the time being, they can only be used when you have stock 15.1.C.2.8 firmware (Android 4.1.2) installed.

Warning
This mod is basically one giant hack. Neither the ROMs nor the device itself is designed with multiboot in mind so there is no absolute guarantee that it will work properly. Technically, installing it only modifies the boot partition (sometimes casually called the kernel) which is the same thing that custom kernel is installed to, and in the worse case you only need to (re-)flash a stock or custom kernel or flash an ftf to remove MultiROM Xperia, but the MultiROM booting mechanism is hacky and is not guaranteed to always work.

Always make backup, frequently, like you should do even if not using MultiROM Xperia.​

Features
  • Boot any number of alternative Android ROMs installed onto microSD cards and USB storage
  • Support alternative "internal storages": For every ROMs (including internal ROM), you can have multiple separated "profiles", which is represented by an entire "emulated" /data partition. Technically, the profiles can also support encryption.

Installation
This instruction is reviewed on 2014-01-09.

Prerequisite: You need to unlock your bootloader and be on stock 15.1.C.2.8 firmware (Android 4.1.2),

  1. Download multirom-boot-********-c1905-test.img and multirom-cm11beta1-********-c1905-test.zip.
  2. Use fastboot to flash the boot image:
    Code:
    fastboot flash boot multirom-boot-********-c1905-test.img
  3. Extract multirom-cm11beta1-********-c1905-test.zip directly to the root of a microSD Card or USB flash drive.
    Currently, these filesystem formats are supported: vfat (FAT16/FAT32), ext2, ext3, ext4.
******** represents the date of the release.​

Usage
To boot a ROM (including internal stock ROM), insert the microSD card or connect the USB flash drive and switch on the phone, then select the corresponding ROM and press "boot". (Note, the first boot of an external ROM may take very long depending on the speed of the storage device.)

To enter CWM recovery, switch on the phone, select "Misc" tab and press "Recovery". Alternatively, you can execute `adb reboot recovery`. The included CWM recovery is the same as the one in unofficial CM11 Alpha 2 (Thanks to @PecanCM).
Note: Do NOT attempt to use any existing recovery to flash any ROMs unless you don't want to keep MultiROM Xperia and your existing data!
[/LIST]​

Downloads

Screenshots

Source code
MultiROM Xperia:
https://github.com/alvinhochun/multirom-nicki
Device tree (used to build MultiROM Xperia):
https://github.com/alvinhochun/cyanogenmod_device_sony_nicki/tree/multirom
Kexec-hardboot patch:
See http://xdaforums.com/showthread.php?t=2568151
Stock kernel with kexec-hardboot patch:
https://github.com/alvinhochun/sony-xperia-m-kernel
CM11 kernel:
See original unofficial CM11 Beta 1 thread​

XDA:DevDB Information
MultiROM Xperia M, Tool/Utility for the Sony Xperia M

Contributors
alvinhochun, Tasssadar

Version Information
Status: Testing

Created 2014-01-06
Last Updated 2014-11-04
 

Attachments

  • multirom-1.png
    multirom-1.png
    2.4 KB · Views: 7,313
  • multirom-2.png
    multirom-2.png
    3 KB · Views: 7,146
  • multirom-3.png
    multirom-3.png
    2.8 KB · Views: 7,166

alvinhochun

Senior Member
Oct 3, 2010
175
202
Changelog and technical information

Changelog
2014-01-08
  • Added option to update/rescan for ROMs

2014-01-07
  • First public test release

Technical information
It works by extracting the boot ramdisk to root and patching init.rc files after boot selection.
More to be added​

Changes from the original MultiROM
This port is based on the original MultiROM by @Tasssadar, which is available for multiple devices including the Nexus 4, 5 and 7. However, since his original port did not account for supporting external SD cards, and also didn't handle most Xperia devices without a recovery partition, I've rewritten some part of his original MultiROM to handle these things.

Differences include:
  • All binaries are placed in the ramdisk altogether instead of the internal storage.
  • MultiROM Xperia does not mount the partitions before starting the real Android init. Instead, it generates a script and patches some files (including init.rc) to trick the target system to mount filesystem images (loop mounting loop devices).
  • One ROM can contain multiple user profiles (i.e. data, cache and persist).
  • The code to boot generic (non-Android) Linux ROMs is removed due to heavy rewrite of parts from the original MultiROM.
  • It currently only support using partition filesystem images, neither symlink nor bind mount is supported.
 
Last edited:

alvinhochun

Senior Member
Oct 3, 2010
175
202
Till now I've discovered a few bugs in this test release:

  1. Sometimes, microSD card is not detected because the initialization is too long.
    This varies between cards. A theory is that SDHC might take a longer time to initialize, which happens after MultiROM has scanned for partitions.
    You can try rebooting a few times and if, by any chance, the card initialized right in time, you will be able to boot the external ROM.
    I have a few possible solutions for this, and I will update to you when I've implemented a working solution.
  2. USB OTG storage devices may not be detected properly. Needs investigation...

Thanks to @ansebovi for testing and informing about these.
 
  • Like
Reactions: ansebovi

GedeWK

Senior Member
Oct 18, 2012
59
12
i followed all the instructions, flashing the boot.img (i renamed the boot file to multirom.img) and move the files to my sdcard, why when i reboot, its just rebooting normally (no rom select screen) ?

EDIT: Rebooted again and it worked.
EDIT AGAIN: Is there any way to flash gapps? or just flash normally with cwm?
 
Last edited:
  • Like
Reactions: ansebovi

GedeWK

Senior Member
Oct 18, 2012
59
12
i followed all the instructions, flashing the boot.img (i renamed the boot file to multirom.img) and move the files to my sdcard, why when i reboot, its just rebooting normally (no rom select screen) ?

EDIT: Rebooted again and it worked.
EDIT AGAIN: Is there any way to flash gapps? or just flash normally with cwm?

Well, how to install gapps to the ROM? I need the play store :(
 

daruto80

Member
Nov 26, 2013
17
1
to do the tutorial I have to have the bootloader unlock?

Disclaimer
I (alvinhochun) am NOT responsible for events including but not limited to bricking any electronic or non-electronic devices, losing data, fever, heart attack, thermonuclear war, or the cooling down of the Sun, either caused by or not caused by downloading or installing this mod.

You are expected to back up all your data by your own means before installing this mod.

You should always only follow tested instructions and install only tested ROMs with a tested setup, or else you should have extended knowledge in the inner workings of Android, Linux and MultiROM Xperia.​

Notice
This is an unofficial port of MultiROM.

Before anything else, I would like to say thanks to @Tasssadar who developed the original MultiROM (thread for Nexus 7). Without him, this mod wouldn't be here.

Unless otherwise specified, anything that is designed for just "MultiROM" (without "Xperia" after it) will not work for this because there are some operational differences between "MultiROM" (original) and "MultiROM Xperia" (this mod).​

Introduction
Perhaps you want to try the new CyanogenMod 11 ROM, but don't want to erase your phone to flash it because you need to keep your stock ROM and all your data, and don't want to bother backing up and restoring every single time? Don't worry! MultiROM Xperia can help you.

MultiROM Xperia is a mod which lets you install alternative Android ROMs to your internal memory, microSD cards or USB storage connected via OTG and boot them. Together with a kernel with kexec-hardboot patch, you can even boot ROMs with kernels different from the one you've installed!

The idea is that you can install ROMs to external storage spaces via a modified TWRP recovery, but it is not ready yet.

This mod is mostly ready for testing, but since the installer is not ready yet, I've uploaded the boot image (to be flashed with `fastboot flash boot`) and the files of unofficial CM11 Alpha 2 (Thanks to @PecanCM) to be placed on the microSD card or USB device in the form of a zip archive. At the time being, they can only be used when you have stock 15.1.C.2.8 firmware (Android 4.1.2) installed.

Warning
This mod is basically one giant hack. Neither the ROMs nor the device itself is designed with multiboot in mind so there is no absolute guarantee that it will work properly. Technically, installing it only modifies the boot partition (sometimes casually called the kernel) which is the same thing that custom kernel is installed to, and in the worse case you only need to (re-)flash a stock or custom kernel or flash an ftf to remove MultiROM Xperia, but the MultiROM booting mechanism is hacky and is not guaranteed to always work.

Always make backup, frequently, like you should do even if not using MultiROM Xperia.​

Features
  • Boot any number of alternative Android ROMs installed onto microSD cards and USB storage
  • Support alternative "internal storages": For every ROMs (including internal ROM), you can have multiple separated "profiles", which is represented by an entire "emulated" /data partition. Technically, the profiles can also support encryption.

Installation
This instruction is reviewed on 2014-01-09.

Prerequisite: You need to unlock your bootloader and be on stock 15.1.C.2.8 firmware (Android 4.1.2),

  1. Download multirom-boot-********-c1905-test.img and multirom-cm11alpha2-********-c1905-test.zip.
  2. Use fastboot to flash the boot image:
    Code:
    fastboot flash boot multirom-boot-********-c1905-test.img
  3. Extract multirom-cm11alpha2-********-c1905-test.zip directly to the root of a microSD Card or USB flash drive.
    Currently, these filesystem formats are supported: vfat (FAT16/FAT32), ext2, ext3, ext4.
******** represents the date of the release.​

Usage
To boot a ROM (including internal stock ROM), insert the microSD card or connect the USB flash drive and switch on the phone, then select the corresponding ROM and press "boot". (Note, the first boot of an external ROM may take very long depending on the speed of the storage device.)

To enter CWM recovery, switch on the phone, select "Misc" tab and press "Recovery". Alternatively, you can execute `adb reboot recovery`. The included CWM recovery is the same as the one in unofficial CM11 Alpha 2 (Thanks to @PecanCM).
Note: Do NOT attempt to use any existing recovery to flash any ROMs unless you don't want to keep MultiROM Xperia and your existing data!
[/LIST]​

Downloads

Screenshots

Source code

XDA:DevDB Information
MultiROM Xperia M, a Tool/Utility for the Sony Xperia M

Contributors
alvinhochun, Tasssadar

Version Information
Status: Testing

Created 2014-01-06
Last Updated 2014-01-09
to do the tutorial I have to have the bootloader unlock?...because i have the bootloader locked and i like to introduce in cwm.
 
  • Like
Reactions: Dims_Camper

elias234

Senior Member
Dec 3, 2011
417
71
since it is called multirom xperia , can't it be ported to xperia z ? and other xperias , or it is made exclusively for xperia m ?
 

alvinhochun

Senior Member
Oct 3, 2010
175
202
since it is called multirom xperia , can't it be ported to xperia z ? and other xperias , or it is made exclusively for xperia m ?

It's only for Xperia M at the moment since it is not completed yet.
If anyone feels like porting it to other devices I will surely appreciate, but for me I will wait till most of it is ready before porting to other devices.
 

alvinhochun

Senior Member
Oct 3, 2010
175
202
Uploaded test package with unofficial CM11 Beta 1. Just extract it to SD card, just like the previous test release.

Although I don't expect daily usage on a pre-alpha test release, if you want to keep your data in CM11 Alpha 1, copy the `default` directory from cm11-alpha2 and replace the one in cm11-beta1.

Just a little update, I am coding as I type this, but you cannot expect the alpha release of MultiROM Xperia to be here in a short time 'cause there is a lot to do. You can still try the test packages at the moment.
 

elmkzgirxp

Senior Member
May 16, 2013
724
236
Is the testing still in process? Because I can't wait to try this out. I hope it would be done sooner...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    Disclaimer
    I (alvinhochun) am NOT responsible for events including but not limited to bricking any electronic or non-electronic devices, losing data, fever, heart attack, thermonuclear war, or the cooling down of the Sun, either caused by or not caused by downloading or installing this mod.

    You are expected to back up all your data by your own means before installing this mod.

    You should always only follow tested instructions and install only tested ROMs with a tested setup, or else you should have extended knowledge in the inner workings of Android, Linux and MultiROM Xperia.​

    Notice
    This is an unofficial port of MultiROM.

    Before anything else, I would like to say thanks to @Tasssadar who developed the original MultiROM (thread for Nexus 7). Without him, this mod wouldn't be here.

    Unless otherwise specified, anything that is designed for just "MultiROM" (without "Xperia" after it) will not work for this because there are some operational differences between "MultiROM" (original) and "MultiROM Xperia" (this mod).​

    Introduction
    Perhaps you want to try the new CyanogenMod 11 ROM, but don't want to erase your phone to flash it because you need to keep your stock ROM and all your data, and don't want to bother backing up and restoring every single time? Don't worry! MultiROM Xperia can help you.

    MultiROM Xperia is a mod which lets you install alternative Android ROMs to your internal memory, microSD cards or USB storage connected via OTG and boot them. Together with a kernel with kexec-hardboot patch, you can even boot ROMs with kernels different from the one you've installed!

    The idea is that you can install ROMs to external storage spaces via a modified TWRP recovery, but it is not ready yet.

    This mod is mostly ready for testing, but since the installer is not ready yet, I've uploaded the boot image (to be flashed with `fastboot flash boot`) and the files of unofficial CM11 Beta 1 (Thanks to @PecanCM) to be placed on the microSD card or USB device in the form of a zip archive. At the time being, they can only be used when you have stock 15.1.C.2.8 firmware (Android 4.1.2) installed.

    Warning
    This mod is basically one giant hack. Neither the ROMs nor the device itself is designed with multiboot in mind so there is no absolute guarantee that it will work properly. Technically, installing it only modifies the boot partition (sometimes casually called the kernel) which is the same thing that custom kernel is installed to, and in the worse case you only need to (re-)flash a stock or custom kernel or flash an ftf to remove MultiROM Xperia, but the MultiROM booting mechanism is hacky and is not guaranteed to always work.

    Always make backup, frequently, like you should do even if not using MultiROM Xperia.​

    Features
    • Boot any number of alternative Android ROMs installed onto microSD cards and USB storage
    • Support alternative "internal storages": For every ROMs (including internal ROM), you can have multiple separated "profiles", which is represented by an entire "emulated" /data partition. Technically, the profiles can also support encryption.

    Installation
    This instruction is reviewed on 2014-01-09.

    Prerequisite: You need to unlock your bootloader and be on stock 15.1.C.2.8 firmware (Android 4.1.2),

    1. Download multirom-boot-********-c1905-test.img and multirom-cm11beta1-********-c1905-test.zip.
    2. Use fastboot to flash the boot image:
      Code:
      fastboot flash boot multirom-boot-********-c1905-test.img
    3. Extract multirom-cm11beta1-********-c1905-test.zip directly to the root of a microSD Card or USB flash drive.
      Currently, these filesystem formats are supported: vfat (FAT16/FAT32), ext2, ext3, ext4.
    ******** represents the date of the release.​

    Usage
    To boot a ROM (including internal stock ROM), insert the microSD card or connect the USB flash drive and switch on the phone, then select the corresponding ROM and press "boot". (Note, the first boot of an external ROM may take very long depending on the speed of the storage device.)

    To enter CWM recovery, switch on the phone, select "Misc" tab and press "Recovery". Alternatively, you can execute `adb reboot recovery`. The included CWM recovery is the same as the one in unofficial CM11 Alpha 2 (Thanks to @PecanCM).
    Note: Do NOT attempt to use any existing recovery to flash any ROMs unless you don't want to keep MultiROM Xperia and your existing data!
    [/LIST]​

    Downloads

    Screenshots

    Source code
    MultiROM Xperia:
    https://github.com/alvinhochun/multirom-nicki
    Device tree (used to build MultiROM Xperia):
    https://github.com/alvinhochun/cyanogenmod_device_sony_nicki/tree/multirom
    Kexec-hardboot patch:
    See http://xdaforums.com/showthread.php?t=2568151
    Stock kernel with kexec-hardboot patch:
    https://github.com/alvinhochun/sony-xperia-m-kernel
    CM11 kernel:
    See original unofficial CM11 Beta 1 thread​

    XDA:DevDB Information
    MultiROM Xperia M, Tool/Utility for the Sony Xperia M

    Contributors
    alvinhochun, Tasssadar

    Version Information
    Status: Testing

    Created 2014-01-06
    Last Updated 2014-11-04
    12
    Changelog and technical information

    Changelog
    2014-01-08
    • Added option to update/rescan for ROMs

    2014-01-07
    • First public test release

    Technical information
    It works by extracting the boot ramdisk to root and patching init.rc files after boot selection.
    More to be added​

    Changes from the original MultiROM
    This port is based on the original MultiROM by @Tasssadar, which is available for multiple devices including the Nexus 4, 5 and 7. However, since his original port did not account for supporting external SD cards, and also didn't handle most Xperia devices without a recovery partition, I've rewritten some part of his original MultiROM to handle these things.

    Differences include:
    • All binaries are placed in the ramdisk altogether instead of the internal storage.
    • MultiROM Xperia does not mount the partitions before starting the real Android init. Instead, it generates a script and patches some files (including init.rc) to trick the target system to mount filesystem images (loop mounting loop devices).
    • One ROM can contain multiple user profiles (i.e. data, cache and persist).
    • The code to boot generic (non-Android) Linux ROMs is removed due to heavy rewrite of parts from the original MultiROM.
    • It currently only support using partition filesystem images, neither symlink nor bind mount is supported.
    5
    Uploaded test package with unofficial CM11 Beta 1. Just extract it to SD card, just like the previous test release.

    Although I don't expect daily usage on a pre-alpha test release, if you want to keep your data in CM11 Alpha 1, copy the `default` directory from cm11-alpha2 and replace the one in cm11-beta1.

    Just a little update, I am coding as I type this, but you cannot expect the alpha release of MultiROM Xperia to be here in a short time 'cause there is a lot to do. You can still try the test packages at the moment.
    5
    I've added an option in the "Misc" tab to rescan for ROMs as a temporary measure. Flash the new boot image to get it. Please refer to the first post for download.

    Sent from my Sony Xperia M (C1905)
    4
    @itsnie
    I am back and hopefully have fixed the errors, This time there were lesser problems

    Try and report whenever free

    You have to flash boot.img and state whether the device boots or not

    Edit : Only for stock 4.3!