.SAR/Android Game

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Omnitrix
Posts: 19
Joined: Fri Aug 31, 2018 11:24 pm

.SAR/Android Game

Post by Omnitrix »

Hello! I want to rip textures and sprites from Sega Heroes mobile game (Android). I tried method with NOX+Ninja Ripper, but it didn't work. Then I tried to unpack game data directly, but main files has .sar format with ZSTD header. I tried 7-zip with Zstandart decompression plugin, but unsuccessful. Can someone help me?
I uploaded .apk file if someone need this. https://www.dropbox.com/s/8g9q78oia2uytrq/SEGA%20Heroes%20Android%20v%2040.133981%20by%20Sonic%20and%20all%20Characters.apk?dl=0
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: .SAR/Android Game

Post by aluigi »

The TOC (information about files) is encrypted but you can just dump all the ZSTD compressed files using this script with quickbms and the -e option:

Code: Select all

comtype zstd
findloc OFFSET binary "ZSTD"
do
    goto OFFSET
    get DUMMY long
    findloc NEXT_OFFSET binary "ZSTD" 0 ""
    if NEXT_OFFSET == ""
        get SIZE asize
    else
        math SIZE = NEXT_OFFSET
    endif
    math SIZE -= OFFSET

    goto OFFSET
    idstring "ZSTD"
    get XSIZE long
    math OFFSET + 8
    math SIZE   - 8
    clog "" OFFSET SIZE XSIZE

    math OFFSET = NEXT_OFFSET
while NEXT_OFFSET != ""

Remember to use the -e option from command-line or it will not work
Omnitrix
Posts: 19
Joined: Fri Aug 31, 2018 11:24 pm

Re: .SAR/Android Game

Post by Omnitrix »

Thank you so much!