Hi,
I posted this in the 'Wildfire S general' forum but despite about 600 reads I had zero replies so Im hoping a dev can help.
I have searched for the answer to my question so if I have just missed a posting please direct me to it...
I have CWM 5.0.2.8 on my Wildfire S. This phone uses yaffs2 filesystems.
I can backup and restore via CWM with no problems.
If I backup my phone (yaffs2) and then flash a custom ROM that uses a different type of filesystem (ext3 or ext4) will CWM be able to reformat my phone as yaffs2 as it restores it to its original state??
I have seen various posts, some saying this feature is included in CWM and works, others saying it doesnt.
Has anyone actually done this and if so can you let me know if it works or not with CWM 5.0.2.8.
Otherwise I assume I could try to flash a ROM that uses yaffs2 and then restore but Im reluctant to mess about too much in case I make a fatal bodge that renders my phone either unable to get back to its current state or end up flashing an RUU which (from some research) would maybe relock the bootloader on my phone and make it impossible to re-unlock again via HTCDEV.
Or is there a way to revert ext3/4 back to yaffs2 before a restore takes place, eg some other recovery, Ive seem a recovery that can go from ext3 to ext4 and vice versa but havent found one that can go yaffs2 to ext3/4 and vice versa.
Regards,
Scott
I didn't know our phones use yaffs. But to better understand I'll ask. Wtf are you trying to do? Are you trying to run a rom in a non native file system? Or are you trying to restore files from one system to another. And also, you are talking about the sdcard and not any sort of internal memory right? I'm not a dev but I'll sure try to help.
Sent from my HTC_A510c using Tapatalk
Hi,
Thanks for the reply. Im pretty sure it is yaffs2 as the CWM backups have yaffs2 in the filename ansd when I issue a 'mount' command it shows it as yaffs2.
So what I am planning on doing is flashing a custom ROM. I believe that custom ROM's often use ext4.
If I want to revert back to my current ROM (stock HTC - rooted) then can I just restore a CWM backup or will it complain (ie fail) if the filesystem type is different from when the backup was taken.
I read that CWM had a change put in (I forget in which version) that allows it to revert filesystems back to the type they were when the backup was taken but Im not 100% sure on this - hence my question.
If it wont recreate/revert the filesystem back to yaffs2 then I will think about other options to do this, eg flashing a stock ruu etc - but I want to avoid that if possible, I'd prefer to just do a CWM restore.
One last question - when do the filesystems get created, I assume its part of the flashing of a ROM that does it - I cant see it would happen any other time.
Regards,
Scott
BTW Im talking about internal filesystems, /system etc.
Regards,
Scott
All the custom roms for the wildfire s are in yaffs2 format if you want to run a rom using ext4 for example you will need to convert yaffs2 to ext4 and edit the boot.img to mount the partitions correctly.
As for restoring a yaffs2 backup cwm will reformat all partitions back to yaffs2 the only way cwm can format it the any other format is by editing the recovery.img mount commands to the format you want to use.
Sent from my HTC Wildfire S using xda premium
eoghan2t7 said:
All the custom roms for the wildfire s are in yaffs2 format if you want to run a rom using ext4 for example you will need to convert yaffs2 to ext4 and edit the boot.img to mount the partitions correctly.
As for restoring a yaffs2 backup cwm will reformat all partitions back to yaffs2 the only way cwm can format it the any other format is by editing the recovery.img mount commands to the format you want to use.
Sent from my HTC Wildfire S using xda premium
Click to expand...
Click to collapse
Thanks Eoghan,
That makes much more sense to me now.
I assume from your reply that custom roms, at least for the wildfire s, dont actually have to create/format the filesystems at all, they just rely on the ones already in place.
One thing im just a bit unclear on, you say
'You will need to convert yaffs2 to ext4 and edit the boot.img to mount the partitions correctly'
Where would I do the convert, can it be done as part of the rom flash/install so I would actually need to alter the rom source code, or would I need to alter the current filesystems via flashing an update file via cwm or by using adb commands.
Im used to IBM's AIX flavour of unix so android is still a bit of an unknown to me.
TIA,
Scott
How to convert yaffs to ext4 ?
Marvel Custom
junxracr said:
How to convert yaffs to ext4 ?
Marvel Custom
Click to expand...
Click to collapse
im working on the converters at the moment while building roms/kernels so it might take awhile before i get a converter in place.
Hi,
Sorry for the long post - its really me writing down my thoughts but if anyone wants to reply I would be grateful but I dont expect it...
So Ive looked in the boot.img and there is an init.rc that looks to do all the mounts, so I understand that.
The initial yaffs2 filesystems that are defined when the phone is just 'out the box' must just somehow be setup by the HTC install/config process - so Im fine with that.
In recovery.img I see a few scripts and then most other files are symbolic links which link to busybox which in turn links to a binary file called 'recovery. And a few symbolic links actually link directly to the binary recovery.
Now things get hazy for me, I know busybox lives in /system/xbin - so Im unsure how it gets into recovery.img as a symbolic link to the 'recovery' binary. Either its when running the CWM backup that CWM searches for busybox and sets these links up (but why) or perhaps these links are actually all part of the CWM flash - again why?
What does busybox need to be in the recovey.img for, especially as its just a symbolic link to the 'recovery' file. Does CWM actually call busybox (and therefore the 'recovery' file gets called) to do things like format the filesystems.
But I cannot see a command that looks like it would format a yaffs2 filesystem. I can see commands that create and restore a yaffs2 image though but these are linked to 'recovery' and not 'busybox' so its not like CWM is relying on calling busybox at this stage.
Then I wonder, if I do convert everything to ext2 (for example) - CWM backs it up as ext2, then I assume as its backed up as ext2 it restores as ext2 - unless on WFS it just cannot do that, ie CWM is different for every phone it runs on and it just wont do this.
Regards,
Scott
Hey guys, I have got a technique to Backup, format and restore your whole sdext2 / Sd-ext partition through Recovery in case you were unable to find a recovery to backup and restore this partition; and as far as I know there is no single recovery out there till date that can directly Backup and restore this partition on Grand. So if you need this please ask here and I will help you out.
Need help.
Gautam Gundap said:
Hey guys, I have got a technique to Backup, format and restore your whole sdext2 / Sd-ext partition through Recovery in case you were unable to find a recovery to backup and restore this partition; and as far as I know there is no single recovery out there till date that can directly Backup and restore this partition on Grand. So if you need this please ask here and I will help you out.
Click to expand...
Click to collapse
Can your method be used to backup sdext2 on other mobiles? I have got Micromax Canvas Power A 96 and Lenovo A 7000. Please provide me the necessary steps and information, so that I will give it a try and see if it is successful.
Thank you
Yes you can. This method is only for the android smartphones where the recovery does not support sd-ext/sdext2 backup, format and restore. If your device has an official or unofficial recovery on xda forum that supports sdext2/sd-ext then it can be done directly from the recovery menu options and this method is not required. If not follow the below steps
1. Find a recovery on the web/xda for your specific device that supports any file manager directly through recovery which has an option for terminal/bash command inputs and execution. Even if the recovery does not have a file manager support but has the terminal/bash command facility then that will do. Philz touch/non touch recovery for your specific device should support this. It has aroma file manager with terminal/bash commands support. I hope you know how to install a recovery img/partition on your device
2. Depending upon which app you are using for sdext2/sd-ext partition to handle, you will find a file under init.d directory for mounting this partition. This file contains script commands for mounting this partition. You need to edit this file and find the script command. For example if you are using link2sd on galaxy grand then the script command is mount -t ext4(your partition type) -o rw(permissions set) /dev/block/vold/179.10(this is the allocated partition address for your sdext2/sd-ext partition specific to your device and will be different for different devices) /data/sdext2.
3. If you want to do a full backup then reboot into recovery go to file manager and command prompt and type the mount script for sdext2/sd-ext and press enter.
4. Exit file manager/terminal and from recovery select full backup( boot, recovery, system, data ). This will backup your full device. You can backup .android_secure, data/media and extsdcard depending on your choice but mind it the backup file size will be large and you should have enough space on your extsdcard for it. If .android_secure is empty/not used you need not backup this ( if you don't have apps on extsdcard this will be empty) .
While performing the backup your recovery will display sd-ext partition not found. Could not backup sd-ext. Don't panic when you see this and just ignore it. Your sdext2/sd-ext partition will be backed up.
5. To format and then restore, boot into recovery and go to file manager/terminal and execute the above mount script and go back to recovery. Then format all above mentioned partitions that you have backed up and reboot from recovery back into recovery. You will be prompted for keep/apply root 1. Yes 2. No. Select yes.
6. Once you have rebooted back into recovery, again go to file manager/terminal and execute the above mount script and go back to recovery.
7. Now select full restore and select your backed up file and your device will be restored to exact state at the time you created your backup.
Note: You can also do customized/selected partitions backup and this also applies for format and restore too through philz cwm touch recovery.
I hope I have made this as simple as possible to understand and implement the procedure. If you have any doubts/queries you can get back.
Happy to know that it is possible.
Gautam Gundap said:
Yes you can. This method is only for the android smartphones where the recovery does not support sd-ext/sdext2 backup, format and restore. If your device has an official or unofficial recovery on xda forum that supports sdext2/sd-ext then it can be done directly from the recovery menu options and this method is not required. If not follow the below steps
1. Find a recovery on the web/xda for your specific device that supports any file manager directly through recovery which has an option for terminal/bash command inputs and execution. Even if the recovery does not have a file manager support but has the terminal/bash command facility then that will do. Philz touch/non touch recovery for your specific device should support this. It has aroma file manager with terminal/bash commands support. I hope you know how to install a recovery img/partition on your device
2. Depending upon which app you are using for sdext2/sd-ext partition to handle, you will find a file under init.d directory for mounting this partition. This file contains script commands for mounting this partition. You need to edit this file and find the script command. For example if you are using link2sd on galaxy grand then the script command is mount -t ext4(your partition type) -o rw(permissions set) /dev/block/vold/179.10(this is the allocated partition address for your sdext2/sd-ext partition specific to your device and will be different for different devices) /data/sdext2.
3. If you want to do a full backup then reboot into recovery go to file manager and command prompt and type the mount script for sdext2/sd-ext and press enter.
4. Exit file manager/terminal and from recovery select full backup( boot, recovery, system, data ). This will backup your full device. You can backup .android_secure, data/media and extsdcard depending on your choice but mind it the backup file size will be large and you should have enough space on your extsdcard for it. If .android_secure is empty/not used you need not backup this ( if you don't have apps on extsdcard this will be empty) .
While performing the backup your recovery will display sd-ext partition not found. Could not backup sd-ext. Don't panic when you see this and just ignore it. Your sdext2/sd-ext partition will be backed up.
5. To format and then restore, boot into recovery and go to file manager/terminal and execute the above mount script and go back to recovery. Then format all above mentioned partitions that you have backed up and reboot from recovery back into recovery. You will be prompted for keep/apply root 1. Yes 2. No. Select yes.
6. Once you have rebooted back into recovery, again go to file manager/terminal and execute the above mount script and go back to recovery.
7. Now select full restore and select your backed up file and your device will be restored to exact state at the time you created your backup.
Note: You can also do customized/selected partitions backup and this also applies for format and restore too through philz cwm touch recovery.
I hope I have made this as simple as possible to understand and implement the procedure. If you have any doubts/queries you can get back.
Click to expand...
Click to collapse
I am happy to know that it is possible. I will give it atry this evening, when I return home from work. I will let u know. Thank for your reply.
Gautam Gundap said:
Yes you can. This method is only for the android smartphones where the recovery does not support sd-ext/sdext2 backup, format and restore. If your device has an official or unofficial recovery on xda forum that supports sdext2/sd-ext then it can be done directly from the recovery menu options and this method is not required. If not follow the below steps
1. Find a recovery on the web/xda for your specific device that supports any file manager directly through recovery which has an option for terminal/bash command inputs and execution. Even if the recovery does not have a file manager support but has the terminal/bash command facility then that will do. Philz touch/non touch recovery for your specific device should support this. It has aroma file manager with terminal/bash commands support. I hope you know how to install a recovery img/partition on your device
2. Depending upon which app you are using for sdext2/sd-ext partition to handle, you will find a file under init.d directory for mounting this partition. This file contains script commands for mounting this partition. You need to edit this file and find the script command. For example if you are using link2sd on galaxy grand then the script command is mount -t ext4(your partition type) -o rw(permissions set) /dev/block/vold/179.10(this is the allocated partition address for your sdext2/sd-ext partition specific to your device and will be different for different devices) /data/sdext2.
3. If you want to do a full backup then reboot into recovery go to file manager and command prompt and type the mount script for sdext2/sd-ext and press enter.
4. Exit file manager/terminal and from recovery select full backup( boot, recovery, system, data ). This will backup your full device. You can backup .android_secure, data/media and extsdcard depending on your choice but mind it the backup file size will be large and you should have enough space on your extsdcard for it. If .android_secure is empty/not used you need not backup this ( if you don't have apps on extsdcard this will be empty) .
While performing the backup your recovery will display sd-ext partition not found. Could not backup sd-ext. Don't panic when you see this and just ignore it. Your sdext2/sd-ext partition will be backed up.
5. To format and then restore, boot into recovery and go to file manager/terminal and execute the above mount script and go back to recovery. Then format all above mentioned partitions that you have backed up and reboot from recovery back into recovery. You will be prompted for keep/apply root 1. Yes 2. No. Select yes.
6. Once you have rebooted back into recovery, again go to file manager/terminal and execute the above mount script and go back to recovery.
7. Now select full restore and select your backed up file and your device will be restored to exact state at the time you created your backup.
Note: You can also do customized/selected partitions backup and this also applies for format and restore too through philz cwm touch recovery.
I hope I have made this as simple as possible to understand and implement the procedure. If you have any doubts/queries you can get back.
Click to expand...
Click to collapse
THANK YOU!!!!!!!!! I'm on an LG G3 and I was successful at mounting my sdext2 partition for Link2SD using this method. I had to change a few things, for example, I have no init.d folder, but had to search for "link2sd" and found the file "init-link2sd.sh", which contained two commands, and the one that worked was "mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2". THANKS AGAIN!!!!!!!!
Glad to know that it worked for you. Hope others are able to use this guide too.
Hi guys,
I am getting interested in these ROM flashing things recently, so I backed up /System /Data /Boot by TWRP after I installed all apps I want.
Just today, I tried to restore from one of my backups but couldn't get it work. CM12 just stuck on the boot animation screen forever.
The backup & restore processes were all perfect without any error, the MD5 also matched.
Here are some basic facts I made:
1. I wiped /System /Data /Cache /D-Cache before restoring.
2. I wiped /Cache /D-Cache after restoring.
3. Reflasing kernel -> NO change
4. Reflashing /System /GApps -> NO change
5. Fix Permission ->NO change
6. Wipe /Data = CAN boot
7. Restoring from another backup -> NO change
So clearly there is something wrong with /Data.
I'm thinking the f2fs /data just can' be restored by TWRP? but I couldn't find such information on the web.
Can anyone confirm this?
Thanks!
[Spec]
Nexus 7 2013 WIFI(flo)
TWRP 2.8.6
Kernel Glitch for Flo/Deb - r320
(No overlock, No additional drivers)
CM12 Nightly 20150405
gapps itvends.com/gapps/gapps-lp-20141212-signed.zip
/Data /Cache=f2fs
/System = ext4
akipapa said:
Hi guys,
I am getting interested in these ROM flashing things recently, so I backed up /System /Data /Boot by TWRP after I installed all apps I want.
Just today, I tried to restore from one of my backups but couldn't get it work. CM12 just stuck on the boot animation screen forever.
The backup & restore processes were all perfect without any error, the MD5 also matched.
Here are some basic facts I made:
1. I wiped /System /Data /Cache /D-Cache before restoring.
2. I wiped /Cache /D-Cache after restoring.
3. Reflasing kernel -> NO change
4. Reflashing /System /GApps -> NO change
5. Fix Permission ->NO change
6 Wipe /Data = CAN boot
So clearly there is something wrong with /Data.
I'm thinking the f2fs /data just can' be restored by TWRP? but I couldn't find such information on the web.
Can anyone confirm this?
Thanks!
[Spec]
Nexus 7 2013 WIFI(flo)
TWRP 2.8.6
Kernel Glitch for Flo/Deb - r320
(No overlock, No additional drivers)
CM12 Nightly 20150405
gapps itvends.com/gapps/gapps-lp-20141212-signed.zip
/Data /Cache=f2fs
/System = ext4
Click to expand...
Click to collapse
Without restoring data, it boots up properly?
Thanks for your reply.
I didn't try that, but I tried to wipe /data(not format) after restoring, and it booted fine.
akipapa said:
Thanks for your reply.
I didn't try that, but I tried to wipe /data(not format) after restoring, and it booted fine.
Click to expand...
Click to collapse
Your wlcm... And u can always press that thanks button if I helped...
akipapa said:
I'm thinking the f2fs /data just can' be restored by TWRP? but I couldn't find such information on the web.
Can anyone confirm this?
Thanks!
Click to expand...
Click to collapse
I see that you changed your file system to f2fs.
Did you flash a modified TWRP to support the new file system after changing it?
Sent from my Canvas Turbo using Tapatalk ^~^
User17745 said:
I see that you changed your file system to f2fs.
Did you flash a modified TWRP to support the new file system after changing it?
Sent from my Canvas Turbo using Tapatalk ^~^
Click to expand...
Click to collapse
I thought twrp2.8.6 supports f2fs because I could format f2fs and browse f2fs /data with its file manager.
Does it need further modifications?
akipapa said:
I thought twrp2.8.6 supports f2fs because I could format f2fs and browse f2fs /data with its file manager.
Does it need further modifications?
Click to expand...
Click to collapse
I looked up on the internet and it seems that it does support f2fs.
What about the kernel, does your kernel support it?
I guess if you were using the same kernel earlier with f2fs then kernel should also not be the problem here.
Maybe it's just a faulty backup.
I don't know much about f2fs myself.
Maybe you should contact someone who does.
Sent from my Canvas Turbo using Tapatalk ^~^
User17745 said:
I looked up on the internet and it seems that it does support f2fs.
What about the kernel, does your kernel support it?
I guess if you were using the same kernel earlier with f2fs then kernel should also not be the problem here.
Maybe it's just a faulty backup.
I don't know much about f2fs myself.
Maybe you should contact someone who does.
Sent from my Canvas Turbo using Tapatalk ^~^
Click to expand...
Click to collapse
I'm sure this is not about kernel, because I tried restore /boot and reflash the kernel.
Besides the kernel that I use works fine with f2fs.
I also tried to restore another backup with no luck, maybe they both were faulty...
akipapa said:
I'm sure this is not about kernel, because I tried restore /boot and reflash the kernel.
Besides the kernel that I use works fine with f2fs.
I also tried to restore another backup with no luck, maybe they both were faulty...
Click to expand...
Click to collapse
You mean 2 backups with faulty data partition?
That's highly unlikely to happen.
When you took those backups, did TWRP showed any error?
Sent from my Canvas Turbo using Tapatalk ^~^
akipapa said:
Hi guys,
I am getting interested in these ROM flashing things recently, so I backed up /System /Data /Boot by TWRP after I installed all apps I want.
Just today, I tried to restore from one of my backups but couldn't get it work. CM12 just stuck on the boot animation screen forever.
The backup & restore processes were all perfect without any error, the MD5 also matched.
Here are some basic facts I made:
1. I wiped /System /Data /Cache /D-Cache before restoring.
2. I wiped /Cache /D-Cache after restoring.
3. Reflasing kernel -> NO change
4. Reflashing /System /GApps -> NO change
5. Fix Permission ->NO change
6. Wipe /Data = CAN boot
7. Restoring from another backup -> NO change
So clearly there is something wrong with /Data.
I'm thinking the f2fs /data just can' be restored by TWRP? but I couldn't find such information on the web.
Can anyone confirm this?
Thanks!
[Spec]
Nexus 7 2013 WIFI(flo)
TWRP 2.8.6
Kernel Glitch for Flo/Deb - r320
(No overlock, No additional drivers)
CM12 Nightly 20150405
gapps itvends.com/gapps/gapps-lp-20141212-signed.zip
/Data /Cache=f2fs
/System = ext4
Click to expand...
Click to collapse
I read that the last CM nightlies got some sort of new compression implemented and that's why there's problems with restoring data. You'll have to wait for the TWRP creator to repair it
matcho13579 said:
I read that the last CM nightlies got some sort of new compression implemented and that's why there's problems with restoring data. You'll have to wait for the TWRP creator to repair it
Click to expand...
Click to collapse
That explains everything, thanks for the information.
akipapa said:
That explains everything, thanks for the information.
Click to expand...
Click to collapse
I'm glad I helped
same issue here
falcon, cm12.1 20/04 , twrp
MultiSystem is a powerful tool for locked- and unlocked-bootloader Android devices with many features that at least includes the following:
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
Click to expand...
Click to collapse
Q&A
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.
Click to expand...
Click to collapse
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...
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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).
Click to expand...
Click to collapse
Does MultiSystem require FlashFire?
No, MultiSystem doesn't require FlashFire. They're fully combatible though.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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 FAT32 format... TWO COMPLETELY DIFFERET PARTITIONS.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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 your device 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.
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
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).
Click to expand...
Click to collapse
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...
Click to expand...
Click to collapse
Will mSDcard incur a significant performance penalty on some devices?
there's no diffrerence between virtual & stock ROMs in terms of performance & battery life. The reason is simple: loop devices associated with the READ-ONLY system IMG mounted from EXT4 partition using a high-quality microSD card IS very fast more than enough.
The read speed is faster than the device can operate anyway + the exact same device should perform on the lowest speed when reading/writing from/to the FAT/FAT32/ExFAT extSD card (where you store your files or even move apps!!!) anyway, which is much slower than the read speed of a loop device mounted from EXT4 partition.
That's why data partition is shared for many reasons, including the poor READ/WRITE performance.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
How to check if an IMG is corrupted using MultiSystem status?
Code:
Current System IMG: Test_Rom.img
Current System DEV: [B][COLOR="Red"]/dev/block/mmcblk0p23[/COLOR][/B]
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
Note: The block device number (mmcblk0p23) may vary per device & per variant !
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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!) More devices will get supported including unlocked TMO & international variants after adding more features untilizing the unlocked bootloader with kexec'd kernels.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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-only "system".
Click to expand...
Click to collapse
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!
Click to expand...
Click to collapse
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 & 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.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Video Tutorials
A quick preview of MultiSystem v1.0 tested on Lollipop for VZW Note 3. The video has been captured on a stable virtual ROM of JasmineROM v5.0.1. It's FULLY compatible with FlashFire on virtual/stock systems. More devices will get supported as well, after required testing.
Facebook: https://www.facebook.com/hsbadr/videos/vb.331488823689599/428178174020663
How to check if you are running a Stock/Virtual System?
There're many ways to check whether you're running a Stock or Virtual system. MultiSystem app should include this simple check at some point. That's important to avoint ruining the Stock system & keep it safe. To make it clear to NOOBZ & anyone who's requesting "another" proof even though I owe hime nothing. Very weird!
Anyway, BusyBox mountpoint applet can print the current block/device mounted to /system mountpoint by running the following command:
Code:
busybox mountpoint -n /system
The stock system is mounts the original system partition:
Code:
[B][COLOR="Red"]/dev/block/mmcblk0p23[/COLOR][/B]
while the virtual system mounts a loop device associated with a system IMG:
Code:
[B][COLOR="Blue"]/dev/block/loop0[/COLOR][/B]
Here're two videos for both stock & virtual systems...
UPDATE:
Now, you could run the following command to print the current system (stock or virtual) and the system device (physical partition or loop device):
Code:
MultiSystem status
Note: The block device number (mmcblk0p23) may vary per device & per variant !
How to repartition microSD card for MultiSystem?
You can use any tool/program for partitioning on Android, Linux, Mac, or Windows. For example, MiniTool Partition Wizard is a good partitioning tool for Windows. So, let's use it for this task. Simply, you need to follow this PDF tutorial (thanks to @carl1961). In sum:
Step 1: delete old partitions on SD card
Step 2: create FAT32 PRIMARY partition
Step 3: create EXT4 PRIMARY partition
Then, apply changes (note that the program UI may get changed in newer versions).
Notes:
This partitioning tutorial doesn't create PRIMARY partitions (it creates logical partitions). So, you need to change "Create As" from "Logical" to "Primary" when creatig a partition.
The sizes of the two partitions are arbitrary depending on number of ROMs you plan to install on the 2nd EXT4 partition.
The 1st partition (check size) is automatically detected as your external storage
In Terminal Emulator or ADB shell, check the existence of the two partitions by running the following command (in red):
Code:
[email protected]:/ # [COLOR="Red"]ls -l /dev/block/platform/msm_sdcc.3/[/COLOR]
drwxr-xr-x root root 2015-05-02 21:08 by-num
lrwxrwxrwx root root 2015-05-02 21:08 mmcblk1 -> /dev/block/mmcblk1
lrwxrwxrwx root root 2015-05-02 21:08 mmcblk1p1 -> [COLOR="Blue"]/dev/block/mmcblk1p1[/COLOR]
lrwxrwxrwx root root 2015-05-02 21:08 mmcblk1p2 -> [COLOR="Blue"]/dev/block/mmcblk1p2[/COLOR]
/dev/block/mmcblk1p1 is mounted by Android as your external storage.
/dev/block/mmcblk1p2 is NOT mounted & will be your MultiSystem partition.
Click to expand...
Click to collapse
How to check microSD card partitions for MultiSystem?
You need to correctly repartition microSD card into two partitions:
exFAT or FAT32 for the 1st partition (your new external storage)
EXT4 for the 2nd partition (your MultiSystem partition)
Use the directions in this post!
You should check your 2nd SD partition in EXT4 format mounted to /MultiSystem:
check that the /MultiSystem directory exists after a reboot
check that the 2nd SD partition (/dev/block/mmcblk1p2) is mounted to /MultiSystem by running the following command in Terminal Emulator or ADB shell:
Code:
mount | grep /MultiSystem
The output should be:
Code:
/dev/block/mmcblk1p2 /MultiSystem ext4 rw,seclabel,relatime,data=ordered 0 0
How to check MultiSystem Installation?
The 1st thing to do after installing MultiSystem is to check the /MultiSystem directory & its contents (it shouldn't be empty!). Then, check usage by running the following commands in Terminal Emulator or ADB shell:
Code:
su
bash
MultiSystem
If it retuns "MultiSystem not found" or permission denied, try to use open MultiSystem app to Update Configurations & try again. If this does't fix it, try the following command:
Code:
/MultiSystem/bin/MultiSystem
This should work if you've MultiSystem binaries installed in (extracted to) /MultiSystem directory. If so, you can create a symlink in /system/xbin as follows:
Code:
mount -o remount,rw /system
ln -sv /MultiSystem/bin/MultiSystem /system/xbin/MultiSystem
Then, test it by running:
Code:
MultiSystem
The last thing before using it is to check the boot options: reboot & monitor the GREEN LED indicator for 3 seconds (change in the app) , which give you the following options:
Volume UP = Primary virtual ROM
Volume DOWN = Secondary virtual ROM
HOME KEY = Stock System
Pressing nothing will boot the active system: stock or primary virtual system. Sure, you should have installed one or more virtual ROMs.
Backup & restore or creating/installing a virtual ROM are easy as copy & paste: all img's will be at
Code:
/MultiSystem/img/system
To backup a virtual/stock system, you have many options:
Use create function to create from stock system
Use copy function to copy the IMG
Copy & paste with a new name
Use FlashFire (fully supported on virtual/stock ROMs)
...
If you've IMG mounting issues, run the following commands:
Code:
mount -o remount,rw /system
busybox ln -sv /proc/self/mounts /system/etc/mtab
If this doesn't help, try mounting from Terminal Emulator or ADB shell after selecting the IMG in MultiSystem app, by running the following command:
Code:
MultiSystem mount virtual
Mind Boggling
hsbadr said:
MultiSystem is a powerful tool for locked- and unlocked-bootloader Android devices with many features that at least includes the following:
Click to expand...
Click to collapse
Had to login just to thank you.
Awesome.
Sent from my SM-N910V DE
Remember: Read twice flash once
I decided to go ahead and try this. Using the latest version it appears to install Multisystem with no problem. Then when I try to flash a rom it says: "file selected: null" when I try to select the rom. So I tried FlashFire and ended up flashing on top of my system instead of the virtual rom partition. How do I tell flashfire where to install to?
MultiSystem Video Tutorial
Thanks To: @Tomsgt , aka RootJunky
Don't forget to subscribe & like the video to show appreciation of his great effort & time spent in making the video :highfive::good:
stueycaster said:
I decided to go ahead and try this. Using the latest version it appears to install Multisystem with no problem. Then when I try to flash a rom it says: "file selected: null" when I try to select the rom. So I tried FlashFire and ended up flashing on top of my system instead of the virtual rom partition. How do I tell flashfire where to install to?
Click to expand...
Click to collapse
Will explain this very soon
hsbadr said:
Will explain this very soon
Click to expand...
Click to collapse
Thanks man. You're awesome as usual. ?
Sent from my SM-N910V using Tapatalk
hsbadr said:
Thanks To: @Tomsgt , aka RootJunky
Don't forget to subscribe & like the video to show appreciation of his great effort & time spent in making the video :highfive::good:
Click to expand...
Click to collapse
I found out I was leaving out the "Create Virtual IMG" step. But even with that it still gives me the "File selected: Null" message.
stueycaster said:
I found out I was leaving out the "Create Virtual IMG" step. But even with that it still gives me the "File selected: Null" message.
Click to expand...
Click to collapse
Update Configurations >>> Activate Virtual System >>> Select Primary IMG
hsbadr said:
Update Configurations >>> Activate Virtual System >>> Select Primary IMG
Click to expand...
Click to collapse
Ok, does this look right? It looks like I have 2 copies of the same rom on the same partition.
Sent from my SM-N910V DE
Remember: Read twice - Flash once
stueycaster said:
Ok, does this look right? It looks like I have 2 copies of the same rom on the same partition.
Click to expand...
Click to collapse
This means that IMG doesn't exist or corupted. You need to create a good IMG & activate it: Create IMG >>> wait for the LED >>> Update Configurations >>> Activate Virtual System >>> Select Primary IMG
hsbadr said:
This means that IMG doesn't exist or corupted. You need to create a good IMG & activate it: Create IMG >>> wait for the LED >>> Update Configurations >>> Activate Virtual System >>> Select Primary IMG
Click to expand...
Click to collapse
I fixed it. The problem was my ext4 partition on the sd wasn't big enough. I tried to set up exactly 4 gb but of course it came out 3.68 gb instead. So I went back and expanded it to 5.4 gb. Now the status is right.
Could I replace this virtual image with the stock rooted LP image with Root Explorer and it would work? This one was done with MoRom. I'd like to have the stock rom too.
Or could I flash the 2 part recovery flashable LP update with either MultiSystem or Flashfire without wiping system or data? If I wipe system I'll lose the MultiSystem directory right?
Update: Or should I wait for Jasmine?
Sent from my SM-N910V using XDA Free mobile app
Any chances this will work for the Note Edge before I go through all the work?
stueycaster said:
I fixed it. The problem was my ext4 partition on the sd wasn't big enough. I tried to set up exactly 4 gb but of course it came out 3.68 gb instead. So I went back and expanded it to 5.4 gb. Now the status is right.
Could I replace this virtual image with the stock rooted LP image with Root Explorer and it would work? This one was done with MoRom. I'd like to have the stock rom too.
Or could I flash the 2 part recovery flashable LP update with either MultiSystem or Flashfire without wiping system or data? If I wipe system I'll lose the MultiSystem directory right?
Update: Or should I wait for Jasmine?
Click to expand...
Click to collapse
Great! Yes, you can add virtual ROMs with any root explorer. I'd suggest to increase the EXT4 partition size & keep it for ROM or even backups (it's faster & more reliable compared to FAT32/exFAT). You can add this rooted ROM, unrooted stock ROM (for enterprise, etc), and/or wait for JasminROM.
rlkirkland said:
Any chances this will work for the Note Edge before I go through all the work?
Click to expand...
Click to collapse
Yes, but not tested yet.
hsbadr said:
Great! Yes, you can add virtual ROMs with any root explorer. I'd suggest to increase the EXT4 partition size & keep it for ROM or even backups (it's faster & more reliable compared to FAT32/exFAT). You can add this rooted ROM, unrooted stock ROM (for enterprise, etc), and/or wait for JasminROM.
Click to expand...
Click to collapse
I'm obviously doing something wrong or I've left a step out. I placed the stock rooted LP .img into the /MultiSystem/img/system file using Root Explorer. I opened MultiSystem, tapped Install MultiSystem, chose the virtual rom that I copied originally as Primary System image, the rooted LP image as secondary System Image, tapped Update Configurations, closed the MS app then rebooted. When the LED lit up I tapped the down volume rocker til the light went out. Then when it finishes booting it says it's the stock system instead of the secondary virtual image.
Update: Even when I try to choose the primary virtual image it boots the stock system.