Installing Multirom on Nexus7
The version of Android I used was Lollipop 5.1, the version of Multirom was v32, and the version of TWRP was 2.8.6. I used the TWRP from Multirom package which means it comes with multirom menu within it.
Installing Multirom is the pre-requisite to run FatdogArm on Nexus7.
Skip directly to the steps.
Multirom is a boot-manager that enables us to run multiple operating systems (including multiple versions of Androids) on Nexus7 and its close variants.
Its purpose is a very close to KexecBootMenu which I wrote a couple of years ago, but it is a lot more polished and encompassing - not only it can boot Linux, it can also boot Android. Not only it acts as boot-manager, it also manages the images of the operating systems (aka "firmware" or "ROMs") that it uses for bootin: you can install and remove these operating systems with easy; from either Nexus7 internal MMC or from external USB OTG flash drive.
KexecBootMenu was not too successful because of one BIG problem: many ARM kernels are not compatible with Linux kexec system call. The kexec is effectively a warm-boot: the current kernel loads the new kernel, and then executes it; and hardware is NOT reset during the kernel switching. A lot of the devices on the ARM SoC does not like to be re-initialised for the second time, so when the new kernel starts it will immediately crash because of unexpected behaviour from the devices that is trying to initialise.
Nexus7 which uses Nvidia Tegra3 SoC is no exception. But Vojtěch Boček (tasssadar) - the author of Multirom - found a solution: instead of doing a warmboot, why not doing a cold boot (in his term - a "hard boot")? This will reset all the devices to their initial states, and the new kernel will have no problem re-initialising them later.
Of course, the really hard problem is figuring out how to keep the new kernel stay in memory during a hard boot :) A hard boot means you need to re-initialise the memory controller too, and during that period you can generally expect that memory contents will not be preserved.
Well, Vojtěch is a really smart person and he figured out in certain SoCs (e.g. in Nexus7) that some memory regions is preserved during such cycle. He used to knowledge to patch the Linux kernel kexec and reboot syscall to use that area and modified the warm-reboot process into a hard-reboot process, and you can find his announcement here. (kudos!). He even provided a guide on how to do that on other SoC too! Look here if you want details.
With Multirom, you can do a multi-boot various operating systems without having to permanently install them into Nexus7. You can install and uninstall OS images as you wish, and you can choose which one to use at boot time. It is the ideal choice to run FatdogArm - you can run it when you like it, and run the original Android on your Nexus7,
If you have a compatible device with Multirom, I recommend that you try it. Even if you don't plan to use FatdogArm or other operating system, you can at least try to boot multiple versions of Android ☺
- Pre-requisites: Make sure you have adb version 1.0.32.
Lollipop 5.1 does not accept earlier versions of adb.
This version of adb comes with platform tools r22.
You can either get this by downloading Android SDK and installing it and asking it to update the platform tools to the latest version, or download directly from here: https://dl-ssl.google.com/android/repository/platform-tools_r22-linux.zip
Note that this contains 32-bit binaries, so you will need your 32-bit compatibilty libraries if you run 64-bit Linux.
- Get 3 sets of files from Multirom home page. You will need 4 files:
- Multirom itself (I call this as multirom-grouper.zip)
- TWRP recovery with multirom menus (I call this as twrp-multirom.zip)
- Kernel patched with kexec-hardboot patch (I call this as kernel.zip)
- Multirom application (I call this as multirom.apk)
- Enable your device with developer options, and make sure that it
is fully charged.
- Make sure you can access your "adb" and "fastboot" tool from the
Android platform tools, and that they work.
- Connect your device to your PC with USB cable and test the adb, make sure that "adb devices" shows your Nexus7.
This guide for Lollipop 5.1, so the links given are for those, but the multirom homepage contains binaries for other versions of Androids too; as well as for devices other than Nexus7. You must make sure that you choose the right version for your device and the version of Android you're using. If you are using Cyanogen instead of stock android, he has supports for some versions too.
All done, now is the time to do the actual installation. It is quite straightforward really, just follow the steps:
- Copy all the 4 files into a working directory. Filenames given
here are just representative of their types. Actual filenames
may be different (e.g. have version numbers attached to it).
adb push multirom-grouper.zip /sdcard/
adb push kernel.zip /sdcard/
- Unlock the bootloader
- Reboot your device into fastboot mode
adb reboot bootloader
- Wait until the device restarts and show the fastboot screen
fastboot oem unlock#
- After the device reboot,
adb reboot bootloaderagain.
fastboot flash recovery twrp-multirom.zip
- Then press volume down button, choose "recovery", press power button to confirm
- You will see TWRP screen. From here, choose "install" and install multirom-grouper.zip that you pushed earlier.
- Also install kernel.zip.
- Reboot, if TWRP asked if you want to install supersu choose "yes".
- Reboot back to system, install supersu via playstore or TWRP (I chose TWRP).
- Reboot back to system, then
adb install multirom.apk.
Then it's time to use Multirom to install FatdogArm or any other operating systems supported by Multirom.
I did it this way so I can install Multirom directly from clean, un-rooted device.
- Original article which I used as a guide when I did my first installation:
- FatdogArm supports Nexus7 starting from beta3.