lundi 4 mai 2015

[Q&A] MultiSystem for Android topic


MultiSystem is a powerful tool for locked- and unlocked-bootloader Android devices with many features that at least includes the following:

Quote:









  • Keeps stock system partition safe/rooted

  • Permenant root survival with proper use

  • MultiROM support via virtual ROMs

  • Unlimited number of virtual ROMs

  • Booting options to choose stock, primary, or secondary virtual ROM

  • Any of the virtual ROMs can work as a recovery replacement

  • Flashing multiple ROMs at the same time without a reboot

  • Ability to create/install ROMs on Linux to microSD card

  • Great performance & battery life on virtual ROMs

  • Recovery solution to install ROMs or Mods

  • Easy upgrade to newer versions of Android

  • Ability to safely apply OTA updates to virtual system

  • Permissive SELinux and other kernel tweaks

  • Safe flashing that doesn't trip KNOX flag on Samsung devices

  • Wrapper script runs via ADB or a Terminal Emulator on device

  • APK to manage all MultiSystem functions with a nice UI and extra options

  • Management for the best performance & user experience

  • Support for all Android devices with microSD card

  • Portability to almost all devices

  • Compatibility with all Android versions








Quote:









Q&A



Quote:









What is the concept behind MultiSystem?

It runs virtual Android ROMs on microSD, like booting multiple systems on a PC from different partitions/disks. So, your stock system partition is kept safe/rooted. It won't affect performance or anything (might even be better on the virtual system if you've high quality microSD & the device supports its speed). Also, you can freely modify any of the virtual systems & in the worst case, reboot the safe stock system or another working virtual system to recover. So, no root loss or potential damage to the original device partitions.






Quote:









Is it a recovery or an APK tool?

It's a shell script that hijacks system at early boot & force Android to boot from the stock system partition or a virtual system IMG & an APK that manages all booting options, virtual ROMs, and works as a recovery replacement + extra features...






Quote:









Does it work as a recovery replacement?

It IS a POWERFUL recovery replacement. You can do whatever you do in recovery with the APK. HOW? recovery does its magic b/c it doesn't depend on the system & has its own kernel/ramdisk. In MultiSystem, you can boot a virtual ROM from extSD that sure doesn't depend on stock system partition or any of the other virtual ROMs (it does depend on the kernel, which you can't flash on locked devcies anyway). Hence, install, backup, restore, ... & all recovery functions are all possible +++ more features since you're running a full ROM not just a recovery ramdisk like Safestrap.

Bottom Line: I think it's the best & most convenient recovery replacement ever for locked devices & it can also attract unlocked devices for the powerful features, MultiROM, and recovery from within ROM.






Quote:









Can I use FlashFire along with MultiSystem?

Yes. MultiSystem is compatible with FlashFire & fully supports it on stock & virtual ROMs. So, you can use both/any of them for flashing to either a stock or virtual ROM. However, it's recommended to use MultiSystem when flashing to the stock system partition (shouldn't be needed anyway since you can always be safe & flash to your old/new virtual ROMs).





Quote:









Does MultiSystem require FlashFire?

No, MultiSystem doesn't require FlashFire. They're fully combatible though.






Quote:









Would the virtual ROM we install be exactly the one in the stock slot?

In MultiSystem APK, you can create a virtual ROM from stock system, a copy from other virtual ROM, a new IMG, a dev-provided ROM, a flashable .ZIP, ... etc. Literally, your virtual ROMs can be any stock or custom ROM that's compatible with your firmware/kernel.






Quote:









How can it run virtual ROMs from external microSD card?

External MicroSD will be formated into 2 partitions:
  • exFAT or FAT32 for the 1st partition (your new external storage)

  • EXT4 for the 2nd partition (your MultiSystem partition)

It'll hijack the system & boot a virtual system from the 2nd partition. The 1st partition will be automatically detected as your extSD.






Quote:









Can I run unrooted virtual ROM for work apps or any other reason?

Yes. You can add unrooted virtual ROM & reboot to it via MultiSystem APK.





Quote:









How do you boot back into a different ROM?

MultiSystem APK manages all functions including ROM activation & reboot to current system, another stock/virtual system, download mode, recovery, ... etc.






Quote:









Will it be OK to still store media like movies/photos/music to extSD?

100% OK; That's my setup a few months ago. 2 virtual ROMs in the SECOND extSD partition in EXT4 format while all personal data are stored on the FIRST extSD partition in exFAT or or FAT32 format... TWO COMPLETELY DIFFERET PARTITIONS.






Quote:









How much space are we going to have for virtual ROMs?
The size of the 2nd partition is optional (> 4GB) for your ROMs, but here is an estimated sizes:
  • 1 Virtual ROM Uncompressed = ~2.7 GB ---> ready for running

  • 1 Virtual ROM Compressed = ~1.5 GB ---> for full ROM backups

I'd say better allocate 4 GB for each ROM you plan to run. If you just need one virtual ROM to keep stock system safe, 4 GB 2nd extSD partition is enough; The remaining space is allocated for the 1st extSD partition as your external storage.

For me, I run Linux too from extSD via MultiSystem. So, I've 64 GB extSD card with two partitions 32 GB each.






Quote:









Can I clear up space on an existing SD card and partition it while full or will the entire card need to be wiped and partitioned from scratch?

You need to backup all your files; it'll be wiped & repartitioned.






Quote:









How can I swap microSD cards & be able to run virtual ROMs?

You can swap microSD cards as you wish provided that the device is powered off; don't remove the microSD card when running a virtual ROM. If the new microSD card doesn't include a 2nd parition of available virtual ROMs, the device will boot directly to the stock system.





Quote:









Is there a specific sd card you recommended for this?

I personally have two microSD cards:
  • SanDisk Extreme Plus 64GB (Up to 80MB/s read speed)

  • Samsung 64GB PRO (Up to 90MB/s read speed)


You don't have to change your microSD card for MultiSystem; any card you use on the Note 3 should work just fine. The need for more speed is relevant when the device supports that speed & if you're going to buy a new card anyway that you may use with a newer device later.






Quote:









Can I copy virtual ROMs to a new microSD card?

Yes. I'll add a feature for swapping microSD cards so that you can backup/restore virtual ROMs from/to the current extSD to/from internal storage as follows:
  • power off device

  • use MultiSystem APK to backup your virtual ROMs

  • insert the new properly formatted microSD,

  • power on device (it'll boot to stock system)

  • use MultiSystem APK to restore your virtual ROMs

  • use MultiSystem APK to activate one of your virtual ROMs

  • use MultiSystem APK to reboot to any of your ROMs








Quote:









What about other data/cache partitions and internal storage?

Only system img's are in the extSD. All ROMs share all other partitions. This substantially improves the performance & you won't notice any difference between your stock & virtual ROMs. The reason for performance improvement is that EXT4 loop devices are very fast in reading but not in writing. Your system partition is read-only while data (for example) is read write & cache IMGs cause problems like Safestrap issues on ROM slots. Also, you don't have to worry about switching data/settings between ROMs (they're shared), but you just need to regularly backup your important data (which is healthy anyway).






Quote:









Can your elaborate where data is stored?

The userdata partition is also shared; so, you'll have access to all your FULL storage partitions & all apps/data similarly on either stock or virtual ROMs. This also solves the Safestrap issue of having less storage on ROM slots...






Quote:









If virtual systems are read only, how do we modify them? Do we have to boot to another multisystem rom to modify a virtual rom?

The stock system partition is mounted by default read only & so are the virtual systems. To modify a stock/virtual system, the MultiSystem APK remounts them read/write. You can modify the currently running virtual system, copy it & modify the copy, modify another stock/virtual system.






Quote:









How is a corrupted virtual rom handled? Does it see it's bad and default to stock system?

At early boot, MultiSystem checks for the microSD & active virtual ROM to boot it. There's a boot menu that gives you options to select a stock/virtual system, but it crashes on LP. I'm debugging it, but all functions won't be affected if I removed it. To fail safe, you can remove the microSD card to boot to stock system & restore/repair your virtual ROMs.

UPDATE1: MultiSystem v1.0.1 now allows you to also switch to stock system on boot to repair corrupted virtual IMGs or any other reasons. More options will be added during boot to ultimately select another virtual system if the active IMG is not booting normally (e.g., bootloop after applying a mod or flashing a bad .ZIP).

UPDATE2: Now, on boot, you can choose from two primary/secondary virtual ROM or stock ROM. Flashing multiple ROMs at the same time without a reboot is now possible.






Quote:









How to check if an IMG is corrupted using MultiSystem status?


Code:


Current System IMG: Test_Rom.img
Current System DEV: /dev/block/mmcblk0p23


When you see "/dev/block/mmcblk0p23"; it's the original system partition; so MultiSystem failed to boot Test_Rom.img, but it should be your current system.

So, the check is simple based on "Current System Device":
/dev/block/mmcblk0p23 = Stock System Partition
/dev/block/loop0 = Virtual System IMG






Quote:









Does android do any maintenance whatsoever on stored data within /data or external sd? So if I have an app installed on 1 system and not on another system will android see it and clear the data?

No, all storage partitions are shared between ROMs. If you installed an app, it'll be availabe for all of them. Since on locked devcies we're limited to stock manufacturer-based ROMs, this makes the switch between ROMs very convinient (you don't have to worry about your changes/data/setup & storage space on the another ROM; all ROMs share everything except system). However, you should make regular backups in case a virtual ROM (probably with unsafe mods) results in bootloop due to your user data. In this case, it's safe to wipe data & selectively restore apps/data from backup(s). Another advantage of sharing all storage partitions is that your messages/emails/etc received on a virtual ROM are immediated synced (actually shared) to the other ROMs.






Quote:









Will anything like Xposed modify the virtual ROM system IMG as opposed to the stock system IMG?

When you run a Virtual System, everything incldung kernel & apps are hijacked to speak to it as the original system.






Quote:









Can we install AOSP ROMs on locked devices?

You can only install stock/manufacturer-based ROMs on locked devices while unlocked devices can use kexec or flash the required kernel to boot any AOSP/Stock ROMs. I've got a Note 4 Developer Edition & a lot of development is planned to go there (thanks to the unlocked bootloader!) after leaving you here safe & happy with MultiSystem & some virtual ROMs. I'll keep pushing ROM updates for Note 3 whenever possible until my device dies or gets sold!






Quote:









Are there limitations to the combinations of ROMs that can be loaded on the "stock" and "virtual" slots? Can you mix KK and LP?

Yes, if they can run on the same kernel. LP won't run on KK kernels & so, you'd have to upgrade the firmware anyway. As for running mixed compatible Android versions, this is possible but your'd have to backup your data before switching ROMs; if it cause no issues, enjoy smooth switch & if it doesn't, do factory reset in recovery & restore your data backup. Backups via MultiSystem are painless.






Quote:









Are applications installed once for each ROM slot that has that applicaiton installed, or can I share a game across ROMs (for instance?)

Everything is shared between ROMs, which is very good for storage & for easy switching. Just make regular backups of your sensitive data.






Quote:









How there are no performance hits while internal storage memory was much faster than any microSD technology?

Read speeds from microSD is very fast compared to write speeds & since virtual ROMs are actually a virtual read-only systems (hence, MultiSystem), they provide a high performance. Moreover, again, read speeds from EXT4 loop devices are higher compared to physical partitions. They're very bad in writing, which we don't need for the read-obly "system".






Quote:









Is there a preferred "daily driver" ROM that should be installed in the stock slot?

Uses a stock ODEXED ROM on stock slot for better stability!






Quote:









Is it based off of Safestrap?

Short answer NO. I've been working on MultiSystem & Safestrap for ~7 months. Earlier versions of MultiSystem (called, JasmineREC) was based on Safestrap, but it failed to support newer versions of Android mainly due to TWRP changes in the graphics/UI libraries that cause segmentation fault (even made problems for Note 3 Developer Edition on unlocked JB bootloader!) & the stock kernel framebuffer issues. Then, I decided to find another solution. However, the basic idea of system hijack is powered by Safestrap (or 2nd-init recoveries in general) & all the work done by @Hashcode is GREATLY appreciated.






Quote:









How can it overwrite system files while running?

MultiSystem allows you to install safe mod's or a ROM in full or OTA-like update. It's strongly recommended to install .ZIP files NOT to the current system, b/c some files can not be overwritten while running. So, you can use backup function to copy the current system & install to the new img or any of your other virtual systems. You'll have several options to activate a virtual img & reboot directly to stock system, any virtual img you've activated, quick reboot, Download/bootloader, recovery,... etc.






Quote:









How would I benefit from it if I'm only running Stock ROM or would there be no point for me to install it?

If you run a ROM on stock system, you're vulnerable to root loss unless/untill a new rooting method for LP comes out. MultiSystem gives you the option to run safe-to-mod virtual ROMs + recovery replacement + extra features.






Quote:









Is there a way to convert a normal ROM .ZIP into MultiSystem .IMG?

Create or copy any of your IMGs, activate it & reboot to the active IMG! Then, use FlashFire to flash the ZIP file. However, the updater-script should be safe/compatible. Some devs mount the phyical partition, which will redirect everything to it!!

For example:

Code:


mount(“ext4″, “EMMC”, “/dev/block/mmcblk0p23″, “/system”);

will mount the original system partition; while

Code:


run_program("/sbin/mount", "-t", "auto", "/system");

will mount the current system (stock or virtual). This is recommended/safe.






Quote:









Would a KitKat ROM work with multisystem even though my stock is Lollipop?

Any ROM requires a compatible kernel & modem. So, running KK ROMs requires flashing KK firmware (namely, kernel & modem). This may work with MultiSystem on other devices, especially if the bootlpoader is unlocked. For example, I plan to add features for Note 4 DevED to allow different Android versions (including AOSP, manufacturer-based, & probably Linux systems) by utilizing kernel swapping or execution.






Quote:









When MultiSystem comes out will it be open sourced?

Most probably, haven't decided yet!

Anyway, here's the repository on GitHub: https://github.com/hsbadr/MultiSystem










xda-developers