Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Tasssadar
Old
(Last edited by Tasssadar; 16th April 2013 at 09:21 PM.)
#1  
Tasssadar's Avatar
Recognized Developer - OP
Thanks Meter 1299
Posts: 336
Join Date: Dec 2010
Location: Brno

 
DONATE TO ME
Default [MOD][16 APR] MultiROM v10 (updated to TWRP 2.5)

MultiROM is multi-boot solution for Nexus 7. It can boot android ROM while keeping the one in internal memory intact or boot Ubuntu without formating the whole device. MultiROM can boot either from internal memory of the device or from USB flash drive. Some parts (eg. Ubuntu) require patched kernel, more about that later. You can also watch a video which shows it in action.

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, but it is possible that something goes wrong and you will have to flash factory images again. Make backups. Always.

Kexec-hardboot
In v3, MultiROM switched to kexec-hardboot based method of multibooting ROMs with different kernel (thanks Mike Kasick and guys at #ubuntu-arm for kexec-hardboot). This is much cleaner than method used before, but requires patched kernel, on both sides - the kernel whichs is active, and the kernel which is supposed to be multi-booted.
MultiROM will notify you if support for kexec-hardboot is missing and will not allow you boot ROMs which need it (Ubuntu and Android roms which do not share kernel). I've patched stock 4.1 and 4.2 kernels (download in second post) and I am currently trying to get patches into cyanogenmod kernel, but if you use some custom kernel, you need to either compile the kernel yourself, or ask the developer to merge this patch: post with links and explanation.

Installation
Firstly, there are videos on youtube. If you want, just search for "MultiROM installation" on youtube and watch those, big thanks to all who made them.

Note 1: Your device must not be encrypted (hint: if you don't know what it is, then it is not encrypted).
Note 2: There have been reports that (not only) MultiROM does not work properly with older bootloaders. Update it to version 4.13 in case you have problems.
MultiROM has two parts - the multi-boot thingy itself and modified recovery, used to manage MultiROM, you have to install both of these (it does not matter which one will you install first). In addition to that, it requires patched kernel - if you didn't know that yet, read the whole goddamn post you lazybones.
Flash the multirom_vX_n7.zip via recovery and then the modified recovery via fastboot:
Code:
fastboot flash recovery recovery.img
The recovery is built for grouper, but it is hacked so that it can flash ZIP files for both grouper and tilapia. It is like that because it apparently works okay that way, so there is no reason for me to compile 2 recoveries. I however do not recommend flashing OTA updates with this recovery on tilapia.

You current rom will not be erased by the installation.
Download links are in the second post.


Adding ROMs
1. Android
Go to recovery, select Advanced -> MultiROM -> 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 Phone/Touch/Tablet dev preview
See http://forum.xda-developers.com/show...&postcount=104
3. Ubuntu Desktop
Download Ubuntu 13.04 image from here (The biggest one, "raring-preinstalled-desktop-armhf+nexus7.img.gz"). Put the image in the memory of N7 or to USB flash drive and go to recovery. Select Advanced -> MultiROM -> Add ROM and choose "Ubuntu" as ROM type. Then select the Ubuntu's image and confirm. Clean installation of Ubuntu is 1.5gb big, and takes a while (10 minutes?) to install.
The first boot takes a bit longer, and 13.04 stays a while (30-60s) in console ("Enter login:") before the GUI shows up, so just wait a while.
Ubuntu ROM must not have spaces in name!
Using Ubuntu on N7, Frequently Asked Questions

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.

Uninstallation
Re-flash boot.img somehow, either get it from your ROM's installation zip and flash via fastboot or restore from backup. If you want to erase ROMs installed to multirom, erase folder /sdcard/multirom.

Updating/changing ROM in internal memory
First, make that internal ROM is active - simply boot it. Then, go to recovery and install ROM's zip file. Finally, do Advanced->MultiROM->Inject curr. boot sector.

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.

Settings
The only settings so far is to set ROM which is booted as default.

Source code
MultiROM - https://github.com/Tasssadar/multirom/tree/nexus7 (branch nexus7)
Modified TWRP - https://github.com/Tasssadar/Team-Win-Recovery-Project (branch nexus7)
Installer - https://github.com/Tasssadar/multirom_installer
Stock kernel w/ kexec-hardboot patch - https://github.com/Tasssadar/kernel_...kexec-hardboot
CM kernel w/ kexec-hardboot patch - https://github.com/Tasssadar/android...l_asus_grouper

Donations
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
Attached Thumbnails
Click image for larger version

Name:	screenshot.jpg
Views:	4270
Size:	59.8 KB
ID:	1864685   Click image for larger version

Name:	screenshot_14.jpg
Views:	3996
Size:	85.4 KB
ID:	1864686   Click image for larger version

Name:	screenshot_09.jpg
Views:	3680
Size:	49.9 KB
ID:	1864687   Click image for larger version

Name:	screenshot_10.jpg
Views:	3597
Size:	125.4 KB
ID:	1864689   Click image for larger version

Name:	screenshot_11.jpg
Views:	3595
Size:	71.8 KB
ID:	1864690  

Click image for larger version

Name:	screenshot_12.jpg
Views:	3528
Size:	73.1 KB
ID:	1864691   Click image for larger version

Name:	screenshot_13.jpg
Views:	3257
Size:	83.8 KB
ID:	1864692  
MultiROM (Nexus 7) | MultiROM (LG P500) | My github
You like MultiROM? Maybe you'll also like donate to me button, try it out. Thanks
BTC: 172RccLB2ffSnJyYwjYbUD3Nx4QX3R8Ris
The Following 277 Users Say Thank You to Tasssadar For This Useful Post: [ Click to Expand ]
 
Tasssadar
Old
(Last edited by Tasssadar; 11th May 2013 at 08:38 AM.)
#2  
Tasssadar's Avatar
Recognized Developer - OP
Thanks Meter 1299
Posts: 336
Join Date: Dec 2010
Location: Brno

 
DONATE TO ME
Download
That thing below is changelog. Read it and don't post questions asking "what's new". Recovery changelog is there, too.
If you already have older version of MultiROM installed, just flash the newer version over the old one, no need to uninstall or something.
Do not use recovery themes, else you won't see MultiROM menu.

MultiROM: multirom_v10_n7-signed.zip (md5 bc79ae7e5e4f1543375e7870a1d9b909)
Modified recovery (TWRP 2.5.0.0): TWRP_multirom_n7_20130416.img (md5 fafa2d33f2d967b9c7eebc759c4e0462)

Kernel w/ kexec-hardboot patch (stock 4.1.x): kernel_kexec_41-2.zip
Kernel w/ kexec-hardboot patch (stock 4.2): kernel_kexec_42-2.zip
Kernel w/ kexec-hardboot patch (stock 4.2.2): kernel_kexec_422.zip
Kernel w/ kexec-hardboot patch (CM 10.1): kernel_kexec_cm101-3.zip
3rd party kernels with kexec-hardboot patch:
motley - http://forum.xda-developers.com/show....php?t=1775798
intersectRaven - http://forum.xda-developers.com/show....php?t=2065901
M-kernel - http://forum.xda-developers.com/show....php?t=1937146
Trinity Seven - http://forum.xda-developers.com/show....php?t=1788759
Omega 3 kernel - http://forum.xda-developers.com/show....php?t=2093175
vorcers' kernel - http://forum.xda-developers.com/show....php?t=2107224
franco.Kernel - http://forum.xda-developers.com/show....php?t=1823671
DMORE.Kernel - http://forum.xda-developers.com/show....php?t=2173411
Timur's Kernel (USB host power management) - http://rootzwiki.com/topic/37755-tim.../#entry1137968

Linux ROMs (Bohdi, Plasma Active, ...) packed for MultiROM: http://forum.xda-developers.com/show....php?t=2093797

Changelog
Code:
MultiROM v10
=====================
* Non-error message boxes aren't red now
* Add possibility to switch between several color themes, go
  to misc tab and try it out
* New MultiROM installer format
* Add "discard" option to /data mounting
* Add battery status to misc tab (bottom right corner)
* Add brightness setting
* Implement ADB

MultiROM v9
=====================
* Make it compatible with LZ4 ramdisk compression
* Improve touch-related code. You should not get anymore phantom
  button presses nor listview freezes

MultiROM v8
=====================
* Fix kexec-hardboot with new bootloader v4.18
* Search for already present USB drives on start
* Centre "MultiROM" title in main UI

MultiROM v7
=====================
* Correctly boot Ubuntu after recent kernel update.
  Read this post: http://forum.xda-developers.com/show...postcount=1031
* Remove specific support for Ubuntu - it is now handled
  as "generic linux" (with rom_info.txt file). Nothing should
  change for the users
* Sort ROMs alphabetically
* Add "progress dots" to USB screen, so that user knows
  that it is doing something
* Recovery was also updated, don't forget to flash it

MultiROM v6
=====================
* Properly check for kexec-hardboot patch in kernel
* Internal" is always first in ROM list now, as originally intended
* Much more logging for kexec-related stuff
* Print last 50 lines of klog to "Emergency reboot" screen

MultiROM v5-2
=====================
* Fix ubuntu
* MultiROM still says it's v5. I did not change the version number
  because it is literally one character fix.

MultiROM v5
=====================
* Support for ROMs with configuration file. This makes porting
  Ubuntu/plasma/webos/anything much more easier. See the third post.
* MultiROM will no longer let you boot Ubuntu ROM if it's name
  contains spaces, because the boot would fail.

MultiROM v4
=====================
* Fix GPS on ROMs other than Internal
* Minor UI changes

MultiROM v3
=====================
* Switch to Ubuntu 13.04. Version 12.10 is no longer supported
* Switch to kexec-hardboot based multi-booting. Read the first post.
* Add support for booting from USB drive
* MediaScanner no longer scans /sdcard/multirom, which means
  no useless battery drain
* Recovery was updated, make sure to flash it, too.

MultiROM v2
=====================
* Add support for Ubuntu on 3G version of Nexus 7
* Fix some issues with 4.2 ROMs
* Recovery was updated, make sure to flash it, too.

MultiROM v1
=====================
* Initial version

Recoveries:
Code:
16.4.2013
=====================
* Fix "Add ROM" option not properly installing /data partition from
  backup, if the backup is bigger than 1.5gb
* Make names of ROMs created from Android Backup prettier

9.4.2013
=====================
* Update to TWRP 2.5.0.0

4.4.2013
=====================
* Add support for MultiROM installer format
* Add new MultiROM settings (brightness, adb)

12.3.2013
=====================
* Updated to TWRP 2.4.4.0
* Add support for LZ4 & LZMA ramdisk compression
* Add some handy buttons to "flash complete" page,
  thanks ikslawlok for suggestion

2.3.2013
=====================
* Fix freeze when selecting ROM in "Add ROM" option
  in MultiROM menu

1.3.2013
=====================
* Updated to TWRP 2.4.3.0

27.2.2013
=====================
* Fix recovery kernel, so that you can boot linux ROMs even if
  kernel in internal memory has older kexec-hardboot patch
* Enable brightness settings from TWRP

26.2.2013
=====================
* Updated to TWRP 2.4.2.0
* Add fast scrollbar to fileselectors
* Voldown to turn off screen ("sleep" mode)

22.2.2013
=====================
* Fix Ubuntu Touch installation with 
  combination of 4.2 as Internal ROM

21.2.2013
=====================
* Don't copy the ZIP to RAM while flashing ZIPs bigger
  than 450 MB (currently only Ubuntu touch) in "Add ROM"
  or "Flash ZIP" options. This prevents crash which would appear
  due to low memory, but also means that these ZIP files
  will be modified, which makes them unusable outside MultiROM
  after flashing.
* Add Ubuntu touch support

2.2.2013
=====================
* Update to TWRP 2.4.1.0
* Don't reset ROMs location in "List ROMs" when going back
  from managing ROM to the ROM list
* Fix recovery crash when there is too deep directory structure
  in /data, thanks rifraf for debugging this

30.1.2013
=====================
* Update to TWRP 2.4.0.0
* Properly disable flash-kernel during Ubuntu installation.
  This is important fix, because without it, Ubuntu
  can rewrite your boot.img.
* Add option to wipe /data, /cache and dalvik-cache
  of secondary Android ROMs
* Use gnutar binary compiled specifically for tegra 3,
  means faster installation of Ubuntu
* Add "pressed" effect to all buttons, so that you know
  if you pressed it or not.
* When installing Android ROM from ZIP which does not have
  boot.img (armoma installer...), try to use current boot sector
  instead of boot.img. The ROM may not boot, so you should always
  add boot.img which is compatible to the ZIP file.
* Update to keep up with MultiROM v7

20.12.2012
=====================
* Fix "Add ROM" for backups in internal memory
------------------------------------------
* Update TWRP to 2.3.3.0
* Add option to Add ROM from backups
* Should be able to flash ZIP files for both grouper and tilapia

18.12.2012
=====================
* Update to support MultiROM v3

2.12.2012
=====================
* Fix "flash zip" option for ROMs without whitespace in name. I've accidentally broke it in previous update, sorry :/

29.11.2012
=====================
* Fix "flash zip" option for ROMs with whitespace in name

25.11.2012
=====================
* Add Ubuntu support for Nexus 7 3G

24.11.2012
=====================
* Initial version
MultiROM (Nexus 7) | MultiROM (LG P500) | My github
You like MultiROM? Maybe you'll also like donate to me button, try it out. Thanks
BTC: 172RccLB2ffSnJyYwjYbUD3Nx4QX3R8Ris
The Following 93 Users Say Thank You to Tasssadar For This Useful Post: [ Click to Expand ]
 
Tasssadar
Old
(Last edited by Tasssadar; 6th January 2013 at 05:58 PM.)
#3  
Tasssadar's Avatar
Recognized Developer - OP
Thanks Meter 1299
Posts: 336
Join Date: Dec 2010
Location: Brno

 
DONATE TO ME
Making linux based ROMs
compatible with MultiROM
There is more detailed info about that at MultiROM's wiki: https://github.com/Tasssadar/multirom/wiki

Porting to another device
From post 542:
Quote:
This was not made with multiple devices in mind, like eg. recoveries are. I am not sure about what would have to be changed about the actualy multi-booting stuff, but certainly the UI is not made "portable" - it will not work with any other resolution than 1280x800. As for the rest - you would need kexec(-hardboot?) working on that device, and maybe the /data partition related code would cause some problems.

The reason why I don't do this for multiple devices is that I am just a student, and I would not be able to maintain it. I have to do a ton of other stuff, plus the school, which gets neglected all the time, which of course shows on my marks.
Multi-booting is also probably a bit different on each device, and finally, I don't want to do something for a device which I don't have - it just does not feel good, because I am not able to test anything.
How is it done (for developers)
Let's look at android boot process:
Code:
bootloader -> kernel -> init binary -> Android
After kernel is started, init binary mounts all partitions, creates all necessary files and starts Android. Now, how does it look with MultiROM:
Code:
bootloader -> kernel -> multirom -> init binary -> Android
MultiROM starts right after kernel, instead of the init binary. It shows the boot menu, and either does nothing (in case the user selected internal ROM) or...

1. Multi-booting android
This is rather simple, because all the mounting is done in *.rc files. All you have to do is bind /system, /data and /cache to folder on sdcard and remove mounting from rc files. If the ROMs do not share the kernel, sselected ROM's kernel is loaded using kexec, the device is rebooted and the "select ROM" menu will not show up, it will do the mount -o bind stuff and boot the ROM user selected before reboot.

2. Multi-booting ubuntu
This is a bit different. Ubuntu is patched during installation, so that the only thing I have to do in MultiROM is to load Ubuntu's kernel, initrd and correct cmdline using kexec. The device is then rebooted, and MultiROM does not even run - it is all just ubuntu with correct cmdline parameters.

So what does MultiROM do?
It acts as the boot manager - user can select which ROM to boot, and it then either does nothing, changes android's *.rc files so that they do not mount /system, /data and /cache by themselves or calls kexec.

If you have any questions about how this works, don't be afraid to ask.
MultiROM (Nexus 7) | MultiROM (LG P500) | My github
You like MultiROM? Maybe you'll also like donate to me button, try it out. Thanks
BTC: 172RccLB2ffSnJyYwjYbUD3Nx4QX3R8Ris
The Following 65 Users Say Thank You to Tasssadar For This Useful Post: [ Click to Expand ]
 
Kidromulous
Old
#4  
Kidromulous's Avatar
Senior Member
Thanks Meter 260
Posts: 860
Join Date: Feb 2011
Location: Durham N.C.
Holy .....

Sent from my Nexus 7 using Tapatalk 2
The Following 2 Users Say Thank You to Kidromulous For This Useful Post: [ Click to Expand ]
 
king_josh60
Old
#5  
king_josh60's Avatar
Senior Member
Thanks Meter 9
Posts: 106
Join Date: Dec 2011
Location: birmingham
thats nice, booting different roms when ever you want, thanks
 
Ryan_Shea
Old
#6  
Ryan_Shea's Avatar
Member
Thanks Meter 5
Posts: 49
Join Date: Aug 2012
Location: Atlanta

 
DONATE TO ME
Wow this is epic....Ive always wanted Ubuntu on my n7.

sent from my paranoid nexus 7
PHONE
Galaxy prevail
Cm7beta by hoark

TABLET
8gb Nexus7
PA2.99b3
m+ a14
 
azoller1
Old
#7  
azoller1's Avatar
Senior Member
Thanks Meter 998
Posts: 1,480
Join Date: Aug 2011
Location: Lenexa
The day has come....this is awesome!!

Sent from my Full Linaro-Android on Grouper using Tapatalk 2
DONT FORGET TO PRESS THE THANKS BUTTON!!

Device: LG Spectrum 16GB 4G
Rom: Running My Own Icy Fusion ROM
Kernel: Running Ortriggers Kernel

Device: Nexus 7 16GB
Rom: Running My Own Xylon Fusion ROM
Kernel: Running Imoseyon LeanKernel

MY DEV
GOO.IM FILES/FOLDERS
DEV-HOST FILES/FOLDERS

G+ COMMUNITY GOOGLE+ TWITTER FOLLOW
The Following User Says Thank You to azoller1 For This Useful Post: [ Click to Expand ]
 
Ryan_Shea
Old
#8  
Ryan_Shea's Avatar
Member
Thanks Meter 5
Posts: 49
Join Date: Aug 2012
Location: Atlanta

 
DONATE TO ME
Has anyone done this yet? I'm a little nervous to try this. I really want to though just don't want to be the first as im still relatively new to adb

sent from my paranoid nexus 7
PHONE
Galaxy prevail
Cm7beta by hoark

TABLET
8gb Nexus7
PA2.99b3
m+ a14
 
Urabewe
Old
#9  
Urabewe's Avatar
Senior Member
Thanks Meter 136
Posts: 568
Join Date: Oct 2010
I will certainly be trying this out later. Thanks, will report back with my experience.
Slowly working my way back into the scene.
 
ericdjobs
Old
#10  
Senior Member
Thanks Meter 300
Posts: 169
Join Date: Apr 2012
Absolutely amazing. Definitely going to give this a shot. Awesome work.

 
Post Reply+
Tags
dualboot, multiboot, multirom, ubuntu
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...