This is the specifications for the archive file which is handled by the
Game Extractor plugin
Archive_APK_APKF.
Endian Order: | Little Endian |
Compression: | none |
Encryption: | None |
This format is used by the following Games:
Spider-Man 3 | *.apk |
Kung Fu Panda | *.apk |
This is the format specification information:
| // ARCHIVE HEADER
4 - Header (APKF)
4 - Unknown (263)
4 - null
4 - Padding (-1)
4 - Unknown (2)
// DIRECTORY
8 - Properties Directory Offset [+20]
// DATA TYPE DIRECTORY
// for each data type
4 - Data Type (TEX + null, MAT + null, MESH)
if (dataType == MAT){
4 - Unknown (2)
4 - Unknown (1)
4 - Offset To The First Entry Of This Type in the Details Directory (relative to this field offset)
4 - Number Of Files of this type
4 - Unknown (16)
2 - Unknown (0)
2 - Unknown (-256)
}
else if dataType == TEX){
4 - Unknown (3)
4 - Unknown (2)
4 - Offset To The First Entry Of This Type in the Details Directory (relative to this field offset)
4 - Number Of Files of this type
4 - Unknown (4)
2 - Unknown (2)
2 - Unknown (256)
}
else if dataType == MESH){
4 - Unknown (2)
4 - Unknown (2)
4 - Offset To The First Entry Of This Type in the Details Directory (relative to this field offset)
4 - Number Of Files of this type
4 - Unknown (16)
2 - Unknown (4)
2 - Unknown (256)
}
else if dataType == SKEL){
4 - Unknown (2)
4 - Unknown (1)
4 - Offset To The First Entry Of This Type in the Details Directory (relative to this field offset)
4 - Number Of Files of this type
4 - Unknown (16)
2 - Unknown (0)
2 - Unknown (-256)
}
else if dataType == ANIM){
4 - Unknown (131350)
4 - Unknown (1)
4 - Offset To The First Entry Of This Type in the Details Directory (relative to this field offset)
4 - Number Of Files of this type
4 - Unknown (16)
2 - Unknown (0)
2 - Unknown (-256)
}
else if dataType == AEPS){
4 - Unknown (1)
4 - Unknown (1)
4 - Offset To The First Entry Of This Type in the Details Directory (relative to this field offset)
4 - Number Of Files of this type
4 - Unknown (16)
2 - Unknown (0)
2 - Unknown (-256)
}
4 - null End Of Data Type Directory indicator
// DETAILS DIRECTORY
// for each file
4 - Filename Offset (relative to the start of this field)
4 - Hash?
4 - Properties Directory Entry Length (TEX=68, MESH=244/808/404, MAT=704/160, ...)
if (entry is TEX || entry is MESH){
4 - File Data Length
}
// FILENAME DIRECTORY
// for each file
X - Filename
1 - null Filename Terminator
X - null Padding to a multiple of 4? bytes
// PROPERTIES DIRECTORY
4 - Header (IMG + null)
4 - null
8 - Padding Multiple (16)
4 - Properties Directory Length
4 - Unknown (36/32/28)
4 - Header (PHYS)
4 - null
8 - First Entry Offset (relative to the start of the Properties Directory (64) [-16]
4 - File Data Length
4 - Directory Length (including this field, but not including any of the fields before this one)
X - null Padding so the Offset is a multiple of 16 bytes
// for each file (TEX=68, MESH=244, MAT=704 bytes per entry)
if (TEX){
8 - null
4 - Unknown
4 - Hash?
8 - null
4 - Image Width
4 - Image Height
4 - Unknown (1)
4 - Number Of Mipmaps
4 - File Type (DXT5/DXT3/DXT1)
24 - null
}
else {
X - Properties
X - Padding to a multiple of 16 bytes (Except for the last file of each type, which doesn't have this padding)
}
// FILE DATA
// for each file
X - File Data
// FOOTER
4 - Unknown (-1)
// for each file
4 - Unknown
8 - Unknown (-1) |
These are the accompanying notes and further information:
| Some files are small and are stored in the Properties Directory, others (like TEX) are stored in the File Data at the end |
Game Extractor is able to read files of this type, as well as files from thousands of other games. To give it a try, download
Game Extractor (Basic Version) for
free, and see what it can do.
For further information on this format, refer to the source code on our
GitHub repository.