Editing PKG files
Jump to navigation
Jump to search
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 10: | Line 10: | ||
typedef struct { | typedef struct { | ||
uint32_t pkg_magic; | uint32_t pkg_magic; // 0x000 | ||
uint16_t pkg_revision; // 0x004 | |||
uint32_t | uint16_t pkg_type; // 0x006 | ||
uint32_t pkg_file_count; | uint32_t pkg_unk; // 0x008 - unknown field | ||
uint32_t pkg_entry_count; | uint32_t pkg_file_count; // 0x00C | ||
uint16_t pkg_sc_entry_count; | uint32_t pkg_entry_count; // 0x010 | ||
uint16_t pkg_entry_count_2; | uint16_t pkg_sc_entry_count; // 0x014 | ||
uint32_t pkg_table_offset; | uint16_t pkg_entry_count_2; // 0x016 - same as pkg_entry_count | ||
uint32_t | uint32_t pkg_table_offset; // 0x018 - file table offset | ||
uint64_t pkg_body_offset; | uint32_t pkg_ent_data_size; // 0x01C | ||
uint64_t pkg_body_size; | uint64_t pkg_body_offset; // 0x020 - offset of PKG entries | ||
uint64_t pkg_body_size; // 0x028 - length of all PKG entries | |||
<br> | |||
unsigned char pkg_padding[0x10]; // 0x030 - 16 bytes padding | |||
unsigned char pkg_content_id[0x24]; // 0x040 - packages' content ID as a 36-byte string | unsigned char pkg_content_id[0x24]; // 0x040 - packages' content ID as a 36-byte string | ||
unsigned char | unsigned char pad[0xC]; // 0x064 - 0x070 - padding | ||
uint32_t pkg_drm_type; // 0x070 - DRM type | uint32_t pkg_drm_type; // 0x070 - DRM type | ||
uint32_t pkg_content_type; // 0x074 - Content type | uint32_t pkg_content_type; // 0x074 - Content type | ||
// other stuff... 0x78 - 0x100 | |||
<br> | <br> | ||
/* Digest table */ | /* Digest table */ | ||
Line 43: | Line 35: | ||
unsigned char digest_table_digest[0x20]; // 0x140 - sha256 digest for digest table | unsigned char digest_table_digest[0x20]; // 0x140 - sha256 digest for digest table | ||
unsigned char digest_body_digest[0x20]; // 0x160 - sha256 digest for main table | unsigned char digest_body_digest[0x20]; // 0x160 - sha256 digest for main table | ||
// ... | // ... 0x180 - 0x400 | ||
uint32_t pfs_image_count; // 0x404 - count of PFS images | uint32_t pfs_image_count; // 0x404 - count of PFS images | ||
uint64_t | uint64_t pfs_flags; // 0x408 - PFS flags | ||
uint64_t pfs_image_offset; // 0x410 - offset to start of external PFS image | uint64_t pfs_image_offset; // 0x410 - offset to start of external PFS image | ||
uint64_t pfs_image_size; // 0x418 - size of external PFS image | uint64_t pfs_image_size; // 0x418 - size of external PFS image | ||
// ... | // ... | ||
} pkg_header; | |||
} pkg_header; | |||
=== Files === | === Files === |