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

Search This thread

24ky

Senior Member
Aug 25, 2012
1,609
1,202
Amsterdam
Google Pixel 4 XL
On First boot:

* multirom installer zip(or modified TWRP) rename original init to main_init, copy trampoline, and reaname it to init
* trampoline, which was renamed to "init", try to find partitions from fstab. If mrom.fstab exists, find from it instead.
* If trampoline fails to find partitions from fstab, it just continues boot normally by running main_init. (This is why boot menu didn't show up on sense kitkat ROM)
* trampoline calls multirom. If Internal is selected, it just give controll to main_init. If secondary ROM is selected, load another kernel and try to boot from secondary ROM.

On Second boot:

* Multirom knows that this is second boot, so skip boot menu.
* Find partitions from fstab again, and mount rom's dirs as system/cache.
* To prevent main_init from mounting system/cache, multirom comments out lines of fstab telling where these partitions are. (This trick doesn't work with sense ROMs, as it doesn't read where system/cache partitions are from fstab. On sense ROMs you need to comment out lines of init.target.rc mounting system/cache.)

I have made modified zips to solve these problems easily:
multirom-20140125-v21-UNOFFICIAL-dlx_mods.zip
This zip will install multirom and inject current boot image. I just enabled use_mrom_fstab to make this work with sense ROMs.

mount-disabler-dlx-20140223.zip
This zip will install multirom trampoline to boot image, and disable mount of system/cache which is done by init.target.rc. Only secondary sense ROMs need this to be flashed.

I think these zips will, work on dlx, but please make backups as always and use at your own risk.

So what if I want sense as my main Rom and cm11 as my 2nd? How would I do that ?

Sent from my HTC6435LVW using Tapatalk
 

jamiethemorris

Senior Member
Jan 7, 2013
1,851
803
So what if I want sense as my main Rom and cm11 as my 2nd? How would I do that ?

Sent from my HTC6435LVW using Tapatalk

I haven't verified that vroad's fix works yet (although it should), but assuming it does you would need to have sense as the secondary ROM. You can however set the default boot device in multirom to a secondary ROM if you want.

Sent from my Droid DNA using Tapatalk
 

jamiethemorris

Senior Member
Jan 7, 2013
1,851
803
@vroad unfortunately I can't get this to work. Sense ROMs will boot as a primary ROM, but it doesn't show the boot menu of course. If I try to use AOSP as my primary ROM, and sense as my secondary ROM, it will sort of "mix" the 2 ROMs together and corrupt everything, leaving 2 unbootable ROMs. I have tried flashing the disabler zip on the main ROM both before and flashing the secondary Sense ROM, and I've also tried flashing it on the secondary ROM... I also tried using Sense as the primary and AOSP as the secondary, which was able to boot the Sense ROM, then the AOSP ROM, but after that only the AOSP ROM would boot.

Any ideas?
 

vroad

Senior Member
Dec 22, 2013
53
20
@vroad unfortunately I can't get this to work. Sense ROMs will boot as a primary ROM, but it doesn't show the boot menu of course. If I try to use AOSP as my primary ROM, and sense as my secondary ROM, it will sort of "mix" the 2 ROMs together and corrupt everything, leaving 2 unbootable ROMs. I have tried flashing the disabler zip on the main ROM both before and flashing the secondary Sense ROM, and I've also tried flashing it on the secondary ROM... I also tried using Sense as the primary and AOSP as the secondary, which was able to boot the Sense ROM, then the AOSP ROM, but after that only the AOSP ROM would boot.

Any ideas?

Sense ROMs should work, at least as a secondary ROM...

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.
If you are unsure, install ROM to primary slot first, then move to secondary slot.

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.

I have only confirmed my fixes with KitKat Sense5.5 ROMs. It didn't work with any JB Sense ROMs. On JB ROMs, for some reason multirom exists with error code 11 and doesn't mount anything.
 
Last edited:

jamiethemorris

Senior Member
Jan 7, 2013
1,851
803
Sense ROMs should work, at least as a secondary ROM...

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.
If you are unsure, install ROM to primary slot first, then move to secondary slot.

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 ROMs doesn't boot, enter TWRP recovery and adb pull /proc/last_kmsg, which says why it didn't work.

I have only confirmed my fixes with KitKat Sense5.5 ROMs. It didn't work with any JB Sense ROMs. On JB ROMs, for some reason multirom exists with error code 11 and doesn't mount anything.

Okay, that makes sense. I'll bet it was exactly that updater script problem. Maybe I can make something to automatically check the updater script for block mounting and fix it. Or even have multirom do it since it modifies every sense zip anyway.

Somehow I keep forgetting that I can get last_kmsg's in recovery.

Sent from my Droid DNA using Tapatalk
 

jamiethemorris

Senior Member
Jan 7, 2013
1,851
803
OP updated with support and instructions for Sense, please read thoroughly. The new modified recovery is based on the latest TWRP.
 

Bakumatsu

Senior Member
Nov 9, 2011
145
185
Kyiv
[ROM][4.4.x][UNOFFICIAL][MULTIWINDOW]AOSB KK v1.3.2 [Mar 16] + (3.7.14) Team Venom Presents ViperDNA v3.1.0

Works like a charm !

[ROM][4.4.x][UNOFFICIAL][MULTIWINDOW]AOSB KK v1.3.2 [Mar 16] + JB 4.2.2 Sense Based MIUI

AOSB - OK , MIUI - stuck on boot (as expected).

Thank you for the great mod !

P.S. Viper was restored from backup, but all settings was reset to default (as expected too).
 
  • Like
Reactions: jamiethemorris

jamiethemorris

Senior Member
Jan 7, 2013
1,851
803
[ROM][4.4.x][UNOFFICIAL][MULTIWINDOW]AOSB KK v1.3.2 [Mar 16] + (3.7.14) Team Venom Presents ViperDNA v3.1.0

Works like a charm !

[ROM][4.4.x][UNOFFICIAL][MULTIWINDOW]AOSB KK v1.3.2 [Mar 16] + JB 4.2.2 Sense Based MIUI

AOSB - OK , MIUI - stuck on boot (as expected).

Thank you for the great mod !

P.S. Viper was restored from backup, but all settings was reset to default (as expected too).

I forgot to mention that restoring from a backup works as well.

Sent from my Droid DNA using Tapatalk
 
Last edited:

Bakumatsu

Senior Member
Nov 9, 2011
145
185
Kyiv
By the way. You need at least a few GB of free space to install CM+Sense(from backup).
First time i got "not enough space" message, after trying to swap ROMs.
 

jamiethemorris

Senior Member
Jan 7, 2013
1,851
803
By the way. You need at least a few GB of free space to install CM+Sense(from backup).
First time i got "not enough space" message, after trying to swap ROMs.

Yeah, clearing dalvik and cache helps a lot with this... I definitely had to delete some stuff though. I have a lot of apps.

Sent from my Droid DNA using Tapatalk
 

jamiethemorris

Senior Member
Jan 7, 2013
1,851
803
So with the latest update we can boot 2 sense roms?

You can if you follow the process in the op and use them as secondary ROMs. You would just have to use an aosp ROM as primary which should only take up a few hundred mb without gapps. I'm working on getting sense ROMs working as primary, the problem is that the multirom boot many doesn't show up.

Sent from my Droid DNA using Tapatalk
 

24ky

Senior Member
Aug 25, 2012
1,609
1,202
Amsterdam
Google Pixel 4 XL
You can if you follow the process in the op and use them as secondary ROMs. You would just have to use an aosp ROM as primary which should only take up a few hundred mb without gapps. I'm working on getting sense ROMs working as primary, the problem is that the multirom boot many doesn't show up.

Sent from my Droid DNA using Tapatalk

Thanks for all the work, have Dual boot now. cant wait for primary sense
 

vroad

Senior Member
Dec 22, 2013
53
20
You can if you follow the process in the op and use them as secondary ROMs. You would just have to use an aosp ROM as primary which should only take up a few hundred mb without gapps. I'm working on getting sense ROMs working as primary, the problem is that the multirom boot many doesn't show up.

Sent from my Droid DNA using Tapatalk

On Sense-based primary ROMs, MultiROM menu showed up when I put mrom.fstab in ramdisk, but didn't boot as primary because of kernel panic.
I believe this commit solve boot failure issue.

Allow booting primary ROM via kexec
https://github.com/f69m/multirom/commit/c8ef66cf7ae4b930a1fbeb643440ab84d4a61f19
 
  • Like
Reactions: jamiethemorris

jamiethemorris

Senior Member
Jan 7, 2013
1,851
803

vroad

Senior Member
Dec 22, 2013
53
20
You can install mrom.fstab using multirom installer zip

What did you have to do to get mrom.fstab in the ramdisk?

Sent from my Droid DNA using Tapatalk

There is a configuration file named "use_mrom_fstab" in multirom zip. If use_mrom_fstab is set to true, multirom installer will install mrom.fstab to the ramdisk.
If mrom.fstab is present in the ramdisk, multirom trampoline load partition information from that file instead of fstab.dlx.
 

jamiethemorris

Senior Member
Jan 7, 2013
1,851
803
There is a configuration file named "use_mrom_fstab" in multirom zip. If use_mrom_fstab is set to true, multirom installer will install mrom.fstab to the ramdisk.
If mrom.fstab is present in the ramdisk, multirom trampoline load partition information from that file instead of fstab.dlx.

Hmmm... Yeah I have that set to true in the multirom zip. Boot menu still doesn't show up though.

Sent from my Droid DNA using Tapatalk
 

jamiethemorris

Senior Member
Jan 7, 2013
1,851
803
Updated the second post to show that crpalmer's kernel now has the kexec-hardboot patch. Both Beastmode and iHateWebOS's kernels also have the patch, but I do not have them listed because I still can't get the multirom menu to show up when running Sense as a primary ROM.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    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.


    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

    Donate to Tasssadar:
    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
    2
    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://xdaforums.com/showthread.php?t=2627113
    crpalmer's kernel w/ kexec-hardboot patch: http://xdaforums.com/showthread.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:
    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.
    2
    I did not have success installing it as primary either. I will be updating as soon as I have a chance. For the time being, if you want to use multirom with Lollipop, install your ROM with the latest TWRP from mdmower, reflash multirom, and move it to a secondary ROM (multirom zip will not install over a LP ROM, so it cannot be used as a primary if you want to multiboot).
    2
    Actually, after looking at mdmower's device tree for unsocial twrp, I have an idea...

    Sent from my Droid DNA using Tapatalk
    2
    I've made some progress with getting sense booting. I patched the 4.4 kernel and was able to get unsense to boot as a secondary ROM. What's weird is when it booted it was using all my data from my main ROM, and had messed everything up on both roms by combining the sense and aosp data. Makes absolutely no sense (pun not intended). But hey, it's progress... I'm going to contract dees_troy to ask how he built the 2.6.3.x twrp beta so that hopefully I can get this and twrp 2.7 booting sense normally

    Sent from my Droid DNA using Tapatalk