Trying to solve the Hong Kong N9005 woes using PIT

FeralFire

Senior Member
Jan 18, 2012
512
232
0
Samsung released a 16GB variant of the SM-N9005 in Hong Kong. This device comes with a slightly different PIT than the 'international' version of the phone.
I am attaching the PIT files of both.

Many people have soft bricked their phones while tinkering with the 16GB version. And then, people who updated to the KitKat bootloader have no option but to use a custom ROM because an official ROM using that bootloader and the 16GB pit is not out yet.
When trying to flash official 'international' ROMs on the 16GB device, it gives a 'invalid ext4 image' error.
Through some trial and error, I have made this out to be due to the fact that the 16GB pit file has a different size defined for the 'system' partition.

I have been trying to make a PIT file that will account for the 16GB size of the N9005 and will let people flash 'international' ROMs to their devices and have spent many hours on this project of mine.
And well, for the life of me, I cannot figure out how to make the required PIT.

The differences between the 16GB pit and the 32GB pit are in 3 partitions- System, Cache, SGPT.

Also attaching a PIT file that I made but I didn't want to give it out to the community because I wasn't confident about it and didn't wanna risk being the reason for bricking people's phones.
In this PIT, I have changed the system and the cache partition sizes to match the 32GB pit, but the SGPT partition is untouched because it confuses me.
PIT files can be opened, viewed and edited by the software PIT Magic by lyriquidperfection.
I am asking for advice/help, if anybody has any to offer.


Also, I have read the guidelines about these forums and the strict warning. I hope that this is classified as development. If not, I apologize and would request a mod to move this thread to the appropriate forum.
 

Attachments

ykkfive

Inactive Recognized Developer
Jul 25, 2010
2,819
2,826
193
ykkfive.blogspot.com
Samsung released a 16GB variant of the SM-N9005 in Hong Kong. This device comes with a slightly different PIT than the 'international' version of the phone.
I am attaching the PIT files of both.

Many people have soft bricked their phones while tinkering with the 16GB version. And then, people who updated to the KitKat bootloader have no option but to use a custom ROM because an official ROM using that bootloader and the 16GB pit is not out yet.
When trying to flash official 'international' ROMs on the 16GB device, it gives a 'invalid ext4 image' error.
Through some trial and error, I have made this out to be due to the fact that the 16GB pit file has a different size defined for the 'system' partition.

I have been trying to make a PIT file that will account for the 16GB size of the N9005 and will let people flash 'international' ROMs to their devices and have spent many hours on this project of mine.
And well, for the life of me, I cannot figure out how to make the required PIT.

The differences between the 16GB pit and the 32GB pit are in 3 partitions- System, Cache, SGPT.

Also attaching a PIT file that I made but I didn't want to give it out to the community because I wasn't confident about it and didn't wanna risk being the reason for bricking people's phones.
In this PIT, I have changed the system and the cache partition sizes to match the 32GB pit, but the SGPT partition is untouched because it confuses me.
PIT files can be opened, viewed and edited by the software PIT Magic by lyriquidperfection.
I am asking for advice/help, if anybody has any to offer.


Also, I have read the guidelines about these forums and the strict warning. I hope that this is classified as development. If not, I apologize and would request a mod to move this thread to the appropriate forum.

hi

i am a hk guy and luckly i did not buy the note3. but i wonder why the hk pit is different from european's, since i have no problem in using european roms at all. i have not read the pit files yet but i suggest you to repack the images from european roms and see if it work. if it fails, extract the images and tar them and untar the tar files in your phone, which should not be bound by the pit, if any

good luck
 
  • Like
Reactions: FeralFire

FeralFire

Senior Member
Jan 18, 2012
512
232
0
hi

i am a hk guy and luckly i did not buy the note3. but i wonder why the hk pit is different from european's, since i have no problem in using european roms at all. i have not read the pit files yet but i suggest you to repack the images from european roms and see if it work. if it fails, extract the images and tar them and untar the tar files in your phone, which should not be bound by the pit, if any

good luck

I know for a fact that repackaged ROMs don't work.
Can you explain the other idea? I didn't really understand it.
What do you mean by 'untar files in the phone'?



Also, anybody with a 16GB phone brave enough to test things?
 

ykkfive

Inactive Recognized Developer
Jul 25, 2010
2,819
2,826
193
ykkfive.blogspot.com
I know for a fact that repackaged ROMs don't work.
Can you explain the other idea? I didn't really understand it.
What do you mean by 'untar files in the phone'?



Also, anybody with a 16GB phone brave enough to test things?

i mean, extracting the system.img, for instance, on a linux. then u can use tar command to create a tar file containing the whole system dir, just like a zip but without compression. finally push the tar file to your phone and then untar it to the /system in recovery. thats it

you don need to worry if u do it correctly, since i always use tar to upgrade my phone
 

FeralFire

Senior Member
Jan 18, 2012
512
232
0
i mean, extracting the system.img, for instance, on a linux. then u can use tar command to create a tar file containing the whole system dir, just like a zip but without compression. finally push the tar file to your phone and then untar it to the /system in recovery. thats it

you don need to worry if u do it correctly, since i always use tar to upgrade my phone
Yeah. That would work, but I want to solve this thing without using recovery. So that people can flash without tripping knox.
If people are unopposed to tripping knox, they can flash custom ROMs anyway.

I did build a tar file with heimdal using kitkat system and 16GB pit. Will upload it tomorrow in university. My net here sucks.
 
Last edited:

FeralFire

Senior Member
Jan 18, 2012
512
232
0
I built a tar file using Heimdall.
This was made using the 16GB pit but the files from the leaked Kitkat ROM.

It does not include the bootloader, so it shouldn't be harmful. Still, flash at your own risk.

Need a tester with a 16GB device. Preferably running Kitkat with the new bootloader.
But even without, we just need to see if this flashes successfully.
Try flashing it through odin. Repartition ought not to be ticked, but if it doesn't work without, try with it ticked as well.
If neither work, try it with heimdall.

https://mega.co.nz/#!xgZHRSqC!FGevxC9hims_UBt5xXPfWuII6KnFkw9drBRuywXtfFM
 
  • Like
Reactions: antique_sonic

sorg

Senior Member
Sep 5, 2006
1,049
1,136
143
台灣
Starting from SGS4, PITs are signed and cannot be flashed if modified.
So, you can only flash official PIT signed by Samsung.

If signature of HK version is compatible with International version then you can flash any of them.
 

FeralFire

Senior Member
Jan 18, 2012
512
232
0
Starting from SGS4, PITs are signed and cannot be flashed if modified.
So, you can only flash official PIT signed by Samsung.

If signature of HK version is compatible with International version then you can flash any of them.
The problem with the HK pit is the different size alloted to the system partition.

Does the signing issue extend to Heimdall as well?
 

sorg

Senior Member
Sep 5, 2006
1,049
1,136
143
台灣
I don't suggest to use any flasher except Odin. I never used Heimdall. Actually, it's possible to flash partitions to any place regardless PIT, but it may lead to different kinds of problems.

Long time ago, i've experimented with PIT on i9500. I've flashed PIT through dd (so, i've skipped signature check) and result was cycling reboot. Initial samsung static logo appear, shortly flash and then appear again. Thus, phone didn't even start to boot kernel. Luckily, Exynos has simple bootloader and work independently from PIT and other partitions. I've booted into download mode and flashed original PIT.
There is PIT signature check not only while flashing, but also while booting. You can flash modified PIT file through 3rd party flasher, but phone won't boot.
I doubt Note 3 has different behavior than SGS4. Especially, with much more complicated booting process on Snapdragon (unlike simple Exynos booting process) you are risking to get hard-brick.
 

elvin92

Member
Mar 14, 2014
21
1
0
latest lollipop

Any ideas that the hk version 16gb note 3 able to flash the poland lollipop firmware? I really get confuse coz same version n9005 but both cant share same firmware and ao complicated.
 

cichy3000

Senior Member
Feb 10, 2008
201
2
0
I've got the same question as elvin92,
is it possible to install Polish (XEO) Lollipop ROM on 16GB Note 3 with loaded N9005ZHUENJ1 (TGY) on board?
when trying to install via Odin I get:
...
<ID:0/003> system.img.ext4
<ID:0/003> FAIL! (Ext4)
<ID:0/003>
<ID:0/003> Complete(Write) operation failed.
<OSM> All threads completed. (succeed 0 / failed 1)

so it's Pit fault ? wrong sizes ?
 
  • Like
Reactions: avat2064

attari13

Member
Aug 26, 2012
35
4
0
Want to update to lollipop..

I have note 3 lte sm n9005 16 gb with TGY frimware and want to update to lollipop XEO... plz help? provide pit file...