1

I'am trying to unpack Android game archive file (.NPK).

The game is "Nvidia Glowball demo" (it has been pre-installed on my android tablet)

Archive structure seems to be simple, but I can't decompress the data.

Archive structure:

4 bytes - "BE EF CA FE" signature
4 bytes - File headers count (little-endian)
[File headers]
4 bytes - "BE EF CA FE" signature
[Files data]

File header structure:

4 bytes - File name length (little-endian)
[File name]
8 bytes - Unknown (not a checksum, signature?)
8 bytes - File offset (little-endian)
8 bytes - Compressed size (little-endian)
8 bytes - Uncompressed size? (little-endian)

File examples:

initprescenecommon.txt

Header (10 bytes compressed, 2 bytes uncompressed, unknown field= 1033E64E):

A373h: 16 00 00 00 69 6E 69 74 70 72 65 73 63 65 6E 65  ....initprescene 
A383h: 63 6F 6D 6D 6F 6E 2E 74 78 74 10 33 E6 4E 00 00  common.txt.3.N.. 
A393h: 00 00 F3 45 41 01 00 00 00 00 0A 00 00 00 00 00  ...EA........... 
A3A3h: 00 00 02 00 00 00 00 00 00 00                    ..........

Data:

141:45F3h: 1A F3 84 8A 6F 6F 6A 49 62 77                    ....oojIbw

teleporter1_enter.txt

Header (10 bytes compressed, 2 bytes uncompressed, unknown field= 1933E64E):

A490h: 15 00 00 00 74 65 6C 65 70 6F 72 74 65 72 31 5F  ....teleporter1_ 
A4A0h: 65 6E 74 65 72 2E 74 78 74 19 33 E6 4E 00 00 00  enter.txt.3.N... 
A4B0h: 00 58 52 41 01 00 00 00 00 0A 00 00 00 00 00 00  .XRA............ 
A4C0h: 00 02 00 00 00 00 00 00 00                       .........

Data:

141:5258h: 1A F3 84 8A 6F 6F 6A 49 62 77                    ....oojIbw

grate_enter.txt

Header (19 bytes compressed, 11 bytes uncompressed, unknown field= 1033E64E):

A1A8h: 0F 00 00 00 67 72 61 74 65 5F 65 6E 74 65 72 2E  ....grate_enter. 
A1B8h: 74 78 74 10 33 E6 4E 00 00 00 00 8E 33 41 01 00  txt.3.N.....3A.. 
A1C8h: 00 00 00 13 00 00 00 00 00 00 00 0B 00 00 00 00  ................ 
A1D8h: 00 00 00                                         ...

Data:

141:338Eh: 1A F3 94 40 25 A2 19 40 28 43 2E 8A 88 6D 6A 77  ...@%..@(C...mjw 
141:339Eh: 10 6C FA                                         .l.

Theese three files have compressed size bigger than uncompressed. I think this happens because theese are text files. For example balltextures_entrance.nma file has 338 bytes compressed and 3263 bytes uncompressed.

Note that initprescenecommon.txt and teleporter1_enter.txt have same data, but differ "unknown field".

Does anyone have some ideas?

  • Have you tried specific tools such as mikrotik-npk ? – perror Jan 5 at 10:11
  • @perror yes, unfortunately it doesn't work. A quick googling led me to the fact that .NPK file extension used in many different software / games, and no one has same binary format that mine. – Alexey Jan 5 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.