how to open pak file?

6,971 views
Skip to first unread message

goplayer

unread,
Jul 26, 2013, 2:30:16 PM7/26/13
to chromi...@chromium.org
After build chrome for android, and find some .pak file under asserts in each target. How can I open it?
I tried 7zip and ubuntu archive manager, all doesn't work.

Thanks!

Nico Weber

unread,
Jul 26, 2013, 2:38:50 PM7/26/13
to gogog...@gmail.com, Chromium-dev
That's a custom pak format for resources. Chromium contains code for reading these files.

Why do you want to open it? It'll just unpack into stuff that's in the source tree already. pak files are used to make opening resources (like translations, UI bitmaps, etc) faster at chromium startup.


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
 
 

Robert Flack

unread,
Jul 26, 2013, 2:45:21 PM7/26/13
to tha...@chromium.org, gogog...@gmail.com, Chromium-dev
FWIW the data pack is very simple (see an example here: https://code.google.com/p/chromium/codesearch#chromium/src/ui/base/resource/data_pack_literal.cc&sq=package:chromium&type=cs  and if you run the tool tools/grit/grit/format/data_pack.py [data.pak] it will dump the contents of the pack in a not very friendly format to parse (Code here: https://code.google.com/p/chromium/codesearch#chromium/src/tools/grit/grit/format/data_pack.py&sq=package:chromium&type=cs&l=160) but this could easily be modified to dump out files.

goplayer

unread,
Jul 26, 2013, 3:34:01 PM7/26/13
to chromi...@chromium.org, gogog...@gmail.com
Thanks.
Just want to see what's inside pak file to get better idea. 

goplayer

unread,
Jul 26, 2013, 3:35:25 PM7/26/13
to chromi...@chromium.org, tha...@chromium.org, gogog...@gmail.com
Thank you. will try to unpack it to follow your link.


On Friday, July 26, 2013 11:45:21 AM UTC-7, Robert Flack wrote:
FWIW the data pack is very simple (see an example here: https://code.google.com/p/chromium/codesearch#chromium/src/ui/base/resource/data_pack_literal.cc&sq=package:chromium&type=cs  and if you run the tool tools/grit/grit/format/data_pack.py [data.pak] it will dump the contents of the pack in a not very friendly format to parse (Code here: https://code.google.com/p/chromium/codesearch#chromium/src/tools/grit/grit/format/data_pack.py&sq=package:chromium&type=cs&l=160) but this could easily be modified to dump out files.

On Friday, July 26, 2013, Nico Weber wrote:
That's a custom pak format for resources. Chromium contains code for reading these files.

Why do you want to open it? It'll just unpack into stuff that's in the source tree already. pak files are used to make opening resources (like translations, UI bitmaps, etc) faster at chromium startup.
After build chrome for android, and find some .pak file under asserts in each target. How can I open it?
I tried 7zip and ubuntu archive manager, all doesn't work.

Thanks!

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
 
 

Jim Conner

unread,
May 9, 2014, 3:59:36 PM5/9/14
to chromi...@chromium.org
Really curious if someone can point me in the direction of how to properly repack the pak. I am trying to see if I can tweak context menus for kiosk mode. I've made a change I want to test, but the repack.py script doesn't work like data_pack.py does where I can run it autonomously and it just works.

- J

Thiago Farina

unread,
May 9, 2014, 4:16:15 PM5/9/14
to sna...@gmail.com, chromi...@chromium.org


On Friday, May 9, 2014, Jim Conner <sna...@gmail.com> wrote:
Really curious if someone can point me in the direction of how to properly repack the pak. I am trying to see if I can tweak context menus for kiosk mode. I've made a change I want to test, but the repack.py script doesn't work like data_pack.py does where I can run it autonomously and it just works.

This [1] should hive you a plent of examples to start with.


- J

On Friday, July 26, 2013 11:30:16 AM UTC-7, goplayer wrote:
After build chrome for android, and find some .pak file under asserts in each target. How can I open it?
I tried 7zip and ubuntu archive manager, all doesn't work.

Thanks!

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev


--
Thiago Farina

Kevin Trainor

unread,
Dec 8, 2016, 6:53:52 PM12/8/16
to Chromium-dev
Small world....my search to build a Ubuntu based kiosk with Chromium-browser brought me to your posting. I wonder if you were also trying to edit the resource.pak files elements to control PDF saving and printing? Were you successful in whatever you tried to build?

PhistucK

unread,
Dec 9, 2016, 9:27:52 AM12/9/16
to kevi...@gmail.com, Chromium-dev

On Fri, Dec 9, 2016 at 1:53 AM, Kevin Trainor <kevi...@gmail.com> wrote:
control PDF saving and printing

​In what way? Changing the JavaScript of the print preview page? I guess so. But the actual processing of the PDF and sending it to the printer are in C++, so a PAK file cannot change that logic.​



PhistucK

Kevin Trainor

unread,
Dec 9, 2016, 12:18:48 PM12/9/16
to PhistucK, Chromium-dev

Thanks for the info PhistucK. Id really just like to disable those two buttons as they both lead to the open of a chromium window to save files and list the file directory structure of the system. Ive managed to clamp down any other avenue a user might get to a terminal and file folder access. If i can just find a way to disable them, i had hoped that if i could edit the .pak file at the very least i could retask them to simply rotate the pdf, another function on the same page. Anything to keep them from saving and opening the print dialog. Any ideas or suggestions would be greatly appreciated.

Lei Zhang

unread,
Feb 22, 2017, 4:57:50 PM2/22/17
to kevi...@gmail.com, Chromium-dev
Rather than modifying .pak files, you may want to try using enterprise
policies. There's already a policy to toggle printing [1] and a policy
for controlling downloads is in the works. [2]

[1] https://www.chromium.org/administrators/policy-list-3#PrintingEnabled
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=683797
Reply all
Reply to author
Forward
0 new messages