[MOD][15-NOV-2016] MultiROM 33 + TWRP_3.0.2-6_MultiROM_Edition_2016-11-15 [TestBuild]

Search This thread

nkk71

Inactive Recognized Developer / Inactive Recognize
May 26, 2010
8,743
7,571
50
Beirut
vh3puLb.png

You use this tool at your own risk!!
I have tried to put as many safeguards as I can,
but I cannot be held accountable for any soft-bricks, hard-bricks, loss of data and/or information,
or anything else going wrong.


Introduction

MultiROM is one-of-a-kind multi-boot mod for HTC 10. It can boot any Android ROM as well as other systems like Ubuntu Touch, Plasma Active, Bohdi Linux or WebOS port. Besides booting from device's internal memory, MultiROM can boot from USB drive connected to the device via OTG cable. The main part of MultiROM is a boot manager, which appears every time your device starts and lets you choose ROM to boot. You can see how it looks on the left image below and in gallery. ROMs are installed and managed via modified TWRP recovery. You can use standard ZIP files to install secondary Android ROMs, daily prebuilt image files to install Ubuntu Touch and MultiROM even has its own installer system, which can be used to ship other Linux-based systems.

Features:
* Multiboot any number of Android ROMs
* Restore nandroid backup as secondary ROM
* Use for example Ubuntu Touch or Desktop alongside with Android, without the need of device formatting
* Boot from USB drive attached via OTG cable




Warning!

It _is_ dangerous. This whole thing is basically one giant hack - none of these systems are made with multibooting in mind. It is messing with boot sector and data partition. It is no longer messing with data partition or boot sector (actually the no-kexec workaround is messing with your boot sector), but it is possible that something goes wrong and you will have to flash factory images again.
Make backups. Always.


Now seriously: HTC 10 Warnings!
Beware of Dragons, Goblins, Gremlins and lingering primary_boot.img(RIP)
Due to lack of kexec-hardboot kernel support, I am messing with your boot partition!

Since we lack kernels with kexec-hardboot patch, I'm using a workaround to bypass that restriction, and although tested successfully on the HTC One M7, M8, M9, and HTC 10, as well as several other devices I'm not involved with, things can still go wrong, since I'm directly flashing your boot partition.

I have yet to see any negative effect of that, and version 4 of the no-kexec workaround is much more robust, you should still be aware that I'm "temp-flashing" your real boot partition.

If you are in doubt, either ask, or avoid it completely; MultiROM has always been a huge hack to begin with, and this is even more of a hack.

Always have a backup ready. Possibly even RUU! ... I have not had to, I have also not encountered any loss whatsoever, but better be safe!


Current problems on the HTC 10
* OTG is untested and unsupported at the moment
* exFAT partitions are not supported currently
^^ those haven't worked for quite a while, so it's not really HTC 10 specific


Encrypted devices: Your secondary ROMs do not know your device is encrypted, do not (again: do not) try to encrypt your device while booted into a secondary ROM.​



Secure boot (ie require Password/Pattern/PIN on boot): Thanks to @Captain_Throwback who found out, that under certain circumstances (yet to be determined), your primary (possibly secondary as well) may loose the ability unlock your LockScreen using your Password/Pattern/PIN.

The same thing has been observed in TWRP restores, and although your password is correct and does decrypt your device, it breaks at the lockscreen for some reason.

I recommend you disable Password/Pattern/PIN on boot until / IF the issue is resolved, but in case you do find yourself in that situation, please go ahead and follow the instruction posted in the TWRP thread:
10. After I restored my Data backup and boot back to Android, I'm entering the correct PIN/password, but it's telling me the password is wrong. What happened, and how do I fix it?
  • It appears that sometimes after restoring a backup of Data where security was enabled (such as a PIN or password lock), the device does not recognize the correct password. There are two ways to avoid this issue:
    • Disable security in Android before making a backup of data.
    • After restoring Data, while still in TWRP, use the TWRP File Manager to navigate to /data/system and delete all the locksettings.* files (such as locksettings.db, etc). When you reboot, the password will be gone.


Please bear in mind, that some ROMs (particularly Sense based ROMs), will take a long time to boot up, well above 10minutes, so patience!

Installation
Not supported at this time: 1. Via MultiROM Manager app

This is the easiest way to install everything MultiROM needs. Install the app and select MultiROM and recovery on the Install/Update card. If the Status card says Kernel: doesn't have kexec-hardboot patch! in red letters, you have to install also patched kernel - either select one on the Install/Update card or get some 3rd-party kernel here on XDA. You are chosing kernel for your primary ROM, not any of your (future) secondary ROMs, so select the version accordingly.
Press "Install" on the Install/Update card to start the installation.


2. Manual installation
MultiROM has 3 parts (well, it should, but in this case it only has 2) you need to install:

  • Modified recovery (TWRP_3.x.x-x_multirom_pme_YYYYDDMM-pp.img) - download the IMG file from second post and use
    • TWRP itself to flash newer TWRP to recovery partition:
      TWRP->Install-> select Images -> TWRP_3.x.x-x_multirom_pme_YYYYDDMM-pp.img -> to Recovery -> Reboot to Recovery
      .
      or
      .
    • "fastboot flash recovery TWRP_3.x.x-x_multirom_pme_YYYYDDMM-pp.img"
      (in download mode, for example)
      Code:
      C:ADBADB_10>adb reboot download
      
      C:ADBADB_10>fastboot devices
      FAxxxxxxxxxx    fastboot
      
      C:ADBADB_10>fastboot flash recovery TWRP_3.0.2-6_multirom_pme_20160917-02.img
      target reported max download size of 800000000 bytes
      sending 'recovery' (25700 KB)...
      OKAY [  2.001s]
      writing 'recovery'...
      (bootloader) HOSD CL#761759
      (bootloader) [email protected]
      (bootloader) [email protected]%
      (bootloader) Update partition OK
      (bootloader) [email protected]
      OKAY [  2.872s]
      finished. total time: 4.878s
      
      C:ADBADB_10>fastboot reboot-bootloader
      rebooting into bootloader...
      OKAY [  0.004s]
      finished. total time: 0.005s

  • MultiROM (multirom-YYYYMMDD-vXXd-UNOFFICIAL-pme.zip) - download the ZIP file from second post and flash it in the MultiROM Recovery.
    .
    .
  • Patched kernel - You can use either one of the stock ones in second post or third-party kernels which include the patch, you can see list in the second post. Download the ZIP file and flash it in recovery.
    We don't have a patched kernel, so I'm using a workaround.
You current rom will not be erased by the installation.
Download links are in the third post.



Adding ROMs

1. Android
Go to recovery, enter the MultiROM section of TWRP (by clicking the icon in to top right corner) -> Add ROM. Select the ROM's zip file and confirm. As for the space, clean installation of stock 4.2 after first boot (with dalvik cache generated and connected to google account) takes 676mb of space.​

2. Ubuntu Touch this is NOT SUPPORTED

Use the MultiROM Manager app to install Ubuntu Touch.

Ubuntu Touch is in development - MultiROM will have to be updated to keep up with future changes in Ubuntu, so there's a good chance this method stops working after a while and I'll have to fix it.


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 (extX, NTFS and FAT32 partitions are supported) and proceed with the installation.
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 the MultiROM section of TWRP (by clicking the icon in to top right corner) 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 the MultiROM section of TWRP (by clicking the icon in to top right corner) -> 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 corresponding 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 for example kernel, which is distrubuted as whole boot.img (eg. franco kernel), you have to use this option on it, otherwise you would lose MultiROM.
- 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.
- Re-patch init - this is available only for ubuntu. Use it when ubuntu cannot find root partition, ie. after apt-get upgrade which changed the init script.​


Screenshots


Special Thanks
  • @Tasssadar: Original author of MultiROM.
  • @Captain_Throwback: For testing, giving me a hard time, and warning you guys about the secure boot (ie require Password/Pattern/PIN on boot) issue.
  • zhuowei: For the fake properties idea.

Source code
MultiROM - https://github.com/Tasssadar/multirom (branch master)
Modified TWRP - https://github.com/Tasssadar/Team-Win-Recovery-Project (branch master)
Device files - ....

Everything is here:
https://github.com/multirom-htc
https://github.com/nkk71

XDA:DevDB Information
MultiROM, Tool/Utility for the HTC 10

Contributors
nkk71

Version Information
Status: Stable
Current Stable Version: 33testbuild
Stable Release Date: 2016-11-15

Created 2016-09-18
Last Updated 2016-11-15
 

Attachments

  • Screenshot_20161012-233024.jpg
    Screenshot_20161012-233024.jpg
    237.4 KB · Views: 5,477
  • Screenshot_20161012-233010.jpg
    Screenshot_20161012-233010.jpg
    246.8 KB · Views: 5,601
  • Screenshot_20161012-233019.png
    Screenshot_20161012-233019.png
    228.1 KB · Views: 5,415

nkk71

Inactive Recognized Developer / Inactive Recognize
May 26, 2010
8,743
7,571
50
Beirut
FAQ and other notes

HTC 10 - Peculiarities / Bugs
  • There are no kexec-hardboot kernels for the HTC 10, so you need to have the no-kexec-workaround enabled. Please refer to post 4 for details.
    .
  • A few notes about enabled adb in MultiROM boot menu: having adb enabled in MultiROM boot menu (TWRP->MultiROM->Settings->Enable ADB) may interfere with the ROMs "connection" (MTP, etc), possibly even prevent the ROM from booting (rarely, but I've seen it happen). Since this option is usually only used for debugging, I recommend to keep this option disabled.
    .
  • Secure boot (ie require Password/Pattern/PIN on boot): Thanks to Captain_Throwback who found out, that under certain circumstances (yet to be determined), your primary (possibly secondary as well) may loose the ability unlock your LockScreen using your Password/Pattern/PIN.

    The same thing has been observed in TWRP restores, and although your password is correct and does decrypt your device, it breaks at the lockscreen for some reason.

    I recommend you disable Password/Pattern/PIN on boot until / IF the issue is resolved, but in case you do find yourself in that situation, please go ahead and follow the instruction posted in the TWRP thread:
    10. After I restored my Data backup and boot back to Android, I'm entering the correct PIN/password, but it's telling me the password is wrong. What happened, and how do I fix it?
    • It appears that sometimes after restoring a backup of Data where security was enabled (such as a PIN or password lock), the device does not recognize the correct password. There are two ways to avoid this issue:
      • Disable security in Android before making a backup of data.
      • After restoring Data, while still in TWRP, use the TWRP File Manager to navigate to /data/system and delete all the locksettings.* files (such as locksettings.db, etc). When you reboot, the password will be gone.



Something not working, or you need help debugging

Please provide the following information:
  1. a detailed explanation of the problem
    .
  2. the recovery.log (found in /tmp/recovery.log or by copying it to the sdcard and then copying it to PC)
    .
  3. the logs from /sdcard/multirom-klogs (zip those up, before uploading). that option needs to be enabled in TWRP->MultiROM->Settings
    .
  4. the link to the thread and name of file (+ which version) you are having problems with
    .
  5. due to the large size of some of these ROMs, I may not have time to download and test them, so please also upload the updater-script (found in ROM.ZIP under /META-INF/com/google/android/)



Supported File Systems for secondary ROMs

Currently only the following partitions can boot secondary ROMs:
  • Internal Storage
    .
  • An external sdcard, properly partitioned with an ext4 partition (see below)

Partitioning your External SD Card

Warning: You will loose all information on your external sdcard!!
There is no way of retrieving that information, so copy everything to your PC before proceeding!!


In order to make a decent assessment of the size of your ext4 partition, below is a small table of some of the ROMs I've installed to my ext4 partition:
Code:
[U][B]2.5G    BeanStalk-6.20-20160905-pm[/B][/U]
1.1G    BeanStalk-6.20-20160905-pm/data
1.3G    BeanStalk-6.20-20160905-pm/system

[U][B]1.4G    cm-13.0-20160915-UNOFFICIA[/B][/U]
396M    cm-13.0-20160915-UNOFFICIA/data
960M    cm-13.0-20160915-UNOFFICIA/system

[U][B]3.8G    ice-2.1.1_PERFUME_UHL_M60_[/B][/U]
1.7G    ice-2.1.1_PERFUME_UHL_M60_/data
2.0G    ice-2.1.1_PERFUME_UHL_M60_/system

[B][U]4.0G    Viper10_3.1.0[/U][/B]
1.8G    Viper10_3.1.0/data
2.1G    Viper10_3.1.0/system
Please bear in mind, those installs have none or very few extra downloaded apps, which would also be using the data partition; if you need a reference for comparison, you can select Backup in TWRP, which will show you the size of your current /data partition (this excludes "Internal Storage")... mine is about 8GB !
FYI: I'm using a 200GB sdcard, and have it setup with a 30GB ext4 partition... but that's just me :)


Step 1: Partitioning
TWRP Main Menu
  1. -> Advanced
  2. -> Partition SD Card
  3. -> selected Micro SDCard
    • Set the EXT Size to the size of your choice
    • Set Swap Size to zero
    • Set File System to ext4
  4. -> swipe to proceed with repartitioning
go back to the main menu.

Example Screenshots:
TWRP Main Screen
34y2vz8.jpg



Select Advanced
sdcs9g.jpg



Select Partition SD Card, Micro SDCard is selected, press OK
2vcwe8m.jpg




  • Set the EXT Size to the size of your choice
  • Set Swap Size to zero
  • Set File System to ext4
2jusfs.jpg

then swipe to begin


Partitioning complete
2n0vmld.jpg



Step 2 (optional, but recommended): Changing the first partition to exFAT
The repartitioning in step 1, has formatted your card with two partitions, the first one (used by ROMs as external storage) being FAT32 formatted. Since FAT32 has certain limitations, in particular the 4GB file size limit, it's recommended to reformat it as exFAT.

TWRP
-> Wipe
-> Advanced Wipe
-> select external_sd or Micro SDCard (whichever is shown in the menu)
-> Repair or Change File System
-> Change File System
-> select exFAT
-> swipe to reformat the first partition to exFAT

Example Screenshots:

Wipe Menu, select Advanced Wipe
21f0jsp.jpg



Advanced Wipe Menu:
select external_sd or Micro SDCard (whichever is shown in the menu)
and click Repair or Change File System
4kd25i.jpg



Select Change File System
2cgdb1w.jpg



Select exFAT
10h252h.jpg



Swipe to reformat to exFAT
2ekhbpz.jpg



Formatting complete
23w4ets.jpg




Device encryption
Since v32, MultiROM supports encryption on this device (it has to be added for each device separately). It works only with Android-based secondary ROMs and the secondary ROMs don't know the device is encrypted, so they would allow you to encrypt the device again - do not do that. If you're using password, pin or pattern for the encryption, MultiROM will ask you for the password on boot. If you're booting the primary ROM, then Android will ask you for the password _again_ - unfortunately, there is no way for me to pass the "unencrypted" status to Android. If you're booting secondary ROM, MultiROM will ask you for the password again after the reboot - that's because I have to unencrypt the /data partition after the ROM's kernel is loaded.

I could omit the second password prompt when booting secondary ROM by temporarily saving the password somewhere, but that's obviously unsafe. So is using encryption with unlocked device though, so I might add this later.​
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.​

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. 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.

The menu with all the ROMs won't show up during boot, how to fix it?
Either re-flash the MultiROM zip or go to recovery, Advanced -> MultiROM -> Inject curr. boot sector.

The reason for this is that something rewrote your boot.img, which happens for example when you flash a kernel. MultiROM's boot menu is part of the boot image, so it has to be added into it again.

My secondary ROM(s) no longer boot up, after I flashed a new primary ROM / Kernel / boot.img, and the MultiROM menu (as mentioned above) no longer appears
Please issue a restorecon on the particular ROM:
TWRP -> MultiROM -> select ROM in question -> Run Restorecon
2ngr5lu.jpg

Technical explanation
Usually most init.rc scripts will run a restorecon_recursive on /data and /mnt(also cache, but that's not too important for us)
Code:
restorecon_recursive /data
restorecon_recursive /mnt
this will supposedly restore file contexts (permissions if you prefer the older term) on all your data partitions, it will however break all your secondary ROMs as their system partition actually lives there, but the "permissions" have been overwritten to make it look like just normal data.

This is also why so many Android 7 (Nougat) MultiROM people (in other threads) are having so much trouble, as the file_contexts format has changed, and that hasn't been updated for the new format yet.
 
Last edited:

nkk71

Inactive Recognized Developer / Inactive Recognize
May 26, 2010
8,743
7,571
50
Beirut
Downloads

Current Test Builds

All Current Test Builds can be found on androidfilehost under MultiROM TEST BUILDS

You should be using these, not the ones mentioned below!

Definition of Test Builds: These are stable builds which I have and am using (and testing). They contain the most up to date fixes as mentioned in the changelog under <tba>.
  • The main reason I'm calling them "Test Builds", is because they have not gone through extensive testing as what I would usually do for a "release version". I think most people would call them release versions, but I tend to be more conservative.
    .
  • The second reason, they get uploaded to AFH instead of directly here, is two fold:
    1. I'm maintaining the M7, M8, M9 and HTC 10 MultiROM versions, and uploading to AFH is easier and faster for me.
    2. Updating the actual threads and posts, is too time consuming every time I want to push an update.



1. Main downloads

Modified recovery (based on TWRP): TWRP_3.0.2-6_multirom_pme_20160920-04.img

MultiROM Main ZIP: multirom-20160920-v33b-UNOFFICIAL-pme.zip


Not supported at this time MultiROM Manager Android app: Google Play or link to APK


AndroidFileHost (mirror & old versions): https://www.androidfilehost.com/?w=files&flid=114470


2. third-party kernels with kexec-hardboot patch

None exist at the moment, hence the use of the workaround.

3. Uninstaller

MultiROM uninstaller: multirom_uninstaller
Flash this ZIP file to remove MultiROM from your device. It will erase all secondary ROMs. If you don't want MultiROM menus in recovery, re-flash [RECOVERY][pme] TWRP touch recovery, but it is not needed - those menus don't do anything if MultiROM is not installed.


Changelog

MultiROM Managar App:
Code:
2016-11-11 MultiROM Manager App[-debug] version
=====================
* Add support for external storage
  (allows listing, manipulating, and booting secondary ROMs on external storage)
* Highlight currently running ROM first
  (also disallow deletion of it)
* Show ROMs in order of location (Current, then Internal, etc.)
* Allow duplicate ROM names if on separate partition
* Fix Widget
* Support for HTC 10 (pme)
* Support for HTC One M9 (hima)
* Support for HTC One M8
* Support for HTC One M7 (m7univ)

MultiROM:
Code:
2017-10-27 MultiROM v33
=====================
* New 'System Partition Mode' ROMs ([URL="https://github.com/nkk71/multirom/commit/dfb1a294ab55374b80bb6f14c2422850610c986d"]technical details[/URL])
* Android 8.0 compatibility
* Fix sdcardfs gid derivation ([URL="https://github.com/nkk71/multirom/commit/e0b749567f4ad976a5aabcdbd944f44f9c68b399"]technical details[/URL])
* vold_decrypt (Decryption on the HTC One M9 and HTC 10)
* trampoline511 (aka trampolineMk2)
* New default icons for Android ROMs when not set in app
* Code fixes and cleanups


2016-11-15 MultiROM v33
=====================
* Preliminary support for Android 7 (Nougat)
* Add support functions for MultiROM Manager App
  (allows listing, manipulating, and booting secondary ROMs on external storage)
* Update no-kexec to version 4.1
    + changes to second boot detection
    + no-kexec versioning to allow auto-updating when needed
    + code cleanup
* Reboot to recovery on failed data partition mount
  (avoids potentially being stuck in bootloop)
* Add reboot to recovery button on decryption screen when in second boot
* Code fixes

MultiROM v33b
=====================
* Fix [possible] boot img truncation when used in daisy-
  chaining [older] systemless SuperSU, [B][U]and[/U][/B] rebooting
  directly from AROMA Installer (info to follow later)
* Fixed mr_init_devices for certain devices (better fix will follow)
* Fix the auto-boot issue to properly fall back to primary
  when secondary is deleted

MultiROM v33a
=====================
* Initial port for the HTC 10 (pme)
* Updated no-kexec to version 4
* autoboot: "Use last booted ROM" now works with external ROMs

previous changelogs are in M7/M8/M9 threads
i'll consolidate at some point hopefully


Recoveries:
Code:
2017-10-27
=====================
* Fully merged with official TWRP 7.1 branch
* New 'System Partition Mode' ROMs ([URL="https://github.com/nkk71/multirom/commit/dfb1a294ab55374b80bb6f14c2422850610c986d"]technical details[/URL])
* Android 8.0 compatibility
* Auto detect possible use of legacy props
* vold_decrypt (HTC decryption on the M9 and 10)
* Install from backup using a System_Image
* libbootimg: Updated to support AnyKernel2
* Fixes for some boot.img patchers
* Block mount/unmount of secondary partitions
* Use own loop devices to avoid conflicts with other installers
* Code fixes and cleanups



2016-11-15 (33e)
=====================
* Fix restorecon for secondary ROMs
* Rebased on android-7.0 branch
* Preliminary support for Android 7 (Nougat)
* Fix no-kexec restore primary_boot.img on devices
  with PIN/Pattern/Password encryption
* Fix flashing of certain gapps zip's which are
  missing the updater-script file
[STRIKE]* Add warning on failed injection[/STRIKE]
* Minor code cleanup

2016-09-20 (33b)
=====================
* Fix some installer scripts using certain mount/unmount commands
* Wake up screen before starting flash (fixes AROMA installer issues)
* Changed fstab so external ext4 won't get wiped with a factory reset

2016-09-17 (33a)
=====================
* initial port for the HTC 10 (pme)
* Based on TWRP 3.0.2 android-6.0 tree & branch
* Includes official TWRP commits up to Aug 23, 2016

previous changelogs are in M7/M8/M9 threads
i'll consolidate at some point hopefully
 
Last edited:

nkk71

Inactive Recognized Developer / Inactive Recognize
May 26, 2010
8,743
7,571
50
Beirut
No-kexec workaround (version 4)
As of this version you need to manually enable the no-kexec workaround.
Actually, depending on the developer, (s)he may have already enabled it. Nonetheless, you can still choose to override the settings:

Go to TWRP -> MultiROM -> Settings
2dhxjrd.jpg


and enable the No-KEXEC workaround option
33cbuo6.jpg


once you do you'll also have the option for ADVanced settings, please see below for a detailed description, though in most cases the default should suffice.​





Explanation of the no-kexec workaround advanced options
1znli87.jpg

(the Info page is supposed to provide the same information as here, but I haven't added that yet)


1- Use no-kexec only when needed
This should be the default for most users, the other options are more intended for advanced uses (kernel debugging, and such).

If MultiROM detects a kexec-hardboot enabled kernel in primary slot, it will use the standard kexec method to boot the secondary. If on the other hand it does not detect that the kernel supports kexec-hardboot then it will use the workaround.​



2- ... but also ask for confirmation before booting
Same as option 1 above, but in addition you will be presented with a confirmation message, if the workaround is about to be used:
s3dld3.jpg



3- Ask whether to kexec or use no-kexec on booting
If the kernel in primary slot does support kexec-hardboot'ing then you will be presented with a choice of which method to use
mrdd8o.jpg


If the kernel does not support kexec-hardboot then you'll be informed as in option 2 above​



4- Always force using no-kexec workaround
Forces the no-kexec workaround to be used, even if the kernel in primary slot has kexec-hardboot support​



Options 2 and 3, always present the user with a GUI confirmation, whereas option 1 and 4 will act as instructed without prompting the user.





Visual feedback provided by the Booting... card
Regular kexec-hardboot boot
1zmef0m.jpg




Booting using no-kexec-workaround
2h83249.jpg




How does all this work, etc

The workaround:
  • MultiROM TWRP recovery works, and is able to flash ROMs to secondary
  • MultiROM in essence works (in particular, able to change the mount points during bootup)
  • what does not work is being able to use the secondary ROM's kernel (due to the lack of kexec-hardboot kernel and tools)

So how do we deal with booting any ROM if we can't use the proper kernel for the ROM?
Easy :eek: :
Upon selection of the ROM during MultiROM boot menu, we do the following:
  1. "flash" secondary boot.img to primary partition slot
  2. initiate a full reboot (secondary boot.img is in primary slot)
  3. let the ROM auto-boot up on second boot

The good part:
  • It works.
    .
  • Every secondary ROM has a boot.img file we can easily access to use the workaround; when you flash a ROM in MultiROM TWRP, not only are the "virtual" system, data, and cache partitions created, but also the boot.img.
    The secondary ROMs' boot.img will be found /data/media/0/multirom/<name of rom>/boot.img or if it's on your external ext4 in the appropriate rom folder
    We use that file and flash it to primary real boot partition and then upon second boot, the correct boot.img is in place for the correct ROM.

The bad part:
  • Unlike secondary ROMs, the primary ROM does not have a boot.img file... since it is the primary ROM, the boot.img should always be in the real boot partition, since MultiROM expects the primary kernel to have kexec-hardboot capability, but it does not, so I just go ahead and mess with your primary boot partition.
    Since we have no "boot.img" file for the primary, my workaround makes a backup of the boot partition and names it primary_boot.img

    In version 4 of the workaround, this backup is created and used only when booting a secondary ROM. When a secondary ROM is selected it's boot.img is flashed to primary slot, upon booting into the secondary ROM, the primary_boot.img is restored.

Long story short: the difference between kexec and no-kexec-workaround
Usual kexec-hardboot MultiROM
  1. Select secondary ROM
  2. MultiROM detects a boot.img
  3. MultiROM reads the secondary boot.img into memory
  4. MultiROM initiates a kexec second boot but into the secondary boot.img from above
  5. MultiROM continues
No-kexec-workaround MultiROM
  1. Select secondary ROM
  2. MultiROM detects a boot.img
  3. MultiROM flashes the secondary boot.img into the primary boot partition
  4. MultiROM initiates a normal second boot but with the secondary boot.img in the real boot partition
  5. MultiROM restores the primary_boot.img and continues as usual

so the difference is in point 3... whereas normal kexec'ing loads the secondary boot.img into memory and goes from there, the workaround, actually flashes it to the real primary boot partition... and continues normally from there



Devices using the no-kexec-workaround successfully
MultiROM threads for:
 
Last edited:

nkk71

Inactive Recognized Developer / Inactive Recognize
May 26, 2010
8,743
7,571
50
Beirut
Ok,ok,you will say that im noob,but i flashed both files,flash the RR ROM,but the multirom menu doesnt show and it boots me directly to primary rom

That's not a "bug report" ;)

Please provide detailed information, and logs... BTW, I didnt add the advanced kernel logging feature "by mistake", it's so you can get "easier" logs... but if those exist, then you still need to pull a kmsg
Code:
adb pull /sys/fs/pstore/console-ramoops

No boot menu, normally means that trampoline (if it's in the above log), wasnt able to mount data... or it's not even there
 
  • Like
Reactions: hav0c

azZA_09

Senior Member
Jul 10, 2014
832
379
31
In your mind
That's not a "bug report" ;)

Please provide detailed information, and logs... BTW, I didnt add the advanced kernel logging feature "by mistake", it's so you can get "easier" logs... but if those exist, then you still need to pull a kmsg
Code:
adb pull /sys/fs/pstore/console-ramoops

No boot menu, normally means that trampoline (if it's in the above log), wasnt able to mount data... or it's not even there
Sorry dude,Im at work atm and I think too slow :)). I will provide logs tomorrow,but maybe somebosy can provide them since then. Once again,great job and im sure you will fix every problem
 

nkk71

Inactive Recognized Developer / Inactive Recognize
May 26, 2010
8,743
7,571
50
Beirut
Sorry dude,Im at work atm and I think too slow :)). I will provide logs tomorrow,but maybe somebosy can provide them since then. Once again,great job and im sure you will fix every problem

open a terminal emulator on your phone, and
Code:
cat /sys/fs/pstore/console-ramoops | grep tramp

then you'll see if trampoline is even in there ;)
 

nkk71

Inactive Recognized Developer / Inactive Recognize
May 26, 2010
8,743
7,571
50
Beirut
Got it installed and booted up cm13 as secondary. Working good so far. Thanks for this. I'm back on Viper running from primary.

hmm is that a complaint? ... sounds rather positive, so i'm unsure. i usually only hear complaints :p

Well, if it's not, thanks for reporting back :good:

I currently have an old version of Viper10 as primary / daily
and as secondaries:
  • ice-2.1.1_PERFUME_UHL_M60_SENSE80GP_HTC_Europe_1.90.401.3
  • BeanStalk-6.20-20160905-pme
  • cm-13.0-20160915-UNOFFICIAL-pme
  • and some other weird stuff :D
 

jsaxon2

Senior Member
Mar 3, 2010
970
701
Lock Haven, PA
hmm is that a complaint? ... sounds rather positive, so i'm unsure. i usually only hear complaints :p

Well, if it's not, thanks for reporting back :good:

I currently have an old version of Viper10 as primary / daily
and as secondaries:
ice-2.1.1_PERFUME_UHL_M60_SENSE80GP_HTC_Europe_1.90.401.3
cm-13.0-20160915-UNOFFICIAL-pme
and some other weird stuff :D
Lol, not a complaint, it's a compliment. You have done excellent work. Just wanted to report that it is working. I'm too tired to mess with it anymore, but awesome that I can test CM builds and get right back to my daily driver.

Job well done.
 
  • Like
Reactions: nkk71

nkk71

Inactive Recognized Developer / Inactive Recognize
May 26, 2010
8,743
7,571
50
Beirut
Lol, not a complaint, it's a compliment. You have done excellent work. Just wanted to report that it is working. I'm too tired to mess with it anymore, but awesome that I can test CM builds and get right back to my daily driver.

Job well done.

Thank you, I do enjoy positive feedback, Hope you enjoy it :)
as well as comments, thoughts and ideas.

@ all, If something is wrong, please be as descriptive as possible... please no "it doesn't work" posts.
 
  • Like
Reactions: jsaxon2

Top Liked Posts

  • There are no posts matching your filters.
  • 38
    vh3puLb.png

    You use this tool at your own risk!!
    I have tried to put as many safeguards as I can,
    but I cannot be held accountable for any soft-bricks, hard-bricks, loss of data and/or information,
    or anything else going wrong.


    Introduction

    MultiROM is one-of-a-kind multi-boot mod for HTC 10. It can boot any Android ROM as well as other systems like Ubuntu Touch, Plasma Active, Bohdi Linux or WebOS port. Besides booting from device's internal memory, MultiROM can boot from USB drive connected to the device via OTG cable. The main part of MultiROM is a boot manager, which appears every time your device starts and lets you choose ROM to boot. You can see how it looks on the left image below and in gallery. ROMs are installed and managed via modified TWRP recovery. You can use standard ZIP files to install secondary Android ROMs, daily prebuilt image files to install Ubuntu Touch and MultiROM even has its own installer system, which can be used to ship other Linux-based systems.

    Features:
    * Multiboot any number of Android ROMs
    * Restore nandroid backup as secondary ROM
    * Use for example Ubuntu Touch or Desktop alongside with Android, without the need of device formatting
    * Boot from USB drive attached via OTG cable




    Warning!

    It _is_ dangerous. This whole thing is basically one giant hack - none of these systems are made with multibooting in mind. It is messing with boot sector and data partition. It is no longer messing with data partition or boot sector (actually the no-kexec workaround is messing with your boot sector), but it is possible that something goes wrong and you will have to flash factory images again.
    Make backups. Always.


    Now seriously: HTC 10 Warnings!
    Beware of Dragons, Goblins, Gremlins and lingering primary_boot.img(RIP)
    Due to lack of kexec-hardboot kernel support, I am messing with your boot partition!

    Since we lack kernels with kexec-hardboot patch, I'm using a workaround to bypass that restriction, and although tested successfully on the HTC One M7, M8, M9, and HTC 10, as well as several other devices I'm not involved with, things can still go wrong, since I'm directly flashing your boot partition.

    I have yet to see any negative effect of that, and version 4 of the no-kexec workaround is much more robust, you should still be aware that I'm "temp-flashing" your real boot partition.

    If you are in doubt, either ask, or avoid it completely; MultiROM has always been a huge hack to begin with, and this is even more of a hack.

    Always have a backup ready. Possibly even RUU! ... I have not had to, I have also not encountered any loss whatsoever, but better be safe!


    Current problems on the HTC 10
    * OTG is untested and unsupported at the moment
    * exFAT partitions are not supported currently
    ^^ those haven't worked for quite a while, so it's not really HTC 10 specific


    Encrypted devices: Your secondary ROMs do not know your device is encrypted, do not (again: do not) try to encrypt your device while booted into a secondary ROM.​



    Secure boot (ie require Password/Pattern/PIN on boot): Thanks to @Captain_Throwback who found out, that under certain circumstances (yet to be determined), your primary (possibly secondary as well) may loose the ability unlock your LockScreen using your Password/Pattern/PIN.

    The same thing has been observed in TWRP restores, and although your password is correct and does decrypt your device, it breaks at the lockscreen for some reason.

    I recommend you disable Password/Pattern/PIN on boot until / IF the issue is resolved, but in case you do find yourself in that situation, please go ahead and follow the instruction posted in the TWRP thread:
    10. After I restored my Data backup and boot back to Android, I'm entering the correct PIN/password, but it's telling me the password is wrong. What happened, and how do I fix it?
    • It appears that sometimes after restoring a backup of Data where security was enabled (such as a PIN or password lock), the device does not recognize the correct password. There are two ways to avoid this issue:
      • Disable security in Android before making a backup of data.
      • After restoring Data, while still in TWRP, use the TWRP File Manager to navigate to /data/system and delete all the locksettings.* files (such as locksettings.db, etc). When you reboot, the password will be gone.


    Please bear in mind, that some ROMs (particularly Sense based ROMs), will take a long time to boot up, well above 10minutes, so patience!

    Installation
    Not supported at this time: 1. Via MultiROM Manager app

    This is the easiest way to install everything MultiROM needs. Install the app and select MultiROM and recovery on the Install/Update card. If the Status card says Kernel: doesn't have kexec-hardboot patch! in red letters, you have to install also patched kernel - either select one on the Install/Update card or get some 3rd-party kernel here on XDA. You are chosing kernel for your primary ROM, not any of your (future) secondary ROMs, so select the version accordingly.
    Press "Install" on the Install/Update card to start the installation.


    2. Manual installation
    MultiROM has 3 parts (well, it should, but in this case it only has 2) you need to install:

    • Modified recovery (TWRP_3.x.x-x_multirom_pme_YYYYDDMM-pp.img) - download the IMG file from second post and use
      • TWRP itself to flash newer TWRP to recovery partition:
        TWRP->Install-> select Images -> TWRP_3.x.x-x_multirom_pme_YYYYDDMM-pp.img -> to Recovery -> Reboot to Recovery
        .
        or
        .
      • "fastboot flash recovery TWRP_3.x.x-x_multirom_pme_YYYYDDMM-pp.img"
        (in download mode, for example)
        Code:
        C:ADBADB_10>adb reboot download
        
        C:ADBADB_10>fastboot devices
        FAxxxxxxxxxx    fastboot
        
        C:ADBADB_10>fastboot flash recovery TWRP_3.0.2-6_multirom_pme_20160917-02.img
        target reported max download size of 800000000 bytes
        sending 'recovery' (25700 KB)...
        OKAY [  2.001s]
        writing 'recovery'...
        (bootloader) HOSD CL#761759
        (bootloader) [email protected]
        (bootloader) [email protected]%
        (bootloader) Update partition OK
        (bootloader) [email protected]
        OKAY [  2.872s]
        finished. total time: 4.878s
        
        C:ADBADB_10>fastboot reboot-bootloader
        rebooting into bootloader...
        OKAY [  0.004s]
        finished. total time: 0.005s

    • MultiROM (multirom-YYYYMMDD-vXXd-UNOFFICIAL-pme.zip) - download the ZIP file from second post and flash it in the MultiROM Recovery.
      .
      .
    • Patched kernel - You can use either one of the stock ones in second post or third-party kernels which include the patch, you can see list in the second post. Download the ZIP file and flash it in recovery.
      We don't have a patched kernel, so I'm using a workaround.
    You current rom will not be erased by the installation.
    Download links are in the third post.



    Adding ROMs

    1. Android
    Go to recovery, enter the MultiROM section of TWRP (by clicking the icon in to top right corner) -> Add ROM. Select the ROM's zip file and confirm. As for the space, clean installation of stock 4.2 after first boot (with dalvik cache generated and connected to google account) takes 676mb of space.​

    2. Ubuntu Touch this is NOT SUPPORTED

    Use the MultiROM Manager app to install Ubuntu Touch.

    Ubuntu Touch is in development - MultiROM will have to be updated to keep up with future changes in Ubuntu, so there's a good chance this method stops working after a while and I'll have to fix it.


    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 (extX, NTFS and FAT32 partitions are supported) and proceed with the installation.
    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 the MultiROM section of TWRP (by clicking the icon in to top right corner) 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 the MultiROM section of TWRP (by clicking the icon in to top right corner) -> 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 corresponding 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 for example kernel, which is distrubuted as whole boot.img (eg. franco kernel), you have to use this option on it, otherwise you would lose MultiROM.
    - 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.
    - Re-patch init - this is available only for ubuntu. Use it when ubuntu cannot find root partition, ie. after apt-get upgrade which changed the init script.​


    Screenshots


    Special Thanks
    • @Tasssadar: Original author of MultiROM.
    • @Captain_Throwback: For testing, giving me a hard time, and warning you guys about the secure boot (ie require Password/Pattern/PIN on boot) issue.
    • zhuowei: For the fake properties idea.

    Source code
    MultiROM - https://github.com/Tasssadar/multirom (branch master)
    Modified TWRP - https://github.com/Tasssadar/Team-Win-Recovery-Project (branch master)
    Device files - ....

    Everything is here:
    https://github.com/multirom-htc
    https://github.com/nkk71

    XDA:DevDB Information
    MultiROM, Tool/Utility for the HTC 10

    Contributors
    nkk71

    Version Information
    Status: Stable
    Current Stable Version: 33testbuild
    Stable Release Date: 2016-11-15

    Created 2016-09-18
    Last Updated 2016-11-15
    24
    No-kexec workaround (version 4)
    As of this version you need to manually enable the no-kexec workaround.
    Actually, depending on the developer, (s)he may have already enabled it. Nonetheless, you can still choose to override the settings:

    Go to TWRP -> MultiROM -> Settings
    2dhxjrd.jpg


    and enable the No-KEXEC workaround option
    33cbuo6.jpg


    once you do you'll also have the option for ADVanced settings, please see below for a detailed description, though in most cases the default should suffice.​





    Explanation of the no-kexec workaround advanced options
    1znli87.jpg

    (the Info page is supposed to provide the same information as here, but I haven't added that yet)


    1- Use no-kexec only when needed
    This should be the default for most users, the other options are more intended for advanced uses (kernel debugging, and such).

    If MultiROM detects a kexec-hardboot enabled kernel in primary slot, it will use the standard kexec method to boot the secondary. If on the other hand it does not detect that the kernel supports kexec-hardboot then it will use the workaround.​



    2- ... but also ask for confirmation before booting
    Same as option 1 above, but in addition you will be presented with a confirmation message, if the workaround is about to be used:
    s3dld3.jpg



    3- Ask whether to kexec or use no-kexec on booting
    If the kernel in primary slot does support kexec-hardboot'ing then you will be presented with a choice of which method to use
    mrdd8o.jpg


    If the kernel does not support kexec-hardboot then you'll be informed as in option 2 above​



    4- Always force using no-kexec workaround
    Forces the no-kexec workaround to be used, even if the kernel in primary slot has kexec-hardboot support​



    Options 2 and 3, always present the user with a GUI confirmation, whereas option 1 and 4 will act as instructed without prompting the user.





    Visual feedback provided by the Booting... card
    Regular kexec-hardboot boot
    1zmef0m.jpg




    Booting using no-kexec-workaround
    2h83249.jpg




    How does all this work, etc

    The workaround:
    • MultiROM TWRP recovery works, and is able to flash ROMs to secondary
    • MultiROM in essence works (in particular, able to change the mount points during bootup)
    • what does not work is being able to use the secondary ROM's kernel (due to the lack of kexec-hardboot kernel and tools)

    So how do we deal with booting any ROM if we can't use the proper kernel for the ROM?
    Easy :eek: :
    Upon selection of the ROM during MultiROM boot menu, we do the following:
    1. "flash" secondary boot.img to primary partition slot
    2. initiate a full reboot (secondary boot.img is in primary slot)
    3. let the ROM auto-boot up on second boot

    The good part:
    • It works.
      .
    • Every secondary ROM has a boot.img file we can easily access to use the workaround; when you flash a ROM in MultiROM TWRP, not only are the "virtual" system, data, and cache partitions created, but also the boot.img.
      The secondary ROMs' boot.img will be found /data/media/0/multirom/<name of rom>/boot.img or if it's on your external ext4 in the appropriate rom folder
      We use that file and flash it to primary real boot partition and then upon second boot, the correct boot.img is in place for the correct ROM.

    The bad part:
    • Unlike secondary ROMs, the primary ROM does not have a boot.img file... since it is the primary ROM, the boot.img should always be in the real boot partition, since MultiROM expects the primary kernel to have kexec-hardboot capability, but it does not, so I just go ahead and mess with your primary boot partition.
      Since we have no "boot.img" file for the primary, my workaround makes a backup of the boot partition and names it primary_boot.img

      In version 4 of the workaround, this backup is created and used only when booting a secondary ROM. When a secondary ROM is selected it's boot.img is flashed to primary slot, upon booting into the secondary ROM, the primary_boot.img is restored.

    Long story short: the difference between kexec and no-kexec-workaround
    Usual kexec-hardboot MultiROM
    1. Select secondary ROM
    2. MultiROM detects a boot.img
    3. MultiROM reads the secondary boot.img into memory
    4. MultiROM initiates a kexec second boot but into the secondary boot.img from above
    5. MultiROM continues
    No-kexec-workaround MultiROM
    1. Select secondary ROM
    2. MultiROM detects a boot.img
    3. MultiROM flashes the secondary boot.img into the primary boot partition
    4. MultiROM initiates a normal second boot but with the secondary boot.img in the real boot partition
    5. MultiROM restores the primary_boot.img and continues as usual

    so the difference is in point 3... whereas normal kexec'ing loads the secondary boot.img into memory and goes from there, the workaround, actually flashes it to the real primary boot partition... and continues normally from there



    Devices using the no-kexec-workaround successfully
    MultiROM threads for:
    21
    Downloads

    Current Test Builds

    All Current Test Builds can be found on androidfilehost under MultiROM TEST BUILDS

    You should be using these, not the ones mentioned below!

    Definition of Test Builds: These are stable builds which I have and am using (and testing). They contain the most up to date fixes as mentioned in the changelog under <tba>.
    • The main reason I'm calling them "Test Builds", is because they have not gone through extensive testing as what I would usually do for a "release version". I think most people would call them release versions, but I tend to be more conservative.
      .
    • The second reason, they get uploaded to AFH instead of directly here, is two fold:
      1. I'm maintaining the M7, M8, M9 and HTC 10 MultiROM versions, and uploading to AFH is easier and faster for me.
      2. Updating the actual threads and posts, is too time consuming every time I want to push an update.



    1. Main downloads

    Modified recovery (based on TWRP): TWRP_3.0.2-6_multirom_pme_20160920-04.img

    MultiROM Main ZIP: multirom-20160920-v33b-UNOFFICIAL-pme.zip


    Not supported at this time MultiROM Manager Android app: Google Play or link to APK


    AndroidFileHost (mirror & old versions): https://www.androidfilehost.com/?w=files&flid=114470


    2. third-party kernels with kexec-hardboot patch

    None exist at the moment, hence the use of the workaround.

    3. Uninstaller

    MultiROM uninstaller: multirom_uninstaller
    Flash this ZIP file to remove MultiROM from your device. It will erase all secondary ROMs. If you don't want MultiROM menus in recovery, re-flash [RECOVERY][pme] TWRP touch recovery, but it is not needed - those menus don't do anything if MultiROM is not installed.


    Changelog

    MultiROM Managar App:
    Code:
    2016-11-11 MultiROM Manager App[-debug] version
    =====================
    * Add support for external storage
      (allows listing, manipulating, and booting secondary ROMs on external storage)
    * Highlight currently running ROM first
      (also disallow deletion of it)
    * Show ROMs in order of location (Current, then Internal, etc.)
    * Allow duplicate ROM names if on separate partition
    * Fix Widget
    * Support for HTC 10 (pme)
    * Support for HTC One M9 (hima)
    * Support for HTC One M8
    * Support for HTC One M7 (m7univ)

    MultiROM:
    Code:
    2017-10-27 MultiROM v33
    =====================
    * New 'System Partition Mode' ROMs ([URL="https://github.com/nkk71/multirom/commit/dfb1a294ab55374b80bb6f14c2422850610c986d"]technical details[/URL])
    * Android 8.0 compatibility
    * Fix sdcardfs gid derivation ([URL="https://github.com/nkk71/multirom/commit/e0b749567f4ad976a5aabcdbd944f44f9c68b399"]technical details[/URL])
    * vold_decrypt (Decryption on the HTC One M9 and HTC 10)
    * trampoline511 (aka trampolineMk2)
    * New default icons for Android ROMs when not set in app
    * Code fixes and cleanups
    
    
    2016-11-15 MultiROM v33
    =====================
    * Preliminary support for Android 7 (Nougat)
    * Add support functions for MultiROM Manager App
      (allows listing, manipulating, and booting secondary ROMs on external storage)
    * Update no-kexec to version 4.1
        + changes to second boot detection
        + no-kexec versioning to allow auto-updating when needed
        + code cleanup
    * Reboot to recovery on failed data partition mount
      (avoids potentially being stuck in bootloop)
    * Add reboot to recovery button on decryption screen when in second boot
    * Code fixes
    
    MultiROM v33b
    =====================
    * Fix [possible] boot img truncation when used in daisy-
      chaining [older] systemless SuperSU, [B][U]and[/U][/B] rebooting
      directly from AROMA Installer (info to follow later)
    * Fixed mr_init_devices for certain devices (better fix will follow)
    * Fix the auto-boot issue to properly fall back to primary
      when secondary is deleted
    
    MultiROM v33a
    =====================
    * Initial port for the HTC 10 (pme)
    * Updated no-kexec to version 4
    * autoboot: "Use last booted ROM" now works with external ROMs
    
    previous changelogs are in M7/M8/M9 threads
    i'll consolidate at some point hopefully


    Recoveries:
    Code:
    2017-10-27
    =====================
    * Fully merged with official TWRP 7.1 branch
    * New 'System Partition Mode' ROMs ([URL="https://github.com/nkk71/multirom/commit/dfb1a294ab55374b80bb6f14c2422850610c986d"]technical details[/URL])
    * Android 8.0 compatibility
    * Auto detect possible use of legacy props
    * vold_decrypt (HTC decryption on the M9 and 10)
    * Install from backup using a System_Image
    * libbootimg: Updated to support AnyKernel2
    * Fixes for some boot.img patchers
    * Block mount/unmount of secondary partitions
    * Use own loop devices to avoid conflicts with other installers
    * Code fixes and cleanups
    
    
    
    2016-11-15 (33e)
    =====================
    * Fix restorecon for secondary ROMs
    * Rebased on android-7.0 branch
    * Preliminary support for Android 7 (Nougat)
    * Fix no-kexec restore primary_boot.img on devices
      with PIN/Pattern/Password encryption
    * Fix flashing of certain gapps zip's which are
      missing the updater-script file
    [STRIKE]* Add warning on failed injection[/STRIKE]
    * Minor code cleanup
    
    2016-09-20 (33b)
    =====================
    * Fix some installer scripts using certain mount/unmount commands
    * Wake up screen before starting flash (fixes AROMA installer issues)
    * Changed fstab so external ext4 won't get wiped with a factory reset
    
    2016-09-17 (33a)
    =====================
    * initial port for the HTC 10 (pme)
    * Based on TWRP 3.0.2 android-6.0 tree & branch
    * Includes official TWRP commits up to Aug 23, 2016
    
    previous changelogs are in M7/M8/M9 threads
    i'll consolidate at some point hopefully
    19
    FAQ and other notes

    HTC 10 - Peculiarities / Bugs
    • There are no kexec-hardboot kernels for the HTC 10, so you need to have the no-kexec-workaround enabled. Please refer to post 4 for details.
      .
    • A few notes about enabled adb in MultiROM boot menu: having adb enabled in MultiROM boot menu (TWRP->MultiROM->Settings->Enable ADB) may interfere with the ROMs "connection" (MTP, etc), possibly even prevent the ROM from booting (rarely, but I've seen it happen). Since this option is usually only used for debugging, I recommend to keep this option disabled.
      .
    • Secure boot (ie require Password/Pattern/PIN on boot): Thanks to Captain_Throwback who found out, that under certain circumstances (yet to be determined), your primary (possibly secondary as well) may loose the ability unlock your LockScreen using your Password/Pattern/PIN.

      The same thing has been observed in TWRP restores, and although your password is correct and does decrypt your device, it breaks at the lockscreen for some reason.

      I recommend you disable Password/Pattern/PIN on boot until / IF the issue is resolved, but in case you do find yourself in that situation, please go ahead and follow the instruction posted in the TWRP thread:
      10. After I restored my Data backup and boot back to Android, I'm entering the correct PIN/password, but it's telling me the password is wrong. What happened, and how do I fix it?
      • It appears that sometimes after restoring a backup of Data where security was enabled (such as a PIN or password lock), the device does not recognize the correct password. There are two ways to avoid this issue:
        • Disable security in Android before making a backup of data.
        • After restoring Data, while still in TWRP, use the TWRP File Manager to navigate to /data/system and delete all the locksettings.* files (such as locksettings.db, etc). When you reboot, the password will be gone.



    Something not working, or you need help debugging

    Please provide the following information:
    1. a detailed explanation of the problem
      .
    2. the recovery.log (found in /tmp/recovery.log or by copying it to the sdcard and then copying it to PC)
      .
    3. the logs from /sdcard/multirom-klogs (zip those up, before uploading). that option needs to be enabled in TWRP->MultiROM->Settings
      .
    4. the link to the thread and name of file (+ which version) you are having problems with
      .
    5. due to the large size of some of these ROMs, I may not have time to download and test them, so please also upload the updater-script (found in ROM.ZIP under /META-INF/com/google/android/)



    Supported File Systems for secondary ROMs

    Currently only the following partitions can boot secondary ROMs:
    • Internal Storage
      .
    • An external sdcard, properly partitioned with an ext4 partition (see below)

    Partitioning your External SD Card

    Warning: You will loose all information on your external sdcard!!
    There is no way of retrieving that information, so copy everything to your PC before proceeding!!


    In order to make a decent assessment of the size of your ext4 partition, below is a small table of some of the ROMs I've installed to my ext4 partition:
    Code:
    [U][B]2.5G    BeanStalk-6.20-20160905-pm[/B][/U]
    1.1G    BeanStalk-6.20-20160905-pm/data
    1.3G    BeanStalk-6.20-20160905-pm/system
    
    [U][B]1.4G    cm-13.0-20160915-UNOFFICIA[/B][/U]
    396M    cm-13.0-20160915-UNOFFICIA/data
    960M    cm-13.0-20160915-UNOFFICIA/system
    
    [U][B]3.8G    ice-2.1.1_PERFUME_UHL_M60_[/B][/U]
    1.7G    ice-2.1.1_PERFUME_UHL_M60_/data
    2.0G    ice-2.1.1_PERFUME_UHL_M60_/system
    
    [B][U]4.0G    Viper10_3.1.0[/U][/B]
    1.8G    Viper10_3.1.0/data
    2.1G    Viper10_3.1.0/system
    Please bear in mind, those installs have none or very few extra downloaded apps, which would also be using the data partition; if you need a reference for comparison, you can select Backup in TWRP, which will show you the size of your current /data partition (this excludes "Internal Storage")... mine is about 8GB !
    FYI: I'm using a 200GB sdcard, and have it setup with a 30GB ext4 partition... but that's just me :)


    Step 1: Partitioning
    TWRP Main Menu
    1. -> Advanced
    2. -> Partition SD Card
    3. -> selected Micro SDCard
      • Set the EXT Size to the size of your choice
      • Set Swap Size to zero
      • Set File System to ext4
    4. -> swipe to proceed with repartitioning
    go back to the main menu.

    Example Screenshots:
    TWRP Main Screen
    34y2vz8.jpg



    Select Advanced
    sdcs9g.jpg



    Select Partition SD Card, Micro SDCard is selected, press OK
    2vcwe8m.jpg




    • Set the EXT Size to the size of your choice
    • Set Swap Size to zero
    • Set File System to ext4
    2jusfs.jpg

    then swipe to begin


    Partitioning complete
    2n0vmld.jpg



    Step 2 (optional, but recommended): Changing the first partition to exFAT
    The repartitioning in step 1, has formatted your card with two partitions, the first one (used by ROMs as external storage) being FAT32 formatted. Since FAT32 has certain limitations, in particular the 4GB file size limit, it's recommended to reformat it as exFAT.

    TWRP
    -> Wipe
    -> Advanced Wipe
    -> select external_sd or Micro SDCard (whichever is shown in the menu)
    -> Repair or Change File System
    -> Change File System
    -> select exFAT
    -> swipe to reformat the first partition to exFAT

    Example Screenshots:

    Wipe Menu, select Advanced Wipe
    21f0jsp.jpg



    Advanced Wipe Menu:
    select external_sd or Micro SDCard (whichever is shown in the menu)
    and click Repair or Change File System
    4kd25i.jpg



    Select Change File System
    2cgdb1w.jpg



    Select exFAT
    10h252h.jpg



    Swipe to reformat to exFAT
    2ekhbpz.jpg



    Formatting complete
    23w4ets.jpg




    Device encryption
    Since v32, MultiROM supports encryption on this device (it has to be added for each device separately). It works only with Android-based secondary ROMs and the secondary ROMs don't know the device is encrypted, so they would allow you to encrypt the device again - do not do that. If you're using password, pin or pattern for the encryption, MultiROM will ask you for the password on boot. If you're booting the primary ROM, then Android will ask you for the password _again_ - unfortunately, there is no way for me to pass the "unencrypted" status to Android. If you're booting secondary ROM, MultiROM will ask you for the password again after the reboot - that's because I have to unencrypt the /data partition after the ROM's kernel is loaded.

    I could omit the second password prompt when booting secondary ROM by temporarily saving the password somewhere, but that's obviously unsafe. So is using encryption with unlocked device though, so I might add this later.​
    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.​

    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. 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.

    The menu with all the ROMs won't show up during boot, how to fix it?
    Either re-flash the MultiROM zip or go to recovery, Advanced -> MultiROM -> Inject curr. boot sector.

    The reason for this is that something rewrote your boot.img, which happens for example when you flash a kernel. MultiROM's boot menu is part of the boot image, so it has to be added into it again.

    My secondary ROM(s) no longer boot up, after I flashed a new primary ROM / Kernel / boot.img, and the MultiROM menu (as mentioned above) no longer appears
    Please issue a restorecon on the particular ROM:
    TWRP -> MultiROM -> select ROM in question -> Run Restorecon
    2ngr5lu.jpg

    Technical explanation
    Usually most init.rc scripts will run a restorecon_recursive on /data and /mnt(also cache, but that's not too important for us)
    Code:
    restorecon_recursive /data
    restorecon_recursive /mnt
    this will supposedly restore file contexts (permissions if you prefer the older term) on all your data partitions, it will however break all your secondary ROMs as their system partition actually lives there, but the "permissions" have been overwritten to make it look like just normal data.

    This is also why so many Android 7 (Nougat) MultiROM people (in other threads) are having so much trouble, as the file_contexts format has changed, and that hasn't been updated for the new format yet.
    19
    Here's the log twrp generated. I *still* can't get klog generated, no idea why.

    I did a complete removal of multirom folder, no 2nd rom exist, but still cannot boot into even multirom menu. Had to button-combo into recovery.
    Steps:
    1.update to TWRP_3.1.1-0_multirom_pme_20171113-01.img
    2.run multirom_uninstaller.zip
    3.delete any remains of multirom
    4.install multirom-20171113-v33-UNOFFICIAL-pme.zip
    And unable to even see multirom menu.

    Take you time, I appreciated everything you have already done!

    I may have unintentionally built in the wrong tree, Marshmallow decrypt needs to be built in 6.1 due to it's encryption blobs. I on the other hand am building in 7.1 also due to encryption needed by Nougat :eek:

    I've noticed plenty of bug reports, it seems, but unfortunately I cannot replicate on the M8, M9, and U11, so since the 10 is my daily, and very used at the moment, I have no intention of nuking it several times over.


    That being said, I'd like to [now] openly share something with you:

    Although MultiROM is a project close to my heart, and I have to say, I have learned a lot from it due to the way we need to patch things to in order to keep things working.
    Not to mention the amount of *code*, the amount of *TWRP*, the amount of weird stuff I've come up with, I also need to say that this project is slowly but surely coming to a close for me.

    MultiROM has unfortunately become a drain, a source of frustration, rather than a source of excitement and pleasure, with very little to show for either.
    I'm not talking in monetary terms, though nobody minds that either, but rather to some extent a show of respect (actually a big extent), the former of which I do not expect at all (so please don't try), the lack the latter of which has been demonstrated time and again.
    There are now so many *blind builds* around it's amazing :rolleyes:

    I had at one point hoped, to open this project (unlike the original author), to more people, unfortunately, I must now conclude that all those that have joined, from very respected "devs" to complete "newbies" (not noobs, there is a difference), have contributed zero (at least imho) to the shared development.
    To those that have (I can count them on one hand) and are actually reading this, my apologies :angel:

    Remember, that most of my TestBuild(s) are being used on devices I have not even seen before, but are labelled stable. I'm more conservative (probably too conservative), but I've grown tired of fixing things for other people, and not even a simple thanks :(


    I'll probably continue tinkering with MultiROM in the future (yesterday, today, tomorrow, as usual), but for now and perhaps ever, I will not be posting anymore updates.
    It's also why you don't see a MultiROM build for the U11, and although I'm currently running it, there will be no thread, there will be no uploads, even to the people I trust most.

    Even though, I had hoped for one last *decent* update which seems will not ever come to light, I hope you can respect my decision and the "abandonment" of this.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone