Editing Activation File

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:
== File Handling ==
== File Structure ==
 
On 1.76, act.dat is loaded and updated by the SceShellCore process.
 
Beyond 1.76, act.dat is loaded and updated directly by the kernel.
 
=== File Verification ===
 
A HMACSHA256 of the entire act.dat file using the SHA256 of the OpenPsId as the key is stored in Vtrm using SceShellCore's authority-id (0x3800000000000010) in slot 0.
 
<code>hmacsha256(sha256(sceKernelGetOpenPsIdForSystem()), act.dat)</code> (pseudo-code)
 
* <code>sceSblVtrmStoreNth(0x3800000000000010, hmac, 64, 0)</code>
* <code>sceSblVtrmRetrieveNth(0x3800000000000010, hmac, 64, 0)</code>
* <code>sceSblVtrmFreeNth(0x3800000000000010, 0)</code>
 
''Note: sceSblVtrm* are kernel functions.''
 
This prevents easily adding or replacing the act.dat file directly. You will need to update this HMAC to prevent the act.dat file from being deleted when adding or replacing it.
 
== File ==


An act.dat file is made up of 1 to 21 sequential activation structures.
An act.dat file is made up of 1 to 21 sequential activation structures.
Line 25: Line 5:
The file is truncated to valid activation structures, so its size will be a multiple of 512.
The file is truncated to valid activation structures, so its size will be a multiple of 512.


=== Activation structure (Universal) ===
=== Activation Structure ===


Fields are big-endian.
Fields are big-endian.
Line 38: Line 18:
| Signature || <code>0x000</code> || 4 || <code>41 43 54 00</code> ('ACT\0')
| Signature || <code>0x000</code> || 4 || <code>41 43 54 00</code> ('ACT\0')
|-
|-
| Version || <code>0x004</code> || 2 || <code>00 01</code> || 1 , 2 or 3
| Version || <code>0x004</code> || 2 || <code>00 00 00 01</code> || 1 (current)
|-
|-
| Type || <code>0x006</code> || 2 || <code>00 02</code> || 2 or 3
| Type || <code>0x006</code> || 2 || <code>00 00 00 02</code> || 2 or 3
|-
|-
| PSN Account ID || <code>0x008</code> || 8 || <code>AB CD EF 01 02 34 78 91</code> ||  
| PSN Account ID || <code>0x008</code> || 8 || <code>AB CD EF 01 02 34 78 91</code> ||  
Line 50: Line 30:
| Unknown || <code>0x020</code> || 64 || - ||  
| Unknown || <code>0x020</code> || 64 || - ||  
|-
|-
| DeviceId (OpenPsId SHA256 Hash) || <code>0x060</code> || 32 || - || <code>sha256(sceKernelGetOpenPsIdForSystem())</code> (pseudo-code)
| OpenPsId SHA256 Hash || <code>0x060</code> || 32 || - || <code>sha256(sceKernelGetOpenPsIdForSystem())</code>
|-
|-
| Unknown || <code>0x080</code> || 32 || - || Found to match exactly for different users and consoles. Maybe system version SHA256 hash?
| Unknown || <code>0x080</code> || 32 || - || Found to match exactly for different users and consoles. Maybe system version SHA256 hash?
|-
|-
| RIF Secret Encryption IV || <code>0x0A0</code> || 16 || - || See [[Rights Information Files#RIF|rif]]
| Unknown || <code>0x0A0</code> || 16 || - || Match exactly to data found in RIF data at 0x260 of same size (KDS RIF only)
|-
| RIF Secret Encryption Key Seed || <code>0x0B0</code> || 16 || - || Used to decrypt [[Rights Information Files#Secret|rif secret]] (KDS RIF only)
|-
| RIF Secret Encryption Key Seed for Version 2 || <code>0x0C0</code> || 16 || - || Used to decrypt [[Rights Information Files#Secret|rif secret]] (KDS RIF only) (Version 2)
|-
|-
| RIF Secret Encryption Key Seed for Version 3 || <code>0x0D0</code> || 16 || - || Used to decrypt [[Rights Information Files#Secret|rif secret]] (KDS RIF only) (Version 3)
| Unknown || <code>0x0B0</code> || 16 || - || Used to decrypt RIF secret data (KDS RIF only)
|-
|-
| Unknown || <code>0x0E0</code> || 32 || - ||  
| Unknown || <code>0x0C0</code> || 64 || - ||  
|-
|-
| RSA Signature || <code>0x100</code> || 256 || - || Verified using same public key as RIF type 0
| RSA Signature || <code>0x100</code> || 256 || - || Verified using same public key as RIF type 0
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)