PS4 CFW and Hacks       Thread starter PSXHAX       358       0
Not open for further replies.


Staff Member
Today PlayStation 4 homebrew developer Red-EyeX32 has made available a PlayStation 4 Trophy (PS4 .TRP File) Extractor similar to the previous PS3 and PS Vita tools from Red Squirrel with details below.

Download: Red-EyeX32_-_Playstation_4_Trophy_Extractor.rar / Red-EyeX32_-_Playstation_4_Trophy_Extractor.rar (Mirror)

To quote: Sup guys, Just a little thing I had been working on for quite some time now. This here will let you extract PlayStation 4 .trp files and extract the files in the container. There are mostly .png and .esfm files inside the container. All the .esfm files are encrypted from what I have seen which needs more further investigation.

I have been working with intelligent people trying to get these files decrypted. From what I have heard .esfm files are encrypted .xml files just like how PS3's trophy files were. Anyways here's a pic of the tool.

Thanks to Jakes625 for being helpful :)

Finally, from Wololo: TRP files are a fairly simple container with a header describing the content of the files (similar to a tar file or an uncompressed zip). The tool is a straightforward GUI that runs a command line application which is in charge of the unpacking process.

For those of you who want to dig deeper or create their own tool to extract these files, Red-EyeX32 has conveniently updated the PS4 dev wiki with some information about the TRP format:
typedef unsigned long int u32;
typedef unsigned long long int u64;
typedef struct{
    u32 magic; //Ü¢M.
    u32 version; //#3 on ps4
    u64 fileSize; //size of full trp file
    u32 entryCount; //num entries
    u32 entrySize; // size of entry
    u32 unk1; //padding probably
    u8 hash[20]; //sha1 hash
    u32 unk2; // 0x30313000 ??
    u8 padding[0x2C];
} header_t
typedef struct{
    signed char name[0x20];
    u64 entryStart; //relative to &buffer
    u64 entryLength;
    u32 unk1; //3 on some, 0 on others, could be flags or an enum to determine if encrypted or not?
    u8 unk2[0xC];
} entry_t;
Trophy files contain some information related to the trophies of your games, including png icons (which are *not* encrypted), and esfm files (which *are* encrypted)

You can apparently grab TRP files directly from retail PS4 game Blu-ray discs, although I have yet to try.


Seemes to be 2 types of entries. Encrypted and Non - Encrypted. Non-Encrypted files seem to be just png image files. Encrypted files seem to be just ESFM files, (encrypted container for trophy.sfm files)

Each ESFM file in the .trp file contain the same first 512 bits.
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  0B 29 DE DE CB D5 62 61 C6 5C 75 24 9B 0C A4 08  .)ÞÞËÕbaÆ\u$›.¤.
00000010  0E 40 AE C1 7C 92 1F 1E 6D D7 B6 CC 59 2D DB B8  [email protected]®Á|’..m׶ÌY-Û¸
00000020  5C 26 E7 9E 3F F6 54 9E A2 E4 94 2F 58 7F D6 9D  \&çž?öTž¢ä”/X.Ö.
00000030  CD 96 49 16 B7 9D 1C F4 DE D9 A7 DD FB A0 1A 68  Í–I.·..ôÞÙ§Ýû .h
ESFM is just an encrypted XML format. It consists of IV of 0x10 bytes and the data itself. A key is generated by encrypting NP communication ID with keygen ERK/keygen IV (stored inside system library) using AES-CBC-128. Then you can decrypt data using this key and IV from the header.
NP Com ID for above Buffer: CUSA00190_00
ESFM IV: 0x0 - 0x10
Not open for further replies.
Recent Articles
PS4 Patch Builder for Building Modded Update PKGs by MODDED WARFARE
Since his YouTube Issues PlayStation 4 homebrew developer @MODDEDWARFARE returns releasing on Twitter a PS4 Patch Builder application used for building modded Update Packages (PKGs) alongside a...
PS Vita System Software / Firmware 3.73 is Live, Don't Update!
Trick or treat?! 🎃 Since their previous PS Vita OFW revision, today Sony pushed live a PlayStation Vita System Software / Firmware 3.73 Update leaving many curious if they patched the H-Encore 2...
PlayStation Store Halloween Sale Now Live, PSN Game Deals Up to Half Off
The month is already half over and Halloween 2019 is quickly approaching as Sony unleashes their latest PlayStation Store Halloween Sale featuring PSN game deals at up to 50% off on select titles...
Sony PlayStation Augmented Reality (AR) Wireless Headset Patent Surfaces
Contrary to the potential PSVR2 Patent that superimposes a computer-generated image on a user's view of the real world, the latest PlayStation Augmented Reality (AR) Wireless Headset Patent by...