Editing Playstation Update Package (PUP)
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
== Description == | ==Description== | ||
'''PUP''' ( | '''PUP''' (Playstation Update Package) files are packages which contain the files used to update a PSP or PS3 system. There are 2 different types: patches (PS3PATCH.PUP) and full updates (PS3UPDAT.PUP). Based on the model, there are 4 different release types: Retail/CEX, Shop/SEX, Debug/DEX and Tool/DECR. Within the Retail/CEX there are 2 file versions: 1 is a PUP with a normal file length which also gets released online. The other PUP file version is the same, except it is zero-filled to a fixed filelength of 256MB, which gets released on Gamedisks (if gamecreators build their project to a premaster and give it to Sony for signing, they just use a placeholder of a 256MB PS3UPDATE.PUP which contains no firmwaredata at all - it is completely zerofilled. Sony decides the firmware that gets on the disk and for which firmware the 'Gold' code is signed and mastered). There is no regioning in the .PUP files, they are the same for all different regions. | ||
== | ==Firmware .PUP structure== | ||
The | The HMAC key used to verify the packages has been released. Look around for "pup-hmac" | ||
===Header=== | |||
== | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Offset | ! Offset | ||
! Length | |||
! Type | |||
! Information | |||
|- | |- | ||
| | | 0x0 | ||
| 0x8 | |||
| unsigned long | |||
| Magic | |||
|- | |- | ||
| 0x8 | | 0x8 | ||
| 0x8 | |||
| unsigned long | |||
| Package Version | |||
|- | |- | ||
| 0x10 | | 0x10 | ||
| 0x8 | |||
| unsigned long | |||
| Image Version | |||
|- | |- | ||
| 0x18 | | 0x18 | ||
| 0x8 | |||
| unsigned long | |||
| File Count | |||
|- | |- | ||
| 0x20 | | 0x20 | ||
| 0x8 | |||
| unsigned long | |||
| Header Length | |||
|- | |- | ||
| 0x28 | | 0x28 | ||
| 0x8 | |||
| unsigned long | |||
| File Length | |||
|- | |- | ||
| 0x30 | | 0x30 | ||
| 0x20 * '''File Count''' | |||
| '''File Table''' | |||
| File Table | |||
|- | |- | ||
| 0x30 + (0x20 * ''' | | 0x30 + (0x20 * '''File Count''') | ||
| 0x20 * '''File Count''' | |||
| '''Hash Table''' | |||
| Hash Table | |||
|- | |- | ||
| 0x30 + (0x40 * ''' | | 0x30 + (0x40 * '''File Count''') | ||
| 0x14 | |||
| bytes | |||
| Header Hash | |||
|- | |- | ||
| 0x44 + (0x40 * ''' | | 0x44 + (0x40 * '''File Count''') | ||
| 0xC | |||
| bytes | |||
| Unknown | |||
|} | |} | ||
=== | ===File Table=== | ||
The file table consists of a number of file entries determined by '''File Count''', with the format below: | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Offset | ! Offset | ||
! Length | |||
! Type | |||
! Information | |||
|- | |- | ||
| 0x0 | |||
| 0x8 | |||
| unsigned long | |||
| Entry ID | |||
|- | |- | ||
| | | 0x8 | ||
| 0x8 | |||
| unsigned long | |||
| Data Offset | |||
|- | |- | ||
| 0x8 || | | 0x10 | ||
| 0x8 | |||
| unsigned long | |||
| Data Length | |||
|- | |- | ||
| | | 0x18 | ||
| 0x8 | |||
| unsigned long | |||
| Unknown | |||
|} | |} | ||
=== | ===Filename IDs=== | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! File Entry ID | |||
! Filename | |||
|- | |- | ||
| | | 0x100 | ||
| ps3version.txt | |||
|- | |- | ||
| | | 0x101 | ||
| resource.txt | |||
|- | |- | ||
| | | 0x102 | ||
| shop.txt | |||
|- | |- | ||
| | | 0x103 | ||
| pup_data.txt | |||
|- | |- | ||
| | | 0x104 | ||
| patch_build.txt | |||
|- | |- | ||
| | | 0x200 | ||
| ps3swu.self | |||
|- | |- | ||
| | | 0x201 | ||
| vsh.tar | |||
|- | |- | ||
| | | 0x202 | ||
| dots.txt | |||
|- | |- | ||
| | | 0x203 | ||
| patch_data.pkg | |||
|- | |- | ||
| | | 0x300 | ||
| update_files.tar | |||
| | |||
|} | |} | ||
=== | ===Hash Table=== | ||
The hash table contains a hash entry for every file inside the PUP. | |||
The | |||
The hash entry format is: | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Offset | ! Offset | ||
! Length | |||
! Type | |||
! Information | |||
|- | |- | ||
| 0x0 | | 0x0 | ||
| 0x8 | |||
| unsigned long | |||
| File Entry ID | |||
|- | |- | ||
| 0x8 || | | 0x8 | ||
| 0x14 | |||
| bytes | |||
| HMAC-SHA1 hash | |||
|- | |- | ||
| | | 0x1C | ||
| 0x4 | |||
| unsigned int | |||
| Unknown | |||
|} | |} | ||
==Files in tree example== | |||
Here is an example of the files stored in a PUP, This is from firmware version 3.55 | |||
PSUPDATE.PUP | |||
├── dots.txt | ├── dots.txt | ||
├── license.txt | ├── license.txt | ||
Line 910: | Line 279: | ||
│ ├── info0 | │ ├── info0 | ||
│ └── info1 | │ └── info1 | ||
├── update_files.tar | ├── update_files.tar | ||
├── update_flags.txt | ├── update_flags.txt | ||
├── version.txt | ├── version.txt | ||
└── vsh.tar | └── vsh.tar | ||