Join Us and become a Member for a Verified Badge to access private areas with the latest PS4 PKGs.
Status
Not open for further replies.
I've been researching PS4 License files for Games and Applications. And there is an file format called IDX. I took the time to reverse this format and document it. Even make a program to generate these files for the community.

Here is the source code to the application: CrazyVoid GenIDX PS4 Program <--- Save this file as genidx.c in ps4_tools

Code:
/*  CrazyVoid Generate PS4 IDX File
 *  - 07/24/2017
 */
 
#include <sys/types.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include <zlib.h>
#include <dirent.h>
#include <assert.h>
#include <stdint.h>
 
#ifdef WIN32
#include "mingw_mmap.h"
#include <windows.h>
#else
#include <sys/mman.h>
#endif
 
#include "tools.h"
 
u8 magicPreset[0x9] = { 0x72, 0x69, 0x64, 0x78, 0x01, 0x00, 0x00, 0x00, 0x01 };
u8 padding1Preset[0x4] = { 0x00, 0x00, 0x00, 0x00 };
u8 unknownPreset[0x16] = { 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
u8 padding2Preset[0x16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
 
u8 outputFile[0x50];
 
int generateIDX(char *CONTENT_ID, char *ENTITLEMENT_LABEL)
{
    int ret;
    if(strlen(CONTENT_ID) == 19)
    {
        if(strlen(ENTITLEMENT_LABEL) == 16)
        {
            char outputFilename[30] = "fake";
            strcat(outputFilename, CONTENT_ID);
            strcat(outputFilename, ".idx");
            printf("Output : %s\n\n", outputFilename);
 
            memcpy(outputFile, magicPreset, 9);
            memcpy(outputFile+9, CONTENT_ID, 19);
            memcpy(outputFile+28, padding1Preset, 4);
            memcpy(outputFile+32, ENTITLEMENT_LABEL, 16);
            memcpy(outputFile+48, unknownPreset, 16);
            memcpy(outputFile+64, padding2Preset, 16);
 
            FILE *fp;
            fp = fopen(outputFilename, "w+");
            fwrite(outputFile, sizeof(outputFile), 1, fp);
            fclose(fp);
            ret = 0;
        }
        else
        {
            printf("[ERROR] Invalid length of ENTITLEMENT LABLE\nFailed to create IDX\n\n");
            ret = 1;
        }
    }
    else
    {
        printf("[ERROR] Invalid length of CONTENT ID\nFailed to create IDX\n\n");
        ret = 2;
    }
 
    return ret;
}
 
void help_Output()
{
    printf("====PS4 IDX Generator - CrazyVoid======\n");
    #ifdef WIN32
    printf("genidx.exe CONTENT_ID ENTITLEMENT_LABEL\n\n");
    #else
    printf("./genidx CONTENT_ID ENTITLEMENT_LABEL\n\n");
    #endif
    printf("[ERROR] INCORRECT AMOUNT OF ARGUMENTS\n\n");
}
 
int main(int argc, char *argv[])
{
    int ret;
 
 
    if (argc != 3)
    {
        help_Output();
        ret = 3;
    }
    else
    {
        // Dont change this line, stealing others work is not nice :)
        // If you add code, feel free to add your name.
        printf("[CrazyVoid] IDX Generator v0.1\n");
        ret = generateIDX(argv[1], argv[2]);
    }
 
    return ret;
}
You'll also need PS4 Tools by Harlequin (Twitter aka @happyelement who also helped with Resigning PS4 Trophies) -> https://github.com/harlequin/ps4tools
-> Don't forget to include genidx.c in the Makefile in PS4 Tools

To use genidx, You need CONTENT_ID and ENTITLEMENT_LABEL of the application you're making the IDX file for. Once you have them. You can pass them to the app like so:
Code:
Linux : ./genidx EP9009-CUSA00061_00 WEBMAF000DEFAULT
Windows : ./genidx.exe EP9009-CUSA00061_00 WEBMAF000DEFAULT
The application will put out an .idx following the naming for debug idx files.
Code:
Example : fakeEP9009-CUSA00061_00.idx
Here is the documented file format of IDX files.
PS4 IDX Generator v0.1 and GenIDX Tool Tutorial by CrazyVoid.png

More information on the use of these files will be released in the future. RIF and IDX files are going to be an important part to Game Backups and Homebrew. Enjoy scene! Much Love <3 CrazyVoid 2017!
 

Comments

Hey you ... I have updated the github page today with your source code.
I have also put the credits into README

Big thanks for finding new ways and tools
 
Hey you ... I have updated the github page today with your source code.
I have also put the credits into README

Big thanks for finding new ways and tools

Thank you, I try to make your tools with MinGW but the program say me that "Nothing to be done from the makefile", where I'm wrong? Help me please!
 
@XfactorX have you been able to do anything useful with the tool? I can't understand why nobody has come back with something because this tools seems to be extremely useful in some manner in relations to what we have going right now I hope someone looks into this could lead to something important pertaining to game updates or dlc ownership or just fake ownership of a game using a fake account like reactpsn.
 
Status
Not open for further replies.
Back
Top