Zip size limited

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Zip size limited

Post by Shokoniraya »

is there any why to import file in zip without reCreate header?
i need to replace a file in a game, zip.bms is good and works, but cant import in bigger size
if i use zip tools like winrar, then game cant run

how can i import a file in zip (PK header) without rebuilding archive or reCreat full header
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Zip size limited

Post by aluigi »

Winrar creates normal zip files, if the game doesn't work with them it means it's a non-standard zip archive (this is why you need zip.bms?) or the game checks some hashes for each file.
Name of the game?
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Zip size limited

Post by Shokoniraya »

aluigi wrote:Winrar creates normal zip files, if the game doesn't work with them it means it's a non-standard zip archive (this is why you need zip.bms?) or the game checks some hashes for each file.
Name of the game?


no, zip.bms and zip2.bms is perfect and game can run without any bug or problem
and does'nt have CRC or HASHING Scanner

game name is nexuiz
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Zip size limited

Post by aluigi »

I don't remember what non-standard version of ZIP is used in Nexuiz, maybe a compression algorithm not available in standard ZIP.
But in theory reimport2 should work.
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Zip size limited

Post by Shokoniraya »

aluigi wrote:I don't remember what non-standard version of ZIP is used in Nexuiz, maybe a compression algorithm not available in standard ZIP.
But in theory reimport2 should work.


reimport2 cant work on any zip, but import and export is ok
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Zip size limited

Post by aluigi »

Upload one of the original zip files of this game.
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Zip size limited

Post by Shokoniraya »

aluigi wrote:Upload one of the original zip files of this game.


here a .obb for android
using same method and cant import bigger than original

when i replace a file in OBB with winrar or 7z: game will crash
when i change a text and use zip.bms and reimport in .obb, game can works with edited text!

file:
Download APK File
Download OBB (Main Data (need to import))
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Zip size limited

Post by aluigi »

Ah right, ZIP files are sequential and so they can't be reimported with reimport2.

Long story short:
- "End of central directory record" points to the array of "Central directory structure"
- each "Central directory structure" points to each "Local file header"
- "Local file header" is followed by the compressed data without any offset to modify if the file is bigger
https://pkware.cachefly.net/webdocs/cas ... PPNOTE.TXT

Long story even shorter:
if quickbms tells you that it can't reimport a bigger file... trust it! :D
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Zip size limited

Post by Shokoniraya »

thank you reply

(Recreating file from scratch! too.. :D )
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Zip size limited

Post by aluigi »

Just curious, what happens if you create the OBB file with winrar/7zip using the "store" method (no compression)?
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Zip size limited

Post by Shokoniraya »

aluigi wrote:Just curious, what happens if you create the OBB file with winrar/7zip using the "store" method (no compression)?


game will stuck with a black screen (even with Decompressed file!)
many games (A lot Of Games!) created with such OBB Header
its very great if someone can solve it
GHOST DEAD
Posts: 218
Joined: Wed Jul 19, 2017 5:04 am

Re: Zip size limited

Post by GHOST DEAD »

Shokoniraya wrote:
aluigi wrote:Just curious, what happens if you create the OBB file with winrar/7zip using the "store" method (no compression)?


game will stuck with a black screen (even with Decompressed file!)
many games (A lot Of Games!) created with such OBB Header
its very great if someone can solve it


don't change header parameters, that is the only problem, anyway, recreating will create a different file, as i know, obb it's just using android file, try re-writing a file and tell me what happen, (del and rewrite)
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Zip size limited

Post by Shokoniraya »

GHOST DEAD wrote:
Shokoniraya wrote:
aluigi wrote:Just curious, what happens if you create the OBB file with winrar/7zip using the "store" method (no compression)?


game will stuck with a black screen (even with Decompressed file!)
many games (A lot Of Games!) created with such OBB Header
its very great if someone can solve it


don't change header parameters, that is the only problem, anyway, recreating will create a different file, as i know, obb it's just using android file, try re-writing a file and tell me what happen, (del and rewrite)


No Chance! Still Crashing!