and in case you missed it, here is the noob question (i've been reading threads for hours can't find the answer): why shoud I repartition, i've flashed a few times upgrading the firmware with odin but never used PIT, am i missing something?
+1Can't thank you enough for the thorough explanation, backed with actual proof.
Great thread!
Simple. Sometimes you make mistakes and mess up partitions. Then your only recovery solution is to repartition.and in case you missed it, here is the noob question (i've been reading threads for hours can't find the answer): why shoud I repartition, i've flashed a few times upgrading the firmware with odin but never used PIT, am i missing something?
I doubt that the guys at samfirmware do know much about when to use a pit file. They write that if the firmware is a 3 file firmware then 512.pit is to be used, but if the firmware is a 1 file firmware then 803.pit is to be used without checking re-partition...that is not correct at all.Thanks Ramad. Very useful information for all of us. Many questions are gone from my mind, but
" Then How the guys at samfirmware decide about the pit file when they release a firmware ?"
As you know, the firmware table at samfirmware points us different pit files for different firmwares. WHY? According to what?
All the testing was performed on stock firmware with RFS, and the idea is to provide information on pit files and the device behaver with no changes. If I would be using a different file-system then that will be investigating a moded firmware, although I can confirm that using a lagfix does retrieve the missing space, and that is related to how a lagfix works, by copying the files on /system to the internal SD-card, formatting /system and then copying the files back, when a lagfix formats /system, then it will be formatted as a partition not as a space, this is why whole system partition will be usable after that.I believe hardcore had preciously mentioned about the increase in the usable space after lagfix is applied.
[Ramad], were you on ext4, or rfs? Maybe try the experiment on both file system?
Anyway, excellent information.
Sent from my GT-I9000
I did not mention DXJPE because it's an exception, it will only except 513.pit and it will make the whole partition usable with more than 39MB of free space, all of that is on stock RFS. When doing the math then only around 258MB of /system is used by data copied to it during installation...so saying that DXJPE is a big firmware compared to other firmwares is not the case here. You could be pretty much right about the usable size of /system partition is recorded in the ROM.The reason that you don't see increased space in /system is because the usable size of that partition is recorded in the ROM. If you apply a lagfix to the partition with 513.pit, you will see that the usable space is increased because a new partition is created.
The reason for the increased space in 513.pit, the /system in certain Asian roms (such as DXJPA) needs to be larger to contain the large amount of CSC.
This is what we don't know...I hope so, releasing and using 803.pit or 513.pit can have a meaning then.Interesting discussion. Just a thought - is it possible the 'missing' space is being used for security or data integrity? How about reserved for possible future defective memory blocks?
Sent from my GT-I9000M using XDA App
You will never need to use a pit file while flashing using Odin unless you want to re-partition...the pit file is already there for Odin to read from the ROM.and in case you missed it, here is the noob question (i've been reading threads for hours can't find the answer): why shoud I repartition, i've flashed a few times upgrading the firmware with odin but never used PIT, am i missing something?
Thanks, [Ramad] for the explanation. Glad that we know a lot more now.I doubt that the guys at samfirmware do know much about when to use a pit file. They write that if the firmware is a 3 file firmware then 512.pit is to be used, but if the firmware is a 1 file firmware then 803.pit is to be used without checking re-partition...that is not correct at all.
A pit file should only be used when re-partitioning is needed, the device already have a copy of the previously used pit file stored at the second sector at the ROM(please see ROM partitions at post #1), when re-partition is not checked then Odin retrieves the information from that sector and flashes the device according to it, even if you did choose a different pit file than the one stored at the ROM.
All the testing was performed on stock firmware with RFS, and the idea is to provide information on pit files and the device behaver with no changes. If I would be using a different file-system then that will be investigating a moded firmware, although I can confirm that using a lagfix does retrieve the missing space, and that is related to how a lagfix works, by copying the files on /system to the internal SD-card, formatting /system and then copying the files back, when a lagfix formats /system, then it will be formatted as a partition not as a space, this is why whole system partition will be usable after that.
I did not mention DXJPE because it's an exception, it will only except 513.pit and it will make the whole partition usable with more than 39MB of free space, all of that is on stock RFS. When doing the math then only around 258MB of /system is used by data copied to it during installation...so saying that DXJPE is a big firmware compared to other firmwares is not the case here. You could be pretty much right about the usable size of /system partition is recorded in the ROM.
This is what we don't know...I hope so, releasing and using 803.pit or 513.pit can have a meaning then.
You will never need to use a pit file while flashing using Odin unless you want to re-partition...the pit file is already there for Odin to read from the ROM.
The thing is, when you're flashing a ROM, you're flashing a file system. And when it comes to size, there are 2 sizes — partition size and file system size. The file system size cannot be larger than the partition size but can be (but not usually) smaller than the file system size. The file system size is determined to be equal to the partition size where that file system was created. What's happening here is that the file system of most ROMs are created against 512.pit and thus is smaller than the partition size when flashed on 513.pit. The file system does not realize that it is on a partition larger than when it was created and thus the additional space cannot be used.I did not mention DXJPE because it's an exception, it will only except 513.pit and it will make the whole partition usable with more than 39MB of free space, all of that is on stock RFS. When doing the math then only around 258MB of /system is used by data copied to it during installation...so saying that DXJPE is a big firmware compared to other firmwares is not the case here. You could be pretty much right about the usable size of /system partition is recorded in the ROM.
Sorry about what I wrote earlier, that was misleading as I could pretty much have been using a deodexed firmware, 258MB cannot be right when the the stock factoryfs.rfs alone is 254MB in size, they say that a picture do say a thousand words...I still believe that the DX-series is larger than most other ROMs. When you said that "only around 258MB of /system is used by data copied to it during installation", did you include the size of the CSC which is copied to /system during first boot in recovery after a firmware flash?
What do you mean?You can't flash DXJPE with 803.pit because when the file system size is larger than the partition size, ****s happen.
Your last post did not picture this but was talking about actual size and usable size. However, I find what you write now about factoryfs.rfs file headers more interesting.When you flash /system, you're flashing factoryfs.rfs which contains a file system. In the header of that file, the amount of usable space is recorded (which I call file system size). If the recorded amount of usable space is less that the partition size, you will see unusable space. However, if the recorded amount of usable space is more than the partition size, the system will either error out or, more dangerously, invade the data of the next partition when a space beyond the partition size (but within the file system size) is requested.
It isn't true. For me.A pit file should only be used when re-partitioning is needed, the device already have a copy of the previously used pit file stored at the second sector at the ROM(please see ROM partitions at post #1), when re-partition is not checked then Odin retrieves the information from that sector and flashes the device according to it, even if you did choose a different pit file than the one stored at the ROM..
What is not true?It isn't true. For me.
If you check re-partition then odin write the pit file in /dev/block/bml2 partition and use it for write size of partition in to device.
If you don't check re-partition then odin use pit file for write size of partition but it don't write the pit file in /dev/block/bml2 partition.
Sorry for my bad english.