System Image Partition - Xiaomi Mi Max Questions & Answers

When flashing custom roms, I noticed we never touch system image partition which take up about 3GB of space. What exactly is system image partition for? Is this related to A/B (seamless) system update feature? If I have no intention to go back to MIUI, can system image partition be removed to free up space? Does any custom rom use A/B system update when flashing updates?

THREAD CLOSED
Requested by the OP.
Regards,
shadowstep
Forum Moderator

Related

Dalvik to system partition script ?

Is this possible with the HOX.. given the size of the system partition and the free space available with some roms, could help to free up.space on the internal storage (data) partition.
Is there a script available ?
Titanium Backup can do something like this if you're rooted.
That only does system dalvik, integrates into Rom, recreating odex files..
I'm talking about creating a script so all dalvik is stored on a system partition.
Symlnked or hard linked,..
ie rather that data/dalvik-cache
Have it as system/dalvik-cache
I had a script for my DHD that moved the dalvik to the cache partition, I suggested the system partition with the HOX because of its has so much free space that would be more than adequate to store it..
I might have a look at this script later tonight if I still have it, and see if I can modify it, to work on the HOX for the system partition..
Figured it out..
I have added a patch to the Sense version of the ncx-217_v4_1 Kernel that stores the Dalvik Cache on the System Partition, therefore freeing up some space on the internal storage..
The System Partition is set as Rewriteable on boot to allow this to work..
I know some people say for security reasons System Partition should be left as Read Only.. But then my argument against that is why go to the trouble to root the device in the first place then. ?
Before installing this makes sure you have wiped the Dalvik Cache in recovery..
to install..
Code:
fastboot flash boot ncx_217_v4_1_SENSE_D2S.img
fastboot erase cache
The modules for this kernel don't require to be re-flashed if you have done prior to this already... But I did anyway just to be on the safe side..
Bare in mind if you flash any other kernel after this.. your Dalvik cache will go back to the stock setting, so if you do not have enough space on your Data partition you could run into problems..
To get around this you could always unpack the new kernel, add the patch to the 'init.rc' file then re pack..
For information on how to unpack and repack Boot.img files refer to this thread HERE
For information on how to apply the patch, read the article HERE

What is /preload partition?

Hi,
I have just noticed something and wanted to learn a few things.
It is possible to wipe /preload partition on CWM recoveries but not possible in TWRP ones. Still when wiped, the next CM or PA installation fails with the SIM card. However when I check this partition with a file manager it only shows what would be loaded on my internal memory IF I had a stock Samsung ROM. It contains the Samsung and S Note folders with some noting samples and the 10 pitcures and World of Wonders video..
What are they doing there and are they taking my phones user memory? Or why am I not having a healty ROM installation when I wipe that partition? Why is this partition there for actually? And last, why do I not get those folders sometimes after a clean Stock ROM installation?
Thanks..
P.S. I know there is a topic about it but it does not answer why my installation fails after wiping that partition and the question after that..
You've answered your question about the partitions purpose.
Can't replicate your case. I've wiped preload several times and never had any issues after, whether installing a stock ROM or AOSP one.
Sent from my GT-N7100 using Tapatalk 4

[Question] Resizing partitions with TWRP

I have a brand new G3 (D852) with Koodo that I just got 2 days ago. I've rooted, installed TWRP and flashed a few AOSP roms. Not a fan of any manufacturer UI, even though LG's is very minimal, so AOSP it is. I noticed that my system partition has more than 1GB of free space after everything is flashed and good to go. I also noticed that the latest TWRP (2.8.7.0) has a resize partition option inside the Wipe section. What I want to know is, how can I use this to resize the system and data partitions so that 1GB+ isn't being wasted and unused. I'd really like to get that 1GB+ added to my data partition for apps.
I've tried using it. The only time it didn't spit out an error was after I wiped the system partition. It succeeded in "resizing" it after that, but it didn't change anything. The system partition remained the same size.
ToYeD said:
I have a brand new G3 (D852) with Koodo that I just got 2 days ago. I've rooted, installed TWRP and flashed a few AOSP roms. Not a fan of any manufacturer UI, even though LG's is very minimal, so AOSP it is. I noticed that my system partition has more than 1GB of free space after everything is flashed and good to go. I also noticed that the latest TWRP (2.8.7.0) has a resize partition option inside the Wipe section. What I want to know is, how can I use this to resize the system and data partitions so that 1GB+ isn't being wasted and unused. I'd really like to get that 1GB+ added to my data partition for apps.
I've tried using it. The only time it didn't spit out an error was after I wiped the system partition. It succeeded in "resizing" it after that, but it didn't change anything. The system partition remained the same size.
Click to expand...
Click to collapse
This it why the option is there:
resize2fs feature: On some devices like the Nexus 6, the factory images include a userdata image that is the proper size only for the 32GB units. If you flash the factory image to a 64GB Nexus 6, the data partition will appear as if it only has the free space of a 32GB device. Using the resize2fs option, TWRP can resize your data partition to take up the full space available. The resize2fs may also be useful to resize system partitions on devices where custom ROM system images don’t take up the full partition space. Lastly, resize2fs may be useful in some cases to reserve the proper space at the end of a data partition for a full disk encryption key, should your partition be formatted incorrectly for some reason.
jeffrey268 said:
This it why the option is there:
resize2fs feature: On some devices like the Nexus 6, the factory images include a userdata image that is the proper size only for the 32GB units. If you flash the factory image to a 64GB Nexus 6, the data partition will appear as if it only has the free space of a 32GB device. Using the resize2fs option, TWRP can resize your data partition to take up the full space available. The resize2fs may also be useful to resize system partitions on devices where custom ROM system images don’t take up the full partition space. Lastly, resize2fs may be useful in some cases to reserve the proper space at the end of a data partition for a full disk encryption key, should your partition be formatted incorrectly for some reason.
Click to expand...
Click to collapse
Thank you for the reply
If I understand you correctly, the feature's original intent is to resize /data partitions in the event the rom/system image treats a larger storage capacity device as a lower capacity one, ie. 64GB device is treated like 32GB so /data will only reflect 32GB minus (system image install size), wasting 32GB and leaving it inaccessible to the user.
However, it also seemed like you were saying I also could use it to resize my /system partition to a smaller size so CM12.1 (with it's ~900MB install size after Full TK-Gapps) will only leave ~50MB to ~100MB on /system instead of ~1.5GB. However, the question remains. How do I do this and can I reallocate the ~1.5GB to the /data partition for apps and internal storage? If this can't be done then I see no point in resizing /system to begin with as it will still be inaccessible to me as the user.
ToYeD said:
Thank you for the reply
If I understand you correctly, the feature's original intent is to resize /data partitions in the event the rom/system image treats a larger storage capacity device as a lower capacity one, ie. 64GB device is treated like 32GB so /data will only reflect 32GB minus (system image install size), wasting 32GB and leaving it inaccessible to the user.
However, it also seemed like you were saying I also could use it to resize my /system partition to a smaller size so CM12.1 (with it's ~900MB install size after Full TK-Gapps) will only leave ~50MB to ~100MB on /system instead of ~1.5GB. However, the question remains. How do I do this and can I reallocate the ~1.5GB to the /data partition for apps and internal storage? If this can't be done then I see no point in resizing /system to begin with as it will still be inaccessible to me as the user.
Click to expand...
Click to collapse
I read a few things online and it seems you need aan unlocked bootlader, the G3 bootloader is not unlockable, so you are probily out of luck maby you can ask in the Q&A thread of the rom you are using.

System Image Partition?

In TWRP, when i am making a backup, I see this about 4GB big system image partition (not the one where the Rom is flashed on) what is it for?
System image is like stock system.img you see in factory images on Nexus devices, I am not 100% how it serves a purpose as a backup
Thanks for the answer. I was just wondering if that actually is some "dead space" on the phone. I mean its like 4 or 5 GB and if it could be removed
i really want to remove it too
waste 4GB

TWRP resized partition

I will resize the partition with twrp, but if I want to change back it to normal what should I do?
And I know this thread should be in Questions

Categories

Resources