PUP File Format
From PS3Wiki
PUP (Playstation Update Package) files are packages which contain the files used to update a PSP or PS3 system.
The HMAC key used to verify the packages has been released. Look around for "pup-hmac"
Contents |
Header
| Offset | Length | Type | Information |
|---|---|---|---|
| 0x0 | 0x8 | unsigned long | Magic |
| 0x8 | 0x8 | unsigned long | Package Version |
| 0x10 | 0x8 | unsigned long | Image Version |
| 0x18 | 0x8 | unsigned long | File Count |
| 0x20 | 0x8 | unsigned long | Header Length |
| 0x28 | 0x8 | unsigned long | File Length |
| 0x30 | 0x20 * File Count | File Table | File Table |
| 0x30 + (0x20 * File Count) | 0x20 * File Count | Hash Table | Hash Table |
| 0x30 + (0x40 * File Count) | 0x14 | bytes | Header Hash |
| 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:
| Offset | Length | Type | Information |
|---|---|---|---|
| 0x0 | 0x8 | unsigned long | Entry ID |
| 0x8 | 0x8 | unsigned long | Data Offset |
| 0x10 | 0x8 | unsigned long | Data Length |
| 0x18 | 0x8 | unsigned long | Unknown |
Filename IDs
| 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 hash entry format is:
| Offset | Length | Type | Information |
|---|---|---|---|
| 0x0 | 0x8 | unsigned long | File Entry ID |
| 0x8 | 0x14 | bytes | HMAC-SHA1 hash |
| 0x1C | 0x4 | unsigned int | Unknown |
PS3 Update
DEV NOTE: Information not completely finalized.
Upon PS3 OFW update (.PUP package) the PS3 extracts data to a folder called PS3UPDATE, it then moves that data to /dev_hdd1/ and restarts to install.
Interestingly, the size of the PUP it adds is 5,222KB, which is the same size of a service JIG file, does the lv2diag just copy to /dev_hdd1/ ?
Regardless, I have yet to decrypt a lv2 SELF, I will add here when I do. Until I do, here is a badly done directory structure:
-PS3UPDATE
|-----------a
|-----------ps3swu.self
|-----------PS3UPDAT.PUP
|-----------pup_data.txt
|-----------sys_audio.self
|-data
|-------------Fonts for all languages