Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Gears 5 b2container file

Featured Replies

  • Author
  • Localization

elybelbely, posted Sat Sep 28, 2019 8:56 am (51037)


Does anybody know what is b2container file in UE4 in Gears 5 And how can we extract texts?
  • Author
  • Localization

jakmrk88, posted Thu Oct 10, 2019 1:29 pm (51436)


I also try to find some information on how to extract texts from b2container files. Gildor wrote: (- b2container files are not encrypted, but seems compressed with some simple algorithm, probably with lz4.) If you find anything, please let me know.
  • Author
  • Localization

by-freon, posted Mon Oct 21, 2019 8:55 am (51656)


Gears 5 uses oodle compression for b2container.
The GearGame.b2index file contains information about B2 container names, file names, and their location and size in b2containers.
There should be localization texts in Launch.b2container.
Could someone create a bms script to unpack the files?
https://drive.google.com/open?id=18KaNN ... m3CAF78hxF
  • Author
  • Localization

jakmrk88, posted Mon Oct 21, 2019 4:32 pm (51660)


Gears 5 uses oodle compression for b2container.
The GearGame.b2index file contains information about B2 container names, file names, and their location and size in b2containers.
There should be localization texts in Launch.b2container.
It is possible to create a BMS script to unpack the files???
  • Author
  • Localization

by-freon, posted Thu Nov 07, 2019 6:13 pm (51947)


aluigi wrote:
Almost 2 Gb file?
Oh no thanks, there is the filecutter script for the first-time analysis:
http://aluigi.org/bms/filecutter.bms


ok
Here new data -14mb
https://drive.google.com/file/d/1gxuQGf ... sp=sharing


Complete file b2container - 10mb
https://drive.google.com/file/d/1kPYQk- ... sp=sharing
  • Author
  • Localization

aluigi, posted Fri Nov 08, 2019 2:30 pm (51969)


Quite complicated but not impossible.
Will keep you update.
  • Author
  • Localization

aluigi, posted Fri Nov 08, 2019 2:46 pm (51971)


Ok, it's too boring and I can't spend time on it.
The following is the work-in-progress script that parses all the fields of b2index.
It's NOT for being used, it's just for watching the fields when running quickbms -V
Code:
get EXT extension
if EXT != "b2index"
    print "Error: please open the b2index file"
    cleanexit
endif
idstring "TCB2"
get ENTRIES long
get B2INDEX_SIZE longlong
get OFFSET1 longlong
get DUMMY longlong
for i = 0 < ENTRIES
    get OFFSET longlong
    get NUM long
    putarray 0 i OFFSET
    putarray 1 i NUM
next i
get NAMES_OFF longlong
get NAMES_SIZE long
get DUMMY longlong
get DUMMY long

callfunction GET_ENTRY 1 0
for i = 0 < FILES
    get NAME_OFF longlong
    get OFFSET longlong
    get NUM long
    callfunction GET_NAME 1
next i

# b2container files
callfunction GET_ENTRY 1 1
for i = 0 < FILES
    get NAME_OFF longlong
    callfunction GET_NAME 1
    get NAME_OFF longlong
    callfunction GET_NAME 1
    get OFFSET longlong
    get DUMMY longlong
    get OFFSET longlong
    get DUMMY long
    get OFFSET longlong
    get DUMMY long
next i

callfunction GET_ENTRY 1 2
for i = 0 < FILES
    get OFFSET longlong
    get DUMMY longlong
    get DUMMY longlong
    get DUMMY long
    get OFFSET longlong
    get DUMMY long
next i

callfunction GET_ENTRY 1 3
for i = 0 < FILES
    get OFFSET longlong
    get DUMMY long
    get DUMMY long
next i

#callfunction GET_ENTRY 1 4

callfunction GET_ENTRY 1 5
for i = 0 < FILES
    get NAME_OFF longlong
    get SIZE long
    get LEVEL long  # -1 for files
    callfunction GET_NAME 1
next i

startfunction GET_NAME
    savepos TMP
    goto NAME_OFF
    get NAME string
    goto TMP
endfunction

startfunction GET_ENTRY
    print "### Parse entry %GET_ENTRY_ARG1%"
    getarray OFFSET 0 GET_ENTRY_ARG1
    getarray FILES  1 GET_ENTRY_ARG1
    goto OFFSET
endfunction
  • Author
  • Localization

by-freon, posted Fri Nov 08, 2019 4:34 pm (51974)


I understand, thank you for your opinion
Solved. I have found localization texts
  • Author
  • Localization

zotya0330, posted Tue Jan 07, 2020 1:54 pm (53065)


by-freon wrote:
I understand, thank you for your opinion
Solved. I have found localization texts


And how did you do that?
Can you help me with that?
  • Author
  • Localization

GabrielProudmore, posted Tue May 05, 2020 5:27 am (56549)


Better ask and do some necro post instead of make a new one:

I've search around and it seems nobody could unpack the b2container file. Even on Gildor they couldn't find a way to unpack them:

https://www.gildor.org/smf/index.php?topic=6790.0

Specially as Gears Tactics has the same format.
  • Author
  • Localization

BeaniBirb, posted Wed May 06, 2020 2:49 am (56573)


Damn, it seems TC really found a way to keep us from getting our hands on their assets
  • Author
  • Localization

GabrielProudmore, posted Thu May 14, 2020 6:59 am (56732)


BeaniBirb wrote:
Damn, it seems TC really found a way to keep us from getting our hands on their assets

Yes. Maybe was because the models are more realistic in terms of face compared with older versions.

But, it is a shame nobody has being able to unpack or try to break the cursed b2container format, because all inside it is un unreal formats.
  • Author
  • Localization

farrarie, posted Thu Jul 16, 2020 9:26 am (57606)


Any updates ?
  • Author
  • Localization

GabrielProudmore, posted Sat Jul 25, 2020 2:47 am (57765)


Nothing so far in all webs, it was truly a rare format that they will never crack out...
I guess that is. Gears 5 and Tactic will never be unpacked.
  • Author
  • Localization

Simo311, posted Fri Apr 30, 2021 12:19 am (63657)


So it ends here?
  • Author
  • Localization

spiritovod, posted Thu May 13, 2021 1:37 pm (64001)


It's strange that nobody didn't release anything for this format yet, it's not even encrypted and not obfuscated, like many other mixed formats. So, here is work-in-progress script for files extraction from b2 containers. Based on initial research from aluigi. Use it on GearGame.b2index.

Extraction of some big files (~800MB ) will take quite some time, since script is building them from 1MB chunks in memory - make sure you have enough free RAM and be patient, otherwise quickbms may stop with some error. Alternatively, you can uncomment certain section in the script to skip them.
Directory tree data looks similar to the one from latest utoc format, so it shouldn't be hard as well, but it's much easier to fix base stuff in raw format. The script is not errors-proof yet, so please report only major problems when you're certain about it.

P.S. In case if you're missing some b2containers (b2index is addressing them all regardless of their presence), it's better to comment out second "print" string in the script. If you want to extract some small container, aside from commenting out the mentioned string, you can also run quickbms with -Q option.

Update: Script fixed in v0.1a, now it can skip files from missing containers properly. Also, it would be nice if someone could check the script with Gears Tactics, since I don't have not free space, nor time to do this.

Update 2: Script updated to v0.2, now it can extract files with filenames, but without complete paths. Thus some overlaps are possible (in case of files with similar names from different folders), you can use "r" when asked to rename them. Also, you can now uncomment certain script section to skip big assets upon extraction (more than 800MB by default).

Update 3: Script with filenames is quite bugged when some b2containers are missing, so I've decided to attach both scripts, including previous version (for raw extraction without filenames). Raw extraction script works fine even if you're using it with only single b2container present (via b2index).

Update 4: Base script fixed in v0.2a, now it can handle files from missing containers properly. Though it works much slower than raw extraction script, especially when used with a single container (random test: 35 sec via raw extraction vs 10 min via base script). It probably will not be optimized until base features will be done.

b2container.bms

b2container_raw_extract.bms

  • Author
  • Localization

spiritovod, posted Tue May 18, 2021 12:06 am (64115)


Small update to the script, for more info read previous post. While proper paths are still under testing, updated script can simplify recognition of some particular assets like video (bk2), audio (wem) and such.
  • Author
  • Localization

Simo311, posted Wed May 26, 2021 1:32 am (64274)


I immensely thank you for all your hard work done.
But it seems that this script doesn't work with some of the b2container as i get an error like this:

Code:
MP_Shared_Localized_it.b2container 
Info:  algorithm   650 offset      00b1d000 input size  0x00020000 131072 output size 0x00020000 131072 result      0xffffffff -1 Error: uncompressed data (-1) bigger than allocated buffer (186036) It usually means that data is not compressed or uses another algorithm
Last script line before the error or that produced the error: 134 clog MEMORY_FILE CHUNK_OFFSET ZSIZE SIZE B2 - OFFSET       0x00b1d000 - ZSIZE        0x00020000 - SIZE         0x00020000 coverage file 0   100%!  97076750   57370794   . offset 0115088a coverage file 10   40%   11553718   28549120   . offset 00b3d000 coverage file -1    0%   0          16706495   . offset 00feebbf
Press ENTER or close the window to quit


Where did i go wrong?
I would really appreciate some help!
Thanks!
  • Author
  • Localization

spiritovod, posted Wed May 26, 2021 10:01 am (64278)


@Simo311: PM me that b2container and b2index files, so I could take a look.
  • Author
  • Localization

DJ Normality, posted Wed May 26, 2021 10:47 pm (64298)


Thank you so much Spirit. But after running the script for several hours. All the assets I get are unreadable.
Image
I think it stops here and just hangs on this file too.
Image
Hopefully its only because the script discovery at the moment. But I cant seem to get anything readable.
  • Author
  • Localization

spiritovod, posted Thu May 27, 2021 11:44 am (64313)


@DJ Normality: Please read my base post carefully, it's explained there why it may "hang" on some big files. The script is actually too complex, so it will rather crash than just hangs, but you can check this out by uncommenting certain section in the script to skip such files (though you will skip some big movie files as well).
And the game is not supported by umodel at the moment, it has noticeably different format inside the assets, except for main engine features. Unfortunately, Gildor don't have enough time to work of this due to real-life matters, complexity of the format and lack of freely debuggable exe. But he is aware of recent news (such as b2container format) and willing to support the game when it will be possible for him.
  • Author
  • Localization

aluigi, posted Thu May 27, 2021 12:36 pm (64315)


OT: Just a little tip when quickbms takes tons of memory or is very slow, use the -9 option from command-line. It disables a slow security feature and makes the tool working like any other normal software.
  • Author
  • Localization

Simo311, posted Thu May 27, 2021 11:49 pm (64335)


I found out where I was mistaken.
Basically I was using an outdated version of GearGame.b2index file!
Now the script works just fine!
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.