- This may BRICK your phone making it unusable afterwards, and will break warranties etc. So you do this on your own with no support from this post.
- If you do BRICK you phone, Samsung Kies may be able to recover it, ( If you enter your Model No & Serial number from behind the battery hopefully kies will sort out broken installs even with a broken PIT file. )
Posted should anyone else be interested in attempting to bring more life into there old phone, these notes are just an outline.
BEFORE CONTINUING.. I Recommend that you make sure your phone is backed up fully, and that you are using the google backup system. This way on rebooting and entering your gmail details the phone will automatically re-insall the apps you where using, contacts etc.
PLEASE NOTE :
Android Flash Program
PIT Magic v1.3.10
Editing the PIT From (http://forum.xda-developers.com/galaxy-s2/orig-development/guide-enlarge-datafs-partition-rid-t2353551)
After you got the original PIT you can edit it with PIT Magic, a Windows .NET tool to edit PIT information, you can also run it with mono on linux/osx.
Open the file in PIT Magic and go to PIT Entry list #11, the DATAFS partition. We need to focus on two fields, the "Block size", that's the block where the partition starts and "Block count", the size of the partition in blocks. The next partition must start on the block given by the sum of the previous partition block size and block count.
In order to enlarge the DATAFS partition, just raise the value in the block count field, keeping in mind the size of a block is 512 bytes. The next partition (UMS, the internal sd) must start as stated above, so just write the correct value in the block size field of the #12 partition. I suggest to keep the UMS partition if you're running a stock or stock-derived rom, just make it very small (in the attached PIT I made it about 50MB, small-ums_I9100_16GB.pit), but if you're running an AOSP flavor of android you can get rid of the UMS partition and the HIDDEN one (https://cdn-akfdev.com/docand/preload). Keep in mind the sum of block size and block count of the #12 UMS partition must be exactly the number in the block size of the #13 HIDDEN partition (or the DATAFS must end on the last block of the HIDDEN partition if you're getting rid of the last two partitions).
After you saved the new pit file, just upload to your phone with heimdall or odin.
$ heimdall flash --repartition --pit newpit.pit
You can have a look at the new partition table in recovery, with an adb shell, using parte
Setting phone into Communication Mode
DOWNLOAD the current PIT file from the phone
Using Heimdall ( http://glassechidna.com.au/heimdall/ )
PIT Editing from PIT Magic v1.3.10
Push the New PIT File back to the phone using ODIN
WIPE PHONE DATA
Turn phone on into Android System Recovery Mode
** Beware power button is now the SELECT BUTTON. **
Clean Phone Data and Format
1 ) Wipe data/factory reset
2 ) Wipe Cache Partition
The confirmation screen after selecting wipe. (scroll down to the YES line)
Reboot The Phone after wiping both the data/factory & cache partition.
Phone should reboot into the Welcome Screen.