Editing SLB2

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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:
== Structure ==
== SLB2 structure ==
 
[[File:PS4 SLB PUP container format - SKFU.png|thumb|PS4 SLB PUP container format - SKFU]]
[[File:PS4 SLB PUP container format - SKFU.png|thumb|PS4 SLB PUP container format - SKFU]]


<source lang="c">
<source lang="c">
/* SLB2 structure is little endian */
/* file structure of SLB goes as following, if unpacking make sure you use 64 bits little endian on windows os */
typedef unsigned char u8;
typedef unsigned long int u32;
typedef unsigned long long int u64;
   
   
struct SceSlb2Entry {
typedef struct{
uint32_t fileStartSector;
u32 offset; //1 block is headersize (512 padded)
uint32_t fileSizeInByte;
u32 cryptSize;
uint32_t reserved[2]; // padding for alignment
u64 reserved; //probably file alignment
char    fileName[32];
u8 fileName[32];
} __attribute__((packed));
} fileEntry;
   
   
struct SceSlb2Header {
typedef struct{
uint32_t magic; // "SLB2"
u32 magic; //SLB2
uint32_t version; // ex: 1
u32 version; //1
uint32_t flags; // ex: 0
        u32 flags; // 0
uint32_t entryNum;
u32 fileCount;
uint32_t sizeInSector;
u32 blockCount;
uint32_t reserved[3]; // padding for alignment
u8 reserved[12];
struct SceSlb2Entry entryList[0];
fileEntry files[10];
} __attribute__((packed));
} slb2_header;
</source>
</source>


== Unpacking ==
=== SLB2 files to play with ===
[[1.500.000]]:
* <span style="text-decoration: line-through;">http://www.mirrorcreator.com/files/056CKD7J/PS4UPDATE.PUP.rar_links</span>
* <span style="text-decoration: line-through;">https://mega.co.nz/#!WE8zUAyb!ZuZy5Vxrd4eCc4bTvFW_ZC7lu7Ub0tcdyE08xbJtrok (Main)</span>
* <span style="text-decoration: line-through;">https://mega.co.nz/#!GEdQkRRR!KSCLLQEGlWfQwsA3yBo3pkZqqqE6w-Jwk-5CvLd4GR0 (Recovery)</span>


* [https://web.archive.org/web/20141023113732/http://pastie.org/private/4wgojewhp2pq7declhkhw pupunpack.py] (flatz)
[[1.501.000]]:
* <span style="text-decoration: line-through;">http://dus01.ps4.update.playstation.net/update/ps4/image/2013_1112/sys_df008b5601f4a214a3cc65030a02ac4a/PS4UPDATE.PUP?dest=us (Main)</span>
* <span style="text-decoration: line-through;">http://dus01.ps4.update.playstation.net/update/ps4/image/2013_1112/rec_cedada625478db608d5878c019454380/PS4UPDATE.PUP?dest=us (Recovery)</span>
 
=== Unpacking ===
* [https://web.archive.org/web/20141023113732/http://pastie.org/private/4wgojewhp2pq7declhkhw] (flatz)
* [http://www.eurasia.nu/modules.php?name=Downloads&d_op=viewdownloaddetails&lid=10234&ttitle=PS4_PUP_Extractor_v2 PS4 PUP Extractor v2] (xerpi)
* [http://www.eurasia.nu/modules.php?name=Downloads&d_op=viewdownloaddetails&lid=10234&ttitle=PS4_PUP_Extractor_v2 PS4 PUP Extractor v2] (xerpi)
* [https://streetskaterfu.blogspot.fr/2013/11/release-ps4-fw-tool-100.html PS4 FW Tool v1.0.0] (skfu)
* [https://streetskaterfu.blogspot.fr/2013/11/release-ps4-fw-tool-100.html PS4 FW Tool v1.0.0] (skfu)
* [https://github.com/Hykem/ps4tools ps4tools] (hykem, based on flatz)
* <span style="text-decoration: line-through;">https://github.com/Hykem/ps4tools (hykem, based on flatz)</span>
* [https://github.com/harlequin/ps4tools ps4tools] (harlequin, based on flatz and zecoxao)
* https://github.com/harlequin/ps4tools (harlequin, based on flatz and zecoxao)
* [https://github.com/nikosradio/ps4tools ps4tools] (nikosradio, based on flatz)
* https://github.com/nikosradio/ps4tools (nikosradio, based on flatz)
* [https://github.com/Keyaku/ps4tools ps4tools] (Keyaku, based on flatz)
* https://github.com/Keyaku/ps4tools (Keyaku, based on flatz)
* [https://github.com/Jakes625/PS4-PUP-Tool PS4-PUP-Tool] (Jakes625)
* https://github.com/Jakes625/PS4-PUP-Tool (Jakes625)
* [https://github.com/cfwprpht/PS4_AC1D_Flash-Tool PS4_AC1D_Flash-Tool] (cfwprpht)
* [https://github.com/cfwprpht/PS4_AC1D_Flash-Tool PS4_AC1D_Flash-Tool] (cfwprpht)
* [https://github.com/cfwprpht/Usefull_Libraries/blob/master/SLB2/SLB2/SLB2.cs SLB2 library] (cfwprpht)
* [https://github.com/cfwprpht/Usefull_Libraries/blob/master/SLB2/SLB2/SLB2.cs SLB2 library] (cfwprpht)
* [https://github.com/zecoxao/blsunpack blsunpack] (zecoxao)
* [https://github.com/zecoxao/blsunpack blsunpack] (zecoxao)
* [https://github.com/yifanlu/slb2tools slb2tools] (yifan lu)
== Usage ==


SLB2 files are parsed by many executables:
* PS4 [[Southbridge]] EMC IPL to extract C0028001 (EMC IPL) and C0020001 (EMC IPL information) from sflash0s0x32b (inactive partition).


== Other notes ==
It looks like newer (confirmed for OFW 7.55 and above) SLB2 files have some data between 0x200 and 0x270 which doesn't affect any unpacking tool but affects the unpacking on the PS4. The file gets recognised as corrupted if that data isn't there. This data is present in the `recovery` images but not in the `update` images.
-Other note
Newer updates seems to have  New data exactly before the start of the PS4UPDATE.PUP file
It has the same effect as the  one between 0x200 and 0x270
{{Software}}
{{Software}}
<noinclude>[[Category:Main]]</noinclude>
<noinclude>[[Category:Main]]</noinclude>
Please note that all contributions to PS4 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS4 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)