Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,808,781 Members 46,114 Now Online
XDA Developers Android and Mobile Development Forum

★ ☆[Recovery][Mod][Multi-Boot] MultiROM V22 | m7vzw [Unofficial][03-16-14]☆ ★

Tip us?
 
santod040
Old
(Last edited by santod040; 17th March 2014 at 07:42 AM.)
#1  
santod040's Avatar
Recognized Developer / Recognized Contributor - OP
Thanks Meter 8,376
Posts: 6,205
Join Date: Nov 2008
Location: NorCal

 
DONATE TO ME
Default ★ ☆[Recovery][Mod][Multi-Boot] MultiROM V22 | m7vzw [Unofficial][03-16-14]☆ ★

Introduction
This is a port of Tasssadar's MultiROM.
MultiROM allows you to boot multiple ROMs on the same device (as well as, in theory, Linux distros, if there were any available for our device, or android-based operating systems such as Ubuntu Touch).
ROMs are flashed in the modified recovery, and upon booting the phone, you have a boot menu that will allow you to choose which ROM you want to boot.
You can also boot ROMs off of a USB drive connected via an OTG cable (**There are some limitations to this, keep reading for details**).

First of all, I would like to thank Tasssadar because this is 100% his work. If you enjoy MultiROM, feel free to donate to him.
I have just ported it to Kitkat for the Verizon HTC One.
MultiROM in action: http://www.youtube.com/watch?v=SCYh14Zwl3s
Warning!
It _is_ dangerous. This whole thing is basically one giant hack - none of these systems are made with multibooting in mind.
It is no longer messing with data partition or boot sector, but it is possible that something goes wrong and you will have to flash factory images again.
Make backups. Always.
Sense ROM Support
MultiROM is now able to boot Sense ROMs (as secondary only), but the process is a little more complicated.
See second post for step-by-step instructions (Big thanks to vroad for figuring this out). Still in testing on m7vzw.

Installation

Note 1: Your device must not be encrypted (hint: if you don't know what it is, then it is not encrypted).

MultiROM has 3 parts you need to install:
  • MultiROM (multirom-YYYYMMDD-vXX-UNOFFICIAL-m7vzw.zip)) - download the ZIP file from second post and flash it in recovery.
  • Modified recovery (recovery_mrom_YYYYMMDD.img) - download the IMG file from second post and use fastboot or an app such as FlashImageGUI or Flashify to flash it.
  • Patched kernel - You absolutely MUST have a kernel with the kexec-hardboot patch on the primary ROM for this to work.
    My latest Aosb and Aicp builds both have this.
    The primary and secondary roms can share a kernel if you want to install one that is not patched, but may work with the primary one.
You current rom will not be erased by the installation.
Download links are in the second post.


fastboot flash recovery recovery.img (or use Flashify from the Play Store)
flash the MultiRom zip to prep the device for multi booting
Flash an internal rom with a kexec hardboot patched kernel
For now, I recommend using two Aosp roms until Sense roms are further tested by me.
If you are feeling experimental, I will include a process for trying this now if you wish.
Using USB drive
During installation, recovery lets you select install location.
Plug in the USB drive, wait a while and press "refresh" so that it shows partitions on the USB drive.
You just select the location and proceed with the installation.

Note: In theory, FAT32, EXT4, and NTFS partitions should all be supported. However, using a FAT32 partition may result in a failed flash.
I have not tried NTFS. If you want to boot off of your USB drive, I recommend putting a dedicated EXT4 partition for booting ROMs.
Also, I was unable to boot off of a thumb drive without sharing a kernel with the primary ROM or using a patched kernel on the secondary ROM.
So if you are going to do this, any ROM you want to boot off of the USB drive ALSO needs a patched kernel.

If you wanna use other than default FAT32 partition, just format it in PC. If you don't know how/don't know where to find out how, you probably should not try installing MultiROM.
If you are installing to NTFS or FAT32 partition, recovery asks you to set image size for all the partitions - this cannot be easilly changed afterward, so choose carefully.
FAT32 is limited to maximum of 4095MB per image - it is limitation of the filesystem, I can do nothing about that.
Installation to USB drives takes a bit longer, because the flash drive is (usually) slower and it needs to create the images, so installation of Ubuntu to 4Gb image on my pretty fast USB drive takes about 20 minutes.
Enumerating USB drive can take a while in MultiROM menu, so when you press the "USB" button in MultiROM, wait a while (max. 30-45s) until it searches the USB drive. It does it by itself, no need to press something, just wait.
Updating/changing ROMs
1. Primary ROM (Internal)
  • Flash ROM's ZIP file as usual, do factory reset if needed (it won't erase secondary ROMs)
  • Go to Advanced -> MultiROM in recovery and do Inject curr. boot sector.
2. Secondary Android ROMs
If you want to change the ROM, delete it and add new one. To update ROM, follow these steps:
  • Go to Advanced -> MultiROM -> List ROMs and select the ROM you want to update.
  • Select "Flash ZIP" and flash ROM's ZIP file.
  • In some cases, you might need to flash patched kernel - get coresponding patched kernel version from second post and flash it to the secondary ROM sama way you flashed ROM's ZIP file.
Explanation of recovery menus
Main menu
- Add ROM - add ROM to boot
- List ROMs - list installed ROMs and manage them
- Inject boot.img file - When you download a kernel which is distrubuted as whole boot.img, you have to use this option on it, otherwise you would lose MultiROM. (You will likely not need to use this option with most kernel installers)
- Inject curr. boot sector - Use this option if MultiROM does not show up on boot, for example after kernel installation.
- Settings - well, settings.

Manage ROM
- Rename, delete - I believe these are obvious
- Flash ZIP (only Android ROMs) - flash ZIP to the ROM, for example gapps
- Add/replace boot.img - replaces boot.img used by this ROM, this is more like developer option.
Source code
MultiRom - https://github.com/Tasssadar/multirom
Modified TWRP - https://github.com/Tasssadar/Team-Win-Recovery-Project (branch master)
kexec-hardboot patch - https://gist.github.com/Tasssadar/6733940





XDA:DevDB Information
Multi-Rom | m7vzw | Multi-Boot | Recovery, a Tool/Utility for the Verizon HTC One

Contributors
santod040

Version Information
Status: Testing
Current Beta Version: v22
Beta Release Date: 2014-03-16

Created 2014-03-17
Last Updated 2014-03-17
Current Devices: HTC Thunderbolt | HTC Droid DNA | HTC One - m7 | HTC One - m8


Follow me on Twitter
ULTIMATE WALLS WVGA Wallpaper Collection
Donations always appreciated! Never required!


The Following 5 Users Say Thank You to santod040 For This Useful Post: [ Click to Expand ]
 
santod040
Old
(Last edited by santod040; 17th March 2014 at 07:33 PM.)
#2  
santod040's Avatar
Recognized Developer / Recognized Contributor - OP
Thanks Meter 8,376
Posts: 6,205
Join Date: Nov 2008
Location: NorCal

 
DONATE TO ME
Default Reserved

Downloads

Modified MultiRom TWRP Recovery: DOWNLOAD
MultiROM m7vzw Zip: DOWNLOAD
My Aosp Kernel w/ kexec-hardboot patch: DOWNLOAD


Uninstaller: DOWNLOAD
Mount Disabler: DOWNLOAD (for Sense ROMs, see instructions below):

You don't need to flash mount-disabler onto primary ROMs.
You only have to flash mount-disabler onto Sense-based SECONDARY ROMs.
If you forget to flash it, Sense ROM's init will attempt to mount primary ROM's system/cache.

If something goes wrong and ROM doesn't boot, enter TWRP recovery and adb pull /proc/last_kmsg, which says why it didn't work.


FAQ and other notes
About security
In order to make multi-booting possible, MultiROM has to sacrifice some security measures.
Firstly, on secondary Android ROMs, /system is not mounted read-only.
While there are other things preventing malicious software from messing with /system, this might potentialy make it easier for such software to attack that system.
Next, MultiROM doesn't work with /data encryption. Not many people who use custom ROMs also use encryption anyway, so that isn't much of a concern.
What do the ROMs share?
All ROMs are separate, except /sdcard, which is shared between all Android ROMs.
How many ROMs can I have?/Where are the ROMs stored?
You can have as many ROMs as you can fit in your /sdcard (good thing HTC gave us a WHOPPING 32 gigs). All the ROMs are stored in /sdcard/multirom/roms or on an USB drive. This folder is unaccessible in Android, to prevent mediascanner from scanning it. You can either in recovery, or obtain root and go to /data/media/0/multirom/roms.
Can I have different versions of Android working alongside
Yes. As long as you select "Don't share kernel" when installing the secondary ROM, the systems are separated.
My secondary ROM doesn't boot if I share the kernel with the primary ROM.
Reinstall the secondary ROM, don't share the kernel this time, and flash the kernel you want to use to that ROM.
How to use Sense with MultiROM

Using Sense with MultiROM is complicated for a few reasons:
-The MultiROM boot menu doesn't show up with Sense ROMs for some unknown reason.
-Most Sense ROMs can't be flashed via the MultiROM menu because they mount partitions by explicitly using the mmc block. This causes the ROM to be partially install over the primary ROM. vroad has a pretty good explanation of why this happens:
 

Some users have already reported that ROMs with certain kind of updater-script will format system/data/cache of primary ROM slot, and overwrite to them, even though they have tried to flash onto secondary slot.
This is because these updater-script mount partitions with the name of block device(such as /dev/block/mmcblk0p34), not with mount points(such as /system).


-Sense ROMs also try to mount /system and /cache on boot, so the mount disabler zip is required for the ROM to boot properly.
To boot a secondary Sense ROM:
1. If you have an AOSP ROM already installed as your primary ROM, first go to Advanced > MultiROM > Swap ROMs and choose "move primary ROM to secondaries."
2. Install your Sense ROM as a primary ROM, just as you would with standard TWRP.
3. Go back to the Swap ROMs menu:
-If you had a previously installed AOSP ROM, choose "swap primary (Internal) ROM with secondary" and choose the AOSP ROM that you want to move to primary.
-Otherwise, choose "move primary ROM to secondaries"
4. Flash the Mount Disabler Zip to your secondary Sense ROM.
5. Insure that the primary AOSP ROM has a kernel with kexec-hardboot support as well as the MultiROM zip installed.

To update the secondary Sense ROM
1. Go to Advanced > MultiROM > Swap ROMs and choose " swap primary (Internal) ROM with secondary" and choose the Sense ROM you want to update.
2. Flash the ROM update to the primary ROM slot (just as you would with standard TWRP)
3. Go back to the Swap ROMs menu, and choose "swap primary (Internal) ROM with secondary" and choose the AOSP ROM that you want to move to primary.
4. Flash the Mount Disabler zip to your secondary Sense ROM.

If you do not follow these instructions properly, you will end up with a corrupted, half-Sense half-AOSP primary ROM and a secondary ROM that doesn't boot.

Kitk-Kat only. JB Sense ROMs most likely will not work.
Current Devices: HTC Thunderbolt | HTC Droid DNA | HTC One - m7 | HTC One - m8


Follow me on Twitter
ULTIMATE WALLS WVGA Wallpaper Collection
Donations always appreciated! Never required!


The Following 6 Users Say Thank You to santod040 For This Useful Post: [ Click to Expand ]
 
santod040
Old
#3  
santod040's Avatar
Recognized Developer / Recognized Contributor - OP
Thanks Meter 8,376
Posts: 6,205
Join Date: Nov 2008
Location: NorCal

 
DONATE TO ME
Default Reserved

The Following 2 Users Say Thank You to santod040 For This Useful Post: [ Click to Expand ]
 
santod040
Old
#4  
santod040's Avatar
Recognized Developer / Recognized Contributor - OP
Thanks Meter 8,376
Posts: 6,205
Join Date: Nov 2008
Location: NorCal

 
DONATE TO ME
and one more....
Current Devices: HTC Thunderbolt | HTC Droid DNA | HTC One - m7 | HTC One - m8


Follow me on Twitter
ULTIMATE WALLS WVGA Wallpaper Collection
Donations always appreciated! Never required!


The Following 2 Users Say Thank You to santod040 For This Useful Post: [ Click to Expand ]
 
MoonBlade
Old
#5  
MoonBlade's Avatar
Senior Member
Thanks Meter 509
Posts: 881
Join Date: May 2012
Location: Mumbai
Great work !! Was waiting for this for a long time...
 
 
kc6wke
Old
#6  
kc6wke's Avatar
Senior Member
Thanks Meter 356
Posts: 534
Join Date: Feb 2012
Location: So, Cal

 
DONATE TO ME
Default mount disabler zip

Where do we find mount disabler zip, don't see a link to dl
 
santod040
Old
#7  
santod040's Avatar
Recognized Developer / Recognized Contributor - OP
Thanks Meter 8,376
Posts: 6,205
Join Date: Nov 2008
Location: NorCal

 
DONATE TO ME
Quote:
Originally Posted by kc6wke View Post
Where do we find mount disabler zip, don't see a link to dl
Added to second post.
Just know that multi booting sense roms is still in testing, so results may vary.
Current Devices: HTC Thunderbolt | HTC Droid DNA | HTC One - m7 | HTC One - m8


Follow me on Twitter
ULTIMATE WALLS WVGA Wallpaper Collection
Donations always appreciated! Never required!


 
jodaschmo
Old
#8  
Member
Thanks Meter 0
Posts: 52
Join Date: Sep 2010
So, If I am on rooted stock, can I install MultiRom and keep my stock as internal? Or do I have to use AOSP as internal and flash a new kernel? I'm assuming if stock was a necessity I would uninstall MultiRom, reinstall TWRP, then flash stock back.
 
santod040
Old
#9  
santod040's Avatar
Recognized Developer / Recognized Contributor - OP
Thanks Meter 8,376
Posts: 6,205
Join Date: Nov 2008
Location: NorCal

 
DONATE TO ME
Quote:
Originally Posted by jodaschmo View Post
So, If I am on rooted stock, can I install MultiRom and keep my stock as internal? Or do I have to use AOSP as internal and flash a new kernel? I'm assuming if stock was a necessity I would uninstall MultiRom, reinstall TWRP, then flash stock back.
The internal rom must have a kernel with a Kexec hardboot patch.
The stock kernel does not have this.
Current Devices: HTC Thunderbolt | HTC Droid DNA | HTC One - m7 | HTC One - m8


Follow me on Twitter
ULTIMATE WALLS WVGA Wallpaper Collection
Donations always appreciated! Never required!


 
jodaschmo
Old
#10  
Member
Thanks Meter 0
Posts: 52
Join Date: Sep 2010
Could I, given I have a backup on my computer, so I can still revert, Flash your kexec kernel over Stock,or do I have to go pure AOSP? Trying not to sound too ignorant...

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes