Post Reply

[Recovery][Mod][AOSP/SENSE]MultiROM V22 for Droid DNA(Unofficial Port)(Mar 16)

28th January 2014, 05:05 AM   |  #1  
OP Senior Member
Thanks Meter: 775
 
1,782 posts
Join Date:Joined: Jan 2013
Donate to Me
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.
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).Tested with ViperDNA 3.10 and UnSenseOne.

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-dlx.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. Look in the second post for my modified version of crpalmer's kernel that has the necesssary patch, as well as a patched stock CM11 kernel. The post will be updated accordingly for any more kernels that have the necessary patch.
You current rom will not be erased by the installation.
Download links are in the second post.
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 resulted in a failed flash for me. 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 on the DNA)
- 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 (branch master)

Modified TWRP - https://github.com/Tasssadar/Team-Win-Recovery-Project (branch master)

my kernel with kexec-hardboot patch: https://github.com/jamiethemorris/dna-kernel/tree/5.x

kexec-hardboot patch: https://gist.github.com/jamiethemorris/8662539

Donate to Tasssadar:
Quote:

I'd be glad if you could spare a few bucks. You can use either paypal or Bitcoins, my address is 172RccLB2ffSnJyYwjYbUD3Nx4QX3R8Ris

Thanks to all donors, it is much appreciated

XDA:DevDB Information
MultiROM for Droid DNA, a Tool/Utility for the HTC Droid DNA

Contributors
jamiethemorris

Version Information
Status: Stable

Created 2014-01-28
Last Updated 2014-03-16
The Following 15 Users Say Thank You to jamiethemorris For This Useful Post: [ View ]
28th January 2014, 05:05 AM   |  #2  
OP Senior Member
Thanks Meter: 775
 
1,782 posts
Join Date:Joined: Jan 2013
Donate to Me
Downloads

MultiROM Zip: http://www.androidfilehost.com/?fid=23329332407579376
Modified TWRP Recovery: http://www.androidfilehost.com/?fid=23329332407579377
My kernel w/ kexec-hardboot patch (based on crpalmer's kernel): http://forum.xda-developers.com/show....php?t=2627113
crpalmer's kernel w/ kexec-hardboot patch: http://forum.xda-developers.com/show....php?t=2559529
Stock CM11 Kernel w/ kexec-hardboot patch: http://www.androidfilehost.com/?fid=23329332407567343


Uninstaller: http://www.androidfilehost.com/?fid=23329332407579378
Mount Disabler (for Sense ROMs, see instructions below): http://www.androidfilehost.com/?fid=23329332407579371




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 16 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:
 
Quote:
Originally Posted by vroad

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).
updater-script in Team Blackout's ROM doesn't have this problem.


-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.
Last edited by jamiethemorris; 24th April 2014 at 06:47 PM.
The Following 2 Users Say Thank You to jamiethemorris For This Useful Post: [ View ]
28th January 2014, 01:12 PM   |  #3  
Senior Member
Thanks Meter: 2,465
 
1,691 posts
Join Date:Joined: Mar 2011
Donate to Me
@jamiethemorris,

If you want to submit a pull request to my kernel for the changes (and they don't look dangerous, which I don't expect them to), I'll merge them in for you.
28th January 2014, 02:51 PM   |  #4  
Senior Member
Flag NY
Thanks Meter: 183
 
616 posts
Join Date:Joined: Apr 2008
Donate to Me
More
What do you mean by don't share the kernel?

Sent from my HTC6435LVW using Tapatalk
28th January 2014, 04:38 PM   |  #5  
OP Senior Member
Thanks Meter: 775
 
1,782 posts
Join Date:Joined: Jan 2013
Donate to Me
Quote:
Originally Posted by mr4r4n

What do you mean by don't share the kernel?

Sent from my HTC6435LVW using Tapatalk

Multi ROM has an option to share the kernel of the primary ROM with any other roms. Does that make sense? So if you have my kernel installed on the primary ROM you can let another ROM installed use it instead of having to install it separately on that ROM.

Sent from my Droid DNA using Tapatalk
28th January 2014, 04:40 PM   |  #6  
OP Senior Member
Thanks Meter: 775
 
1,782 posts
Join Date:Joined: Jan 2013
Donate to Me
Quote:
Originally Posted by crpalmer

@jamiethemorris,

If you want to submit a pull request to my kernel for the changes (and they don't look dangerous, which I don't expect them to), I'll merge them in for you.

OK cool, I'll do that. BTW do you think the patch will be drastically different when we move to msm8960 (other than the file structure being different)?

Sent from my Droid DNA using Tapatalk
28th January 2014, 04:43 PM   |  #7  
Senior Member
Flag NY
Thanks Meter: 183
 
616 posts
Join Date:Joined: Apr 2008
Donate to Me
More
Quote:
Originally Posted by jamiethemorris

Multi ROM has an option to share the kernel of the primary ROM with any other roms. Does that make sense? So if you have my kernel installed on the primary ROM you can let another ROM installed use it instead of having to install it separately on that ROM.

Sent from my Droid DNA using Tapatalk

Yes it does all the stuff given to me at the hospital may have slowed down my thought process temporarily... Lol, thanks bud

Sent from my HTC6435LVW using Tapatalk
28th January 2014, 04:54 PM   |  #8  
Senior Member
Thanks Meter: 2,465
 
1,691 posts
Join Date:Joined: Mar 2011
Donate to Me
Quote:
Originally Posted by jamiethemorris

OK cool, I'll do that. BTW do you think the patch will be drastically different when we move to msm8960 (other than the file structure being different)?

Sent from my Droid DNA using Tapatalk

It will not likely be very different, but I wouldn't worry too much about the new kernel just yet as we have at least one hard problem to solve before then. After that, adapting this patch will be simple...
The Following User Says Thank You to crpalmer For This Useful Post: [ View ]
28th January 2014, 05:40 PM   |  #9  
Senior Member
Flag newport news
Thanks Meter: 287
 
633 posts
Join Date:Joined: Dec 2012
More
androids grub 2 hs come to dna now thats awesome
The Following User Says Thank You to t1gartist For This Useful Post: [ View ]
28th January 2014, 05:45 PM   |  #10  
OP Senior Member
Thanks Meter: 775
 
1,782 posts
Join Date:Joined: Jan 2013
Donate to Me
Quote:
Originally Posted by crpalmer

It will not likely be very different, but I wouldn't worry too much about the new kernel just yet as we have at least one hard problem to solve before then. After that, adapting this patch will be simple...

OK. I've been wanting to learn some coding to make this stuff easier... Where would you recommend starting? I don't really have time to take a c or c++ class right now, but some tutorials online would be helpful.

EDIT: Also, how do I do a pull request for only the kexec-hardboot commit? I don't see an option for it.

Sent from my Droid DNA using Tapatalk
Last edited by jamiethemorris; 28th January 2014 at 06:14 PM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools
Display Modes


Top Threads in Droid DNA Original Android Development by ThreadRank