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.
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 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
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:
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.
New Mobile Operating System Jolla Sailfish‘s … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?