Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to unpack resources.pak from google chrome?

Tags:

There are bunch of interesting files accessible via chrome://resources/* using google chrome.

On linux That the content is in /opt/google/chrome/resources.pak. I know I can get the whole sources from http://chromium.googlecode.com/svn/trunk/ but I would like to unpack the resource.pak file.

file resources.pak reports just junk.

Just to be clear, the question is NOT where to get those resources from. The question is what is the resources.pak file format and how to unpack it?

like image 750
Michał Šrajer Avatar asked May 17 '12 09:05

Michał Šrajer


1 Answers

taken from https://groups.google.com/a/chromium.org/forum/?fromgroups=#!topic/chromium-dev/agGjTt4Dmcw

4 byte version number
4 byte number of resources
1 byte encoding

For each resource:
2 byte resource id
4 byte resource offset in file

There is an extra resource entry at the end with ID 0 giving the end of the last resource (which is essentially the length of the file)

This python module can unpack and repack files:
data_pack.py from grit-i18n

like image 63
v1nce Avatar answered Sep 20 '22 05:09

v1nce