Resizing /System - Galaxy S 4 Q&A, Help & Troubleshooting

Hi, I just wanted do know if there's a way I can change the size of the /system becuase it uses almost half of the phone's storage.

Apparently, only the I9500 can resize its partitions, and that can only be done through use of a PIT file. However, in my opinion it's not worth doing, and on all the Qualcomm devices, impossible to do.

Hi,
Just the addition. It's impossible to resize partition. But, the only thing to know: Samsung reserves 1/8 of total storage (2 from 16 GB ) for cache partition. It's unnecessary for most people because cache partition in most devices are 200-500 MBs.
I9500 devices that shipped in all regions and in China are different. You can't use full Chinese firmware in International devices and vice versa without a PIT file (International/Chinese). Installing Chinese PIT might reserve more space for user data (11.8 GB compared to 8.9 GB in International one), but it has several disadvantages.
First, is you can't install any custom ROM that is a block-build based installer (by patching system partition). It instantly fails because mount points of International PIT and Chinese PIT are completely different.
Second, if you do a full Chinese firmware install with ODIN on International devices and you don't remove sboot.bin from the archive and re-pack it, you'll end yourself with Chinese bootloader that pretty hard to be 'vanished' in standard way of installing firmware.
Sent from my ASUS_Z00AD

Related

Partition sizes

How is the partition size determined by the rom/dev ? This is probably a basic question that has been covered (tried searching but cannot find what im looking for)
I remove alot of the junk apps from roms before installing so the more space i can get back and if im able to flash a smaller partition due to this removal the better it is for me
cheers
take the your-rom-name-here.zip on your PC, extract the entire system folder, see how big it is, , thats what size (plus a few meg) that the system partition must be, i.e. the size cwm layout you flash.
The rest pretty much takes care of theirselves, though some chefs set slightly different cache sizes. 5 and 40 seem to be the two most common.
EG/ you take a rom taht needs 150 meg, remove 25 meg of apps, so i'd flash a 130 meg partition. Dont forget that if you flash an update of that rom, it will have teh apps again, and wont fit into your custom partition size until you remove them again.

A guide for kernel devs to recover superbricked Notes....

Hi all,
First of all I would like to say that this is purely not my work.All thanks goes to Fi***o(Guess him...).
Ok to the matter.You all know that most of the superbricks are caused because of the wipe done in recovery.It actually causes an I/O error which causes the /data partition in eMMC to get unrepairable.Even Odin,heimdall,shell....Nothin can fix it.And without /data partition your phone cannot boot.Since only the /data partition is damaged,you can use download mode and flash any kernel and even enter recovery sometimes.So explanation part is over.
Now to make our phone to boot up we must find a way to get /data partition working.But how can we?You know,there is a partition called /preload (hidden.img) which is always empty and almost not at all used and its size is 512 MB.So we are actually wasting 512 MB.A kernel only controlls where to mount what partition.So If we could make a kernel which would swap /data and /preload,/data will be mounted at /preload location and it will be fine and working and our phone will be able boot and run normally.
So does it only have advantages?Surely no.It has its own disadvantages too...
1.Your /data partition is shrinked to 512 MB
2.You should only stay on custom roms.You cannot flash a stock rom or anything through odin except kernels....
3.You can flash this kernel only through PC odin which means yellow triangle and increase counter.
But you can use CWM to flash any custom roms because it doesnt check for /preload but stock rom does....
And as I said earlier this is ain't my work but dont feel shy to press that thanks button if you like it....
I think it is Ficeto (DarkyROM kernel dev) who did this first. I remember someone posting something about this previously, but was probably missed.
EDIT: Worth it for people who don't have the $200 odd dollars in the meantime for a new MOBO
I actually do not recommend any custom ROMs! as they are all deodexed and that means that they store their odex(dex) files in /data/dalvik-cache which further uses more /data space.
What you can flash is: custom factoryfs.img(less apps and added CSC), empty hidden.img, custom zImage(that is made to swap /data and /preload) and boot loaders(boot.bin, Sbl.bin and param.lfs).
Do not flash stock cache.img or data.img!
With taking all that in consideration, my Note is now running LPF with LPY CSC
hkgrob said:
I think it is Ficeto (DarkyROM kernel dev) who did this first. I remember someone posting something about this previously, but was probably missed.
EDIT: Worth it for people who don't have the $200 odd dollars in the meantime for a new MOBO
Click to expand...
Click to collapse
I already gave a vague idea in someother thread.But I'm not use it was my post or not...
vijai2011 said:
Hi all,
First of all I would like to say that this is purely not my work.All thanks goes to Fi***o(Guess him...).
Ok to the matter.You all know that most of the superbricks are caused because of the wipe done in recovery.It actually causes an I/O error which causes the /data partition in eMMC to get unrepairable.Even Odin,heimdall,shell....Nothin can fix it.And without /data partition your phone cannot boot.Since only the /data partition is damaged,you can use download mode and flash any kernel and even enter recovery sometimes.So explanation part is over.
Now to make our phone to boot up we must find a way to get /data partition working.But how can we?You know,there is a partition called /preload (hidden.img) which is always empty and almost not at all used and its size is 512 MB.So we are actually wasting 512 MB.A kernel only controlls where to mount what partition.So If we could make a kernel which would swap /data and /preload,/data will be mounted at /preload location and it will be fine and working and our phone will be able boot and run normally.
So does it only have advantages?Surely no.It has its own disadvantages too...
1.Your /data partition is shrinked to 512 MB
2.You should only stay on custom roms.You cannot flash a stock rom or anything through odin except kernels....
3.You can flash this kernel only through PC odin which means yellow triangle and increase counter.
But you can use CWM to flash any custom roms because it doesnt check for /preload but stock rom does....
And as I said earlier this is ain't my work but dont feel shy to press that thanks button if you like it....
Click to expand...
Click to collapse
Hmmm I actually had a simillar idea couple of days ago ,but not the preload parttion ,I thought that someone could mount data and system partitions on any other partitions ,like internal sdcard (the user accessable space) and then move the actual user accessable Sdcard to external storage ?
but I don't think it's the kernel alone that can do this ,but rather a modified .pit file (to repartition the sdcard) along with a modified kernel?
just thinking out loud here and could be just mumbling and totally wrong ,but I hope it gives the devs a starting point to help those poor superbricked people.
MR.change said:
Hmmm I actually had a simillar idea couple of days ago ,but not the preload parttion ,I thought that someone could mount data and system partitions on any other partitions ,like internal sdcard (the user accessable space) and then move the actual user accessable Sdcard to external storage ?
but I don't think it's the kernel alone can do this ,but rather a modified .pit file along with a modified kernel?
just thinking out loud here , hope it gives the devs a starting point to help those poor superbricked people.
Click to expand...
Click to collapse
Do you ever use a pit file in flashing custom roms through CWM or when flashing kernel through PC odin???As I said earlier you cannot flash any rom through odin except a kernel I guess.I'm not a superbrick owner.
But yeah what you said should also work but its very time consuming and confusing.
MR.change said:
Hmmm I actually had a simillar idea couple of days ago ,but not the preload parttion ,I thought that someone could mount data and system partitions on any other partitions ,like internal sdcard (the user accessable space) and then move the actual user accessable Sdcard to external storage ?
but I don't think it's the kernel alone can do this ,but rather a modified .pit file along with a modified kernel?
just thinking out loud here , hope it gives the devs a starting point to help those poor superbricked people.
Click to expand...
Click to collapse
much simpler to just use /preload most is still as it should be and only 3 lines need changing in a stock kernel(initramfs) for it to work. cwm requires another line changed and that is it.
I can provide a working GGB and LPF kernels (no cwm in LPF)
its one of my ideas.. relocating the partition to be used...
vijai2011 said:
Do you ever use a pit file in flashing custom roms through CWM or when flashing kernel through PC odin???As I said earlier you cannot flash any rom through odin except a kernel I guess.I'm not a superbrick owner.
But yeah what you said should also work but its very time consuming and confusing.
Click to expand...
Click to collapse
No not through CWM but PC ODIN ,and yes many superbricked people could flash .pit file successfully from pc odin.
ficeto said:
much simpler to just use /preload most is still as it should be and only 3 lines need changing in a stock kernel(initramfs) for it to work. cwm requires another line changed and that is it.
I can provide a working GGB and LPF kernels (no cwm in LPF)
Click to expand...
Click to collapse
yes I understand that my method is much harder ,but like I said I'm no dev and this just an idea that I had couple of days ago.
but there is some methodology to my madness:
the preload partition is only 512 mb ,thus very small for some ROMs .
my method (if doable at all) should give users much larger ROM space ,as they can use the SDcard which is 12 GBs of space.
ficeto said:
much simpler to just use /preload most is still as it should be and only 3 lines need changing in a stock kernel(initramfs) for it to work. cwm requires another line changed and that is it.
I can provide a working GGB and LPF kernels (no cwm in LPF)
Click to expand...
Click to collapse
I don't have a bricked note, but that's worth a thanks for sure. If you could share, I am sure a bunch of people will be doing random cartwheels.
Then again, someone will probably asked if they can flash it here, or there, or everywhere!
hkgrob said:
I don't have a bricked note, but that's worth a thanks for sure. If you could share, I am sure a bunch of people will be doing random cartwheels.
Then again, someone will probably asked if they can flash it here, or there, or everywhere!
Click to expand...
Click to collapse
the problem is that that kernel should be used correctly.Its not like cf-root,abyss kernel.If you flash on a note in good condition,you might have some problems...
I thought /data has user data and ROM is flashed onto a different partition, no?
anilisanil said:
I thought /data has user data and ROM is flashed onto a different partition, no?
Click to expand...
Click to collapse
Yeah partially right.A rom requires both /system and /data.
Good work.
Once the bricked note is up nd running, and rooted, ain't it possible to write some lowlevel partition and format utility to repair the original /data portion of EMMC ?
friedje said:
Good work.
Once the bricked note is up nd running, and rooted, ain't it possible to write some lowlevel partition and format utility to repair the original /data portion of EMMC ?
Click to expand...
Click to collapse
Nope.Not at all possible.The partition becomes completely inaccessable.
Yes there are low level programs like parted - to repartition.
e2fsck to scan for bad sectors -like scandisk in windows.
format - should be possible -- I have to get help of forest1971 for this.
prabhu1980 said:
Yes there are low level programs like parted - to repartition.
e2fsck to scan for bad sectors -like scandisk in windows.
format - should be possible -- I have to get help of forest1971 for this.
Click to expand...
Click to collapse
Is this correct? I was under the impression that the emmc error was due to incorrect voltages being passed and therefor physically frying the chips, hence the only fix is to replace the chips/mobo?
Sent from my GT-N7000 using xda premium
Ofcourse there are no weird voltages applied. It's still the same chip being programmed by the same program delivering the same voltages.....
Actually the program doesn't set any voltages, it just tells the chipset to put the memory into the 'writing mode'
The most likely problem is that a wrong entry point is being written into the filesystem for the data partition.
I was not able to format it in any way and trust me I tried everything ....
Just found this on the net.
http://mobiletechvideos.mybigcommerce.com/samsung-galaxy-note-jtag-brick-repair/
expensive but less then 200 for a new mobo. maybe somebody wants to try.

[Q] Device internal memory shrinks after every flash?

I am using Hongkong version of SM-N9005, everything worked just fine earlier, but recently after I flashed stock NB3 the total amount of internal storage I could use cut down to about 28GB. Then I tried XNOTE v10 and official CM11 as well, but the internal memory kept getting smaller and smaller after every flash as I could see it when I attached my phone to my computer. I tried factory reset in the ROM and also wipes in CMW recovery, but neither seems to be working. And I found out that Storage→System memory took up a space about 6.5G.
Does anyone have an idea about this? How should I wipe correctly and get my memory back? Thanks in advance.
When flashing in cwm I usually wipe in mounts and storage first. Research which ones to wipe...as I cant remeber which ones exactly. Things like format cache...format system...format sdcard(but the internal sd card - what it is named depends on which recovery is flashed)...just remeber this will wipe alk ur internal data like game saves, game data, local pictures etcetc...but should clear the excess storage being used.
Example...if you flash CM11 it uses a seperate sub-directory as main storage...and reverting back to stock changes to normal but the CM11 directory remains...something similar to sdcard/0/ ...soooo....if you are on stock now...use a file manager and if you have a folder named '0' ypu can usually delete what's in there...but the folder itself remains unless u change write permissions or formate ur internal storage.
Sent from my SM-N9005 using XDA Premium 4 mobile app
ZH_Ray said:
I am using Hongkong version of SM-N9005, everything worked just fine earlier, but recently after I flashed stock NB3 the total amount of internal storage I could use cut down to about 28GB...
Click to expand...
Click to collapse
It is not uncommon for stock ROMs released by Samsung to come with a new partitioning scheme to make slightly more space in certain partitions. In this regard the HK N9005 was already known to have a system partition that was smaller than the EU N9005 (which resulted in some of the problems seen when the first XEO 4.4.2 leak was attempted on HK 9005).
"fastboot flash userdata userdata_64g.img"
xclub_101 said:
It is not uncommon for stock ROMs released by Samsung to come with a new partitioning scheme to make slightly more space in certain partitions. In this regard the HK N9005 was already known to have a system partition that was smaller than the EU N9005 (which resulted in some of the problems seen when the first XEO 4.4.2 leak was attempted on HK 9005).
Click to expand...
Click to collapse
Fix partition table with this:
http://www.androidheadlines.com/2014/07/android-flash-oneplus-one-stock-cyanogenmod-11s.html

I bought thinking of 16 GB but has only 9.12 available

Isn't there anyway to get more space on s4. Will removing bloatware helps to obtain the system used space???
No. You won't ever be able to get all 16 GB.
Samsung ripped us off.
Athakuri700 said:
Will removing bloatware helps to obtain the system used space???
Click to expand...
Click to collapse
Yes and no. Removing bloatware frees up system space, but you can not use that partition for data/internal storage. The S4 (I9505) has 2GB system partition and 2GB Cache partition. Both could've been 1GB for custom roms, but we are not able to flash custom unsigned pit files.
The I9500 got lucky with a chinese firmware which has smaller partitions and I think the i337 (not sure if it is the correct one) already has a smaller cache partition.
The only way to increase size is to get the signing tool from samsung, which we'll never get
FPSUsername said:
The only way to increase size is to get the signing tool from samsung, which we'll never get
Click to expand...
Click to collapse
Odin leaked. Samsung never officially released Odin for public use. So you never know

size of system.img

Dear All:
This is a fundamental / dumb question that I am not sure where to post it.
I have a Moto X Pure/Style. I have a relatively strange variant (Chinese, XT1570). But that is not the point.
I have obtained two official images from Chinese website. Version wise they are identical.
One strange difference is size of "system.img" file.
The one I choose to flash my phone with (mind you that this is the OFFICIAL stock image with no modifications) has a system.img file which is 1.36GB in size.
Another package I obtained from a different Chinese source has a system.img file of 3.99GB in size.
When I looked to my phone, system.img file of 4GB is about right, that is how much it occupied on my phone.
Why this 1.36GB system.img file worked at first place? is there a differeces?
thanks in advance.
The larger image is probably a sector/sector image of the entire partition (dd). The smaller is just the files in use.
If you want to test this, flash the smaller image and note the free space remaining. Then flash the larger. I bet the two numbers will be similar if not the same.
sector/sector image of entire partition?
gpz1100 said:
The larger image is probably a sector/sector image of the entire partition (dd). The smaller is just the files in use.
If you want to test this, flash the smaller image and note the free space remaining. Then flash the larger. I bet the two numbers will be similar if not the same.
Click to expand...
Click to collapse
Thanks for your reply. I got a couple questions.
The large system.img file was created by clobber the sparsechunk.x file together.
What do you mean "entire partition?"
Here is what I am trying to do:
I have a Chinese version of Moto X Pure. It is the only dual-SIM version that support both AT&T and China's LTE band. However, China banned Google services thus the Chinese version contains NO Google services nor Google Service framework. What I want is to flash the XT1572 version (Rest of Asia) dual SIM Android OS while keep the modem part intact.
1. is it safe to assume all Moto X Pure|Style's partition structure is identical?
2. on Chinese web, an article stated that all I have to do is flash the boot.img AND system.img and leave everything else intact, the phone will work. Is this something I can just assume?
3. I noticed that bluetooth has its on firmware (BTFM.bin). does GPS has its own firmware as well? if it is, which image file is it? The reason I am asking this is because hardware wise, Chinese variant is different from rest of Moto X Pure in terms of navigation hardware: Chinese variant has GPS, Beidou (Chinese), and Glonass (Russian) all three receivers. and given the choice, i would like to keep that intact as well.
Thanks in advance
Entire partition as in the entire 4GB partition space. Obviously the system is not occupying all of this space, but the image created was a snapshot of the entire space including unused space.
1) I don't see why they would create different partition layouts for different regions. Usually the only difference would be in software
2) Boot.img is the kernel and system.img is the system partition. You should be fine flashing these two.
3) I don't recall ever seeing a separate gps partition. I'd think the code for it would be part of the baseband.
Whether or not the xt1572 has the right drivers for this is another matter.
Make a backup of system, boot, and data partitions, then flash the xt1572 boot and system only. You'll maybe able to boot right up or you'll have to do a factory reset from within the recovery if it bootloops on startup.
now I am confused... I see TWO system partitions in Teamwin recovery
when I tried to do a backup with Teamwin recovery, i actually see TWO "System" partition:
System (which is about 1.5GB)
and
System R/O (which is about 4GB)
what is the differences between these two system partitions?
when I do
fastboot -s XXXYYYZZZ flash system system.img
which "system" partition am I really flashing?
and when teamwin recovery said I can backup "system" partition and "system R/O" partition, how doe these two partition map to fastboot's partition? I see I can flash
partition
bootloader
modem
fsg
bluetooth
boot
recovery
system
there is only one system...
gpz1100 said:
Entire partition as in the entire 4GB partition space. Obviously the system is not occupying all of this space, but the image created was a snapshot of the entire space including unused space.
1) I don't see why they would create different partition layouts for different regions. Usually the only difference would be in software
2) Boot.img is the kernel and system.img is the system partition. You should be fine flashing these two.
3) I don't recall ever seeing a separate gps partition. I'd think the code for it would be part of the baseband.
Whether or not the xt1572 has the right drivers for this is another matter.
Make a backup of system, boot, and data partitions, then flash the xt1572 boot and system only. You'll maybe able to boot right up or you'll have to do a factory reset from within the recovery if it bootloops on startup.
Click to expand...
Click to collapse
Strange. Which version of twrp are you using?
Can you post a pic?

Categories

Resources