Editing SELF File Format

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 12: Line 12:
| 0x8 || 1 || Category || 1 on SELF, 4 on PUP Entry (probably SPP). See [https://www.psdevwiki.com/ps3/Certified_File#Category PS3/PS Vita Category].
| 0x8 || 1 || Category || 1 on SELF, 4 on PUP Entry (probably SPP). See [https://www.psdevwiki.com/ps3/Certified_File#Category PS3/PS Vita Category].
|-
|-
| 0x9 || 1 || [[Program Type]] || First Half denotes version (anything between 0, oldest and F, newest), second Half denotes true type, 4 for Games, 5 for sce_module modules, 6 for Video Apps like Netflix, 8 for System/EX Apps/Executables, 9 for System/EX modules/dlls
| 0x9 || 1 || [[Program Type]] || First Half denotes version (anything between 0, oldest and F, newest), second Half denotes true type, 4 for Games, 6 for Video Apps like Netflix, 8 for System/EX Apps/Executables, 9 for System/EX modules/dlls
|-
|-
| 0xA || 2 || Padding ||
| 0xA || 2 || Padding ||
Line 147: Line 147:
|0x11||[[CloudABI]]
|0x11||[[CloudABI]]
|}
|}
Notes: It is often set to <code>0</code> regardless of the target platform.
It is often set to <code>0</code> regardless of the target platform.
The PS4 uses the same ABI identifier as FreeBSD.
|-
|-
| colspan="2" | 0x08 || colspan="2" | 1 || <tt>e_ident[EI_ABIVERSION]</tt>
| colspan="2" | 0x08 || colspan="2" | 1 || <tt>e_ident[EI_ABIVERSION]</tt>
Line 154: Line 153:
|-
|-
| colspan="2" | 0x09 || colspan="2" | 7 || <tt>e_ident[EI_PAD]</tt>
| colspan="2" | 0x09 || colspan="2" | 7 || <tt>e_ident[EI_PAD]</tt>
|Padding
|currently unused
|-
|-
| colspan="2" | 0x10 || colspan="2" | 2 || <tt>e_type</tt>
| colspan="2" | 0x10 || colspan="2" | 2 || <tt>e_type</tt>
Line 160: Line 159:
{| class="wikitable"
{| class="wikitable"
|-
|-
!Value!!Type!!Notes
!Value!!Type
|-
|-
|0x00||ET_NONE||
|0x00||ET_NONE
|-
|-
|0x01||ET_REL||
|0x01||ET_REL
|-
|-
|0x02||ET_EXEC||
|0x02||ET_EXEC
|-
|-
|0x03||ET_DYN||
|0x03||ET_DYN
|-
|-
|0x04||ET_CORE||
|0x04||ET_CORE
|-
|-
|0xfe00||ET_SCE_EXEC||eboot without ASLR
|0xfe00||ET_SCE_EXEC
|-
|-
|0xfe01||ET_SCE_REPLAY_EXEC||
|0xfe01||ET_SCE_REPLAY_EXEC
|-
|-
|0xfe10||ET_SCE_DYNEXEC||eboot with ASLR
|0xfe10||ET_SCE_DYNEXEC
|-
|-
|0xfe18||ET_SCE_DYNAMIC||
|0xfe18||ET_SCE_DYNAMIC
|-
|-
|0xfeff||ET_HIOS||
|0xfeff||ET_HIOS
|-
|-
|0xff00||ET_LOPROC||
|0xff00||ET_LOPROC
|-
|-
|0xffff||ET_HIPROC||
|0xffff||ET_HIPROC
|}  
|}  
|-
|-
Line 381: Line 380:
As PS4 SELF decryption keys are not publicly known, to decrypt SELFs, one can use his PS4 as a blackbox. There are some conditions: the SELF must have valid signatures, it must have a required FW version lower than the FW version of the PS4 being used, and for System SELFs the SELF key_revision must be according to the PS4 FW version. There are exceptions like in first PS4 firmwares where some SELF checks were missing and allowed to decrypt SELFs that did not meet such requirements.
As PS4 SELF decryption keys are not publicly known, to decrypt SELFs, one can use his PS4 as a blackbox. There are some conditions: the SELF must have valid signatures, it must have a required FW version lower than the FW version of the PS4 being used, and for System SELFs the SELF key_revision must be according to the PS4 FW version. There are exceptions like in first PS4 firmwares where some SELF checks were missing and allowed to decrypt SELFs that did not meet such requirements.


=== make_fself by flatz (2018) ===
=== make_fself by flatz ===


* https://wololo.net/ps4-fpkg-writeup-by-flatz
To document.
 
=== make_fself.py (2018-2020) ===
 
* https://github.com/OpenOrbis/OpenOrbis-PS4-Toolchain/blob/master/scripts/make_fself.py
 
* https://github.com/nikolaevich23/PKGi-PS4/blob/master/make_fself.py
 
=== make_fself_gui by cfwprpht (2018) ===
 
* https://github.com/cfwprpht/make_fself_gui
 
=== free-ps2-pub-gen by cfwprpht (2018) ===
 
* https://github.com/cfwprpht/free-ps2-pub-gen
 
=== ps4_unfself by SocraticBliss (2020-2024) ===
 
* https://github.com/SocraticBliss/ps4_unfself


=== SELF backport tools ===
=== SELF backport tools ===


To be documented.
To document.




{{File Formats}}
{{File Formats}}
<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)