Secondary ROM Flashing for MultiROM [TUTORIAL] [DECRYPTED ONLY] [OREO COMPATIBLE]

shadowstep

Forum Moderator
Staff member
Jun 6, 2014
4,178
7,861
263
30
Ambala
Introduction

Hello everyone! In the past few days, I was approached by a few people wanting to know the steps I take to successfully flash a ROM as a secondary ROM in MultiROM. Since there seems to be many people interested in trying out new ROMs while still keeping their daily-driver primary ROM untouched, I decided to make this thread for those interested. The following is a tutorial to modify a TWRP flashable ROM zip to make it compatible with MultiROM and then flashing it as a secondary ROM. Let's get straight to it then!

Compatibility
Device(s)
  • OnePlus 5
ROM(s)
  • Mostly All ROMs (in theory, at least, hence mostly)
Android Version(s)
  • Android Nougat 7.x.x
  • Android Oreo 8.x.x
Prerequisites
  • Basic knowledge about TWRP flashing, fastboot flashing, zip editing, MultiROM usage, etc.
  • A working fastboot interface on your computer
  • Zip-editor installed on your computer (I prefer Bandizip)
  • Unlocked bootloader (how-to guide here)
  • Unencrypted/decrypted system (how-to guide here)
Steps To Follow

Step 1: Create a new folder on desktop (or wherever you prefer) and download the following stuff in it:
  • The flashable ROM zip that you wish to modify to use a secondary ROM in MultiROM
  • update-binary.zip (attached at the end of this post)
  • The latest MultiROM recovery and MultiROM zip (available here)
  • An updated copy of the latest SuperSU (available here)
Step 2: Extract the update-binary.zip file after which you will get the modified update-binary file that we have to use

Step 3: Open the downloaded ROM zip in the zip program that you use and inside it, navigate to META-INF\com\google\android

Step 4: Delete the existing update-binary that you see there and replace it with the update-binary that you extracted in step 2

Step 5: Save the modified zip (this is now the modified ROM zip that can be flashed as a secondary ROM via MultiROM)

Step 6: Copy the modified ROM zip, the SuperSU zip and the MultiROM zip that you downloaded in step 1 to your phone's internal storage

Step 7: Reboot your phone to the bootloader mode and connect it to your computer

Step 8: Open command prompt and navigate to the folder where you've downloaded the MultiROM TWRP image file

Step 8: Run the following command to flash MultiROM TWRP to your phone's recovery partition:
Code:
fastboot flash recovery TWRP_multirom_cheeseburger_20170919-03.img
Step 10: Once the flashing is successful, reboot to the bootloader mode again using the command:
Code:
fastboot reboot-bootloader
Step 11: Press the volume down button until you see "Recovery mode" on your phone's screen and then press the power button to boot to recovery

Step 12: Once you're in the recovery mode (running MultiROM TWRP), flash the MultiROM zip first and then reboot your phone to recovery

Step 13: Once the phone has rebooted to the recovery mode, open the MultiROM menu (three parallel horizontal lines on the top right of your phone's screen) and click on the "Add ROM" option

Step 14: Select the modified ROM zip and flash it (choose the "internal memory" option if it prompts for a partition to flash the secondary ROM in)

Step 15: Once done, hit back to open the MultiROM menu, then click on the "List ROMs" option and select the ROM that you just installed

Step 16: Once you select the ROM that you just installed, select the "Install Zip" option and flash the SuperSU zip

Step 17: Once the SuperSU zip is flashed, reboot your phone to system and you will notice a new selection menu is now displayed before the phone boots into the system

Step 18: Select the new ROM that you just flashed as the secondary ROM to boot to it

Step 19: The phone will bootloop a couple of times - DON'T WORRY, THIS IS NORMAL AFTER FLASHING SUPERSU - and in between the reboots if you see the ROM selection menu appear again, just select the newly flashed ROM and let it continue

Step 20: It should boot into your secondary ROM after a couple of bootloops/reboots!

Disclaimers
  • You are doing this at your own risk. I am not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed. Please do some research if you are unsure of how to go about something. Also, please don't forget to make a full nandroid backup via TWRP in case anything goes wrong.
  • The above method works for me 99% of the time, but there are a few ROMs that I wasn't able to boot as secondary no matter what I tried. If a ROM doesn't boot as secondary for you using the tutorial above, I'll try my best to help you, but I may or may not succeed.
  • I haven't tried the above method with Magisk instead of SuperSU. If you wish to try, feel free to do so at your own risk.
  • Flashing of the secondary ROM will most probably corrupt your primary ROM's password/pin (if you have one setup). If you can't get into your primary ROM after flashing the secondary ROM using your password/pin, flash this zip in TWRP which will remove your lockscreen security settings (but won't touch your fingerprints, if you have any setup).
Thanks To
  • @martinusbe for adapting MultiROM (recovery, installer zip, manager application, uninstallation zip) to OnePlus 5
  • @Chainfire for SUperSU and all the work he's ever done for the community
  • All of you guys for viewing this thread

Changelog
  • December 26, 2017 - Initial post

OP Update Information
Created: December 26, 2017
Last Updated: December 26, 2017
 

Attachments

shadowstep

Forum Moderator
Staff member
Jun 6, 2014
4,178
7,861
263
30
Ambala
Thanks, but can I have official Oreo in primary rom and an other rom in secondary?
Should work, yes. I tested the steps with a Nougat primary ROM and an Oreo secondary ROM; worked fine. So the setup you're looking for should also work. Give it a shot! :)
 

shadowstep

Forum Moderator
Staff member
Jun 6, 2014
4,178
7,861
263
30
Ambala
can i use magisk instead of supersu ?
Already mentioned this in the OP (Point 3 under Disclaimers). I haven't tested the method with Magisk in place of SuperSU.

This is because when I was initially trying to figure all this out, most of the stuff that I was going through pointed out that Magisk wasn't doing too well with the secondary ROM and hence I just chose SuperSU; didn't even bother testing Magisk when SuperSU worked fine.

If you wish to test, go for it. Should do no harm. :)
 
  • Like
Reactions: kimikim0

billsz

Senior Member
Jan 8, 2014
92
32
0
shenzhen
primary system can't boot when i flash multirom zip file into oos oreo as primary,and for other 8.0 roms as primary,secondary 8.0 roms boot with primary system,same like dual boot patcher,only work with gzosp based 8.0 roms as secondary
 
  • Like
Reactions: oF2pks

shadowstep

Forum Moderator
Staff member
Jun 6, 2014
4,178
7,861
263
30
Ambala
primary system can't boot when i flash multirom zip file into oos oreo as primary,and for other 8.0 roms as primary,secondary 8.0 roms boot with primary system,same like dual boot patcher,only work with gzosp based 8.0 roms as secondary
I haven't tested the method with OOS 5.0 Oreo as my primary ROM. When I last tested, I was running a custom Nougat based ROM (AOSiP) and with that I tested multiple Oreo based custom ROMs (after modifying them, of course, as mentioned in the tutorial) as secondary ROMs and they all worked fine. Not to mention, of course, that if you don't modify the ROM zip files with the updater-binary file I attached in the OP, then it just won't work.
 

Garfanki

Senior Member
Apr 21, 2015
300
25
0
I would like to have os stable Oreo as primary ROM and other Oreo build as secondary ROM, but the installation of secondary rom fails... Why? Is not possibile have 2 ROMS with Oreo?
 

oF2pks

Senior Member
May 22, 2016
755
1,051
113
Any help?
https://forum.xda-developers.com/showpost.php?p=74636311&postcount=702
Actually, after Oos Oreo 8.0 upgrade, primary via MultiROM.zip won't boot anymore; there were 2 evolutions since OP5 'old' multirom:
1-Magisk support for 2nd roms
2-Encryption support for 2nd roms WITH rebranded data/media/0/multirom directories
I tried rebuilding both : 1) doesn't boot (like 'old'), and 2) boots primary via latest Multirom, BUT 2nd always reboot to recovery, despite working installation files (Magisk/sparse img or not) and decrypted device.
Also, OP5 adbd never worked for MultiROM neither log. So waiting for a skilled (new un-/encryption Oreo status) dev to follow AdrianDC sd820 latest MultiROM : https://github.com/XperiaMultiROM/android_device_sony_dora/tree/master/multirom , considering that there is no working MultiROM for any sd835 yet...
(Kexec-ed kernel would even be better...)

Most powerful is EFIdroid due to our new bootloader edk2, but here: dev/bricks are unrecoverable...

The 'funky' thing is that I got intermediate 1) working 100%, for antic p880 device with Magisk/sparseImg support ok for 2nd roms.
 

Garfanki

Senior Member
Apr 21, 2015
300
25
0
Thank you, so I must wait... Happy New Year!



https://forum.xda-developers.com/showpost.php?p=74636311&postcount=702
Actually, after Oos Oreo 8.0 upgrade, primary via MultiROM.zip won't boot anymore; there were 2 evolutions since OP5 'old' multirom:
1-Magisk support for 2nd roms
2-Encryption support for 2nd roms WITH rebranded data/media/0/multirom directories
I tried rebuilding both : 1) doesn't boot (like 'old'), and 2) boots primary via latest Multirom, BUT 2nd always reboot to recovery, despite working installation files (Magisk/sparse img or not) and decrypted device.
Also, OP5 adbd never worked for MultiROM neither log. So waiting for a skilled (new un-/encryption Oreo status) dev to follow AdrianDC sd820 latest MultiROM : https://github.com/XperiaMultiROM/android_device_sony_dora/tree/master/multirom , considering that there is no working MultiROM for any sd835 yet...
(Kexec-ed kernel would even be better...)

Most powerful is EFIdroid due to our new bootloader edk2, but here: dev/bricks are unrecoverable...

The 'funky' thing is that I got intermediate 1) working 100%, for antic p880 device with Magisk/sparseImg support ok for 2nd roms.
 

Garfanki

Senior Member
Apr 21, 2015
300
25
0
Good evening, I try to flash flyme rom (downloaded by chinese forum) as secondary rom but the installation fail... Any idea?

Error 7
 
Last edited: