Page 1 of 1

Gameloft Custompak (obb unpacker)

Posted: Mon Apr 28, 2014 5:31 pm
by Chipicao
obb files from Android games are supposedly plain zip archives, but I've come across one from GT Racing 2 that doesn't look like a zip. I started analyzing it and below is a quickbms script that should extract it.

Code: Select all

# Gameloft CustomPak extractor
# script for QuickBMS
# tested with GT Racing 2 and The Dark Knight Rises .obb archives

endian big

get DUMMY long
get DATA_OFF long
get NAMES_OFF long
get FILES long
get BNAME basename

savepos LASTFILE
for i = 0 < FILES
	get OFFSET long	#relative to file start
	get SIZE long
	get NAME_OFF long	#relative to NAMES_OFF
	get DUMMY long
	savepos LASTFILE

	goto NAME_OFF
	get NAME string
	set FNAME string BNAME
	string FNAME += /
	string FNAME += NAME

next i

Re: Android .obb unpacker (non-zip)

Posted: Wed Jul 23, 2014 2:23 pm
by GMMan
It's actually a Gameloft CustomPak. You might meet some encryption on the filenames and/or file contents.

Re: Gameloft Custompak (obb unpacker)

Posted: Wed Jul 23, 2014 3:54 pm
by Chipicao
Thanks for the info. I renamed the script and made a few changes to get rid of that quickbms warning.

I tested it with The Dark Knight Rises for Android and it seems to extract both .obb and .gla archives.

Re: Gameloft Custompak (obb unpacker)

Posted: Thu Aug 21, 2014 5:31 pm
by weisuolong0
:lol: tankyou lz

how can you do this script step by step?
where shall i to study meathod of to extract obb bat and any other data files?
sorry ,my english is poor ..

Re: Gameloft Custompak (obb unpacker)

Posted: Sun Sep 14, 2014 5:24 pm
by GMMan
If you want to extract CustomPaks, use the CustomPak extractor. It's the most straightforward way of getting the files out. Otherwise, get comfy with a hex editor and study the format.