How to unpack a chrome theme?

20

3

How to unpack a packed chrome theme(*.crx)? Their FAQ states how to pack, but not how to unpack.

aviraldg

Posted 2010-05-09T02:33:56.250

Reputation: 2 059

Answers

12

I got the solution: apparently, a .crx file is just a renamed .zip file. Additionally, when you install it, the theme is decompressed into the chrome install directory...

aviraldg

Posted 2010-05-09T02:33:56.250

Reputation: 2 059

2

Not quite; it’s not just a renamed ZIP. Open one in a hex-editor and see that there is clearly a proprietary header. That said, yes, it is basically a ZIP, and can be opened in most ZIP-capable programs. I prefer 7-Zip.

– Synetech – 2011-07-13T03:25:08.597

4

@Synetech is correct, the file header contains a public key and signature. Google's .crx Package Format page explains this. In practice, you should be able to extract a .crx file with unzip, and it will ignore the extra bytes. If you do end up needing to chop off the header first, running unzip -l will show you how many (N+1 bytes with tail). For example: If unzip -l complains with **warning [file.crx]: *306* extra bytes at beginning or within zipfile**, then run: tail -c +307 file.crx > /tmp/file.crx; unzip -l /tmp/file.crx

– TrinitronX – 2012-12-13T22:45:53.413

4

On Mac OS X, you can use unzip to decompress the .crx file:

unzip extension.crx

Here's the result:

unzip result

Elad Nava

Posted 2010-05-09T02:33:56.250

Reputation: 286

4

Actually it's more than a zip. When you unzip -l you'll see a message:

warning [extension.crx]: 306 extra bytes at beginning or within zipfile

So the crx file is 306 bytes of something plus a zip archive.

Helmut Grohne

Posted 2010-05-09T02:33:56.250

Reputation: 41

3

This video explains everything about what a .crx is. In addition to a .zip holding all the extension's resources, it includes a public key and a signature, to ensure integrity and authenticity of the file: Antony Sargent explains .crx files Hosted by: youtube.com

The details of the .crx package format are published here.

Crow

Posted 2010-05-09T02:33:56.250

Reputation: 31

1

Chrome extension install directory:

Mac:

/Users/username/Library/Application Support/Google/Chrome/Default/Extensions

Windows 7:

C:\Users\username\AppData\Local\Google\Chrome\User Data\Default\Extensions

Windows XP:

C:\Documents and Settings\YourUserName\Local Settings\Application Data\Google\Chrome\User Data\Default

JDavis

Posted 2010-05-09T02:33:56.250

Reputation: 11

Best solution out of them all. This worked for me, none of the others did. – daviesgeek – 2012-01-27T17:20:28.913

0

Yep aviraldg is right. rename it to a .zip and use your favorite extraction tool. XPIs for firefox, etc, are the same process.

alpha1

Posted 2010-05-09T02:33:56.250

Reputation: 1 638