Google Chrome web browser themes can be extended using features. The files containing all necessary information and data about these features are saved with a CRX extension. Ad blockers, e-book readers, games and other applications can be stored, installed and executed using these files. The file itself can be used to manually install a feature by dragging it into the Google Chrome Extensions window. To open said window, type the following command into Chrome's command line: chrome://chrome/extensions/
Bookmark and share page
Technical details of CRX files
Technically speaking, CRX files are plugin files used on Google Chrome. The files inside the CRX are compressed and can comprise of JavaScript or JSON files as well as other executable programs or images. For compression, CRX file use the same formatting as ZIP files. Standard ZIP decompression programs can not open CRX files though because the files contain a special, custom header section. Chrome plugins can either be installed via the 'Add to Chrome' button on the extensions's page or by manually dragging a downloaded CRX file into the Extensions window. In the former method, the user does not get in touch with the CRX file since the web browser handles the downloading, unpacking and installation itself.
More information about the CRX file format
File extension | .crx |
File category | Archive |
Associated programs | 7-Zip (Windows) Google Chrome (Windows, Mac & Linux) |
Useful links | More Information About The Chrome CRX File |
Developer |
A file with the CRX file extension is a Chrome Extension file used to extend the functionality of the Google Chrome web browser through little programs that add additional features to the default browsing experience.
Most CRX files are downloaded through the Chrome Web Store, but since you can make your own Chrome extensions and install them offline, others may originate elsewhere or be loaded locally.
Some CRX files might instead be Links Games Course files or program files used by Autodesk's DWG TrueView program.
How to Open a CRX File
CRX files that are extension files are used by the Google Chrome web browser. Usually, CRX files are downloaded through Google's website and, therefore, installed to Chrome automatically and stored here by default:
However, this won't be the case for CRX files that you download outside of the Chrome Web Store.
You can install third-party, unofficial CRX files by accessing the chrome://extensions/ address in the URL bar in Chrome and enabling the Developer mode option at the top. Then, just drag and drop the CRX file into the Extensions window and confirm any prompts.
Learn how to add Chrome extensions to your browser if you need more help.
The Opera web browser can use CRX files, too, with the extension called Install Chrome Extension. The Vivaldi browser natively supports CRX based extensions as well.
Since a CRX file is actually just a renamed ZIP file, any archive/compression program, like PeaZip or 7-Zip (both free), should be able to open the file for expansion. However, doing this will only let you see the data that makes up the extension, not actually run the program.
Autodesk DWG TrueView uses CRX files, too, but the purpose for these files is unclear. The program most likely can not open CRX files, so they're probably just used by certain components of the software automatically and aren't intended to be opened manually.
If you find that an application on your PC does try to open the CRX file but it's the wrong application or if you would rather have another installed program open CRX files, see our How to Change File Associations in Windows guide for making that change in Windows.
How to Convert a CRX File
XPI (Firefox), EXE (Internet Explorer), and SAFARIEXTZ (Safari) files are similar to CRX files in that they're extension files used in those respective browsers. These formats, however, no matter their same intent (to extend functionality), can't be easily converted to or from each other's different formats.
However, one exception is that Chrome's CRX files can be installed in the Opera browser with the Download Chrome Extension mentioned earlier. This means you can install CRX files from the Chrome Web Store from right within the Opera browser.
You can also convert Opera extensions to Chrome extensions by renaming Opera's .NEX file to Chrome's .CRX file. This new CRX file must be installed to Chrome manually using the drag and drop technique explained above.
Keep in mind that CRX files are really just ZIP files, so you can actually rename the file to a .ZIP file to open it with a file zip/unzip program.
If you're looking to convert your CRX file to EXE for some kind of automatic install, your best bet is to try compiling it with an installer like Inno Setup.
Still Can't Open the File?
Be careful to read the file extension correctly. Some file formats append a suffix to the end of the file that looks a lot like it reads '.CRX' when it's really a letter or two off.
For example, CRX files are spelled very much like CXR files but are not the same format. CXR files are FMAT Plate Results files used with the FMAT 8100 HTS System. Another example can be seen with CXX files that are C++ Source Code files used with Microsoft Visual Studio.
The point here is to check the file extension and then research accordingly, looking for any information you can on the format the file is in, which will help you find the right program that can open it.
Extensions hosted outside of the Chrome Web Store can only be installed by Linux users. This article describes how to package, host, and update .crx
files from a personal server. If distributing an extension or theme solely through the Chrome Web Store, consult Webstore Hosting and Updating.
Packaging
Extensions and themes are served as .crx
files. When uploading through the Chrome Developer Dashboard , the dashboard creates the .crx
file automatically. If published on a personal server, the .crx
file will need to be created locally or downloaded from the Chrome Web Store.
Download .crx from the Chrome Web Store
If an extension is hosted on the Chrome Web Store, the .crx
file can be downloaded from the Developer Dashboard. Locate the extension under 'Your Listings' and click on 'More info'. In the popup window, click the blue main.crx
link to download it.
The downloaded file can be hosted on a personal server. This is the most secure way to host an extension locally as the contents of the extension will be signed by the Chrome Web Store. This helps detect potential attacks and tampering.
Create .crx locally
Extension directories are converted to .crx
files at the Extensions Management Page. Navigate to chrome://extensions/
in the ominibox, or click on the Chrome menu, hover over 'More Tools' then select 'Extensions'.
On the Extensions Management Page, enable Developer Mode by clicking the toggle switch next to Developer mode. Then select the PACK EXTENSION button.
Specify the path to the extension’s folder in the Extension root directory field then click the PACK EXTENSION button. Ignore the Private key field for a first-time package.
Chrome will create two files, a .crx
file and a .pem
file, which contains the extension’s private key.
Do not lose the private key! Keep the .pem
file in a secret and secure place; it will be needed to update the extension.
Update a .crx package
Update an extension's .crx
file by increasing the version number in manifest.json
.
Return to the Extensions Management Page and click the PACK EXTENSION button. Specify the path to the extensions directory and the location of private key.
The page will provide the path for the updated packaged extension.
Package through Command Line
Package extensions in the command line by invoking chrome.exe
. Use the --pack-extension
flag to specify the location of the extension's folder and the --pack-extension-key
flag to specify the location of the extension's private key file.
Hosting
A server that hosts .crx
files must use appropriate HTTP headers to allow users to install the extension by clicking a link.
Google Chrome considers a file to be installable if either of the following is true:
- The file has the content type
application/x-chrome-extension
- The file suffix is
.crx
and both of the following are true:- The file is not served with the HTTP header
X-Content-Type-Options: nosniff
- The file is served with one of the following content types:
- empty string
- 'text/plain'
- 'application/octet-stream'
- 'unknown/unknown'
- 'application/unknown'
- '*/*'
- The file is not served with the HTTP header
The most common reason for failing to recognize an installable file is that the server sends the header X-Content-Type-Options: nosniff
. The second most common reason is that the server sends an unknown content type—one that isn't in the previous list. To fix an HTTP header issue, either change the configuration of the server or try hosting the .crx
file at another server.
Updating
Every few hours, the browser checks installed extensions for an update URL. For each one, it makes a request to that URL looking for an update manifest XML file.
- The content returned by an update check is an update manifest XML document listing the latest version of an extension.
If the update manifest mentions a version that is more recent than what is installed, the browser downloads and installs the new version. As with manual updates, the new .crx
file must be signed with the same private key as the currently installed version.
Note: In order to maintain user privacy, Google Chrome does not send any Cookie headers with autoupdate manifest requests, and ignores any Set-Cookie headers in the responses to those requests.
Update URL
Extensions hosted on servers outside of the Chrome Webstore must include the update_url
field in their manifest.json
file.
Update manifest
The update manifest returned by the server should be an XML document.
This XML format is borrowed from that used by Omaha, Google's update infrastructure. The extensions system uses the following attributes for the <app>
and <updatecheck>
elements of the update manifest:
appid | The extension ID is generated based on a hash of the public key, as described in packaging. An extension's ID is displayed on the Extensions Managment Page |
codebase | An HTTPS URL to the .crx file. |
version | Used by the client to determine whether it should download the .crx file specified by codebase . It should match the value of 'version' in the .crx file's manifest.json file. |
The update manifest XML file may contain information about multiple extensions by including multiple <app> elements.
Testing
The default update check frequency is several hours, but an update can be forced using the Update extensions now button on the Extensions Management Page.
This will start checks for all installed extensions.
Advanced usage: request parameters
The basic autoupdate mechanism is designed to make the server-side work as easy as just dropping a static XML file onto any plain web server, such as Apache, and updating that XML file as new extension versions are released.
Developers hosting multiple extensions may check request parameters, which indicate the extension ID and version in the update request. Including these paramaters allow extensions to update from the same URL running dynamic server-side code instead of a static XML file.
The format of the request parameters is:
?x=<extension_data>
Where <extension_data>
is a URL-encoded string of the format:
id=<id>&v=<version>
For example, two extensions point to the same update URL (https://test.com/extension_updates.php
):
- Extension 1
- ID: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
- Version: '1.1'
- Extension 2
- ID: 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
- Version: '0.4'
The request to update each individual extension would be,
and
Multiple extensions can be listed in a single request for each unique update URL. For the above example, if a user has both of the extensions installed, then the two requests are merged into a single request:
Students and educators are eligible for an individual educational license if they are enrolled or employed at a Qualified Educational Institution which has been accredited by an authorized governmental agency and has the primary purpose of teaching its enrolled students.. Autodesk autocad 2016 free trial.
If the number of installed extensions using the same update URL is large enough that a GET request URL is too long (over 2000 characters or so), the update check issues additional GET requests as necessary.
Advanced usage: minimum browser version
As more APIs are added to the extensions system, an updated version of an extension that will work only with newer versions of the browser may be released. While Google Chrome itself is autoupdated, it can take a few days before the majority of the user base has updated to any given new release. To ensure that a given update will apply only to Google Chrome versions at or higher than a specific version, add the 'prodversionmin' attribute to the <app> element in the update response.
This would ensure that users would autoupdate to version 2 only if they are running Google Chrome 3.0.193.0 or greater.
I want to create chrome extension crx file programatically (not using chrome.exe, because it opens new chrome window). So what are the alternatives for same ? My preference is java, but if its possible in other language then also I am okay.
3 Answers
There is a variety of utilities to do this, in various languages (albeit; they are mostly shell/scripting languages)
I cannot post the links to all of them, because I am a new stackoverflow user - I can only post 1 link, so I created a page which lists them all - including the one C one I speak about below - http://curetheitch.com/projects/buildcrx/6/
Anyway, I spent a few hours and put together a version in C which runs on Windows or Linux, as the other solutions require installation of a scripting language or shell (i.e. python, ruby, bash, etc.) and OpenSSL. The utility I wrote has OpenSSL statically linked so there are no interpreter or library requirements.
The repository is hosted on github, but the link above has a list of my utility and other peoples solutions.
Nothing listed for Java, which was your preference, but hopefully that helps!
As kylehuff stated, there are external tools that you could use. But you can always use the command line from Google Chrome to do that which is cross platform (Linux / Windows / Mac).
--pack-extension is:
Package an extension to a .crx installable file from a given directory.
--pack-extension-key is:
Optional PEM private key is to use in signing packaged .crx.
The above does not run Google Chrome, it is just command line packing using Chromium's core crx algorithm that they use internally.
Exe To Crx Conversion
Not the answer you're looking for? Browse other questions tagged command-linegoogle-chromecrx or ask your own question.
Try to install an extension from outside the Chrome Web Store and Chrome will tell you that extensions “can only be added from the Chrome Web Store.” However, this message is incorrect – you can still install extensions from elsewhere.
This restriction is in place to prevent malicious websites from installing bad extensions, apps, and user scripts. You should only install extensions from legitimate websites you trust – the LastPass website, for example.
Manually Installing an Extension
To install an extension manually, click the wrench menu, point to Tools, and select Extensions to open the Extensions page.
If you’re seeing the message, Chrome has already downloaded the extension, app, or user script to your computer. You’ll find it in Chrome’s default download folder. Extensions and apps have the .crx file extension, while user scripts have the .user.js file extension.
If it didn’t download to your computer, right-click the extension installation link on the page and use the Save As option to save it to your computer.
Drag and drop the CRX (or user.js) file onto the Extensions page to install it.
You’ll be prompted to confirm installation of the extension, just as if you had installed it from the Chrome Web Store.
Always Allow Extensions From Outside the Chrome Web Store
If you frequently install extensions from outside the Web Store, you can allow extension installation from any website by adding a command-line flag.
To add a command-line option, you’ll have to edit the Chrome shortcut’s properties. To access these on Windows 7, assuming you launch Chrome from your taskbar, right-click the Chrome icon on your taskbar, right-click Google Chrome in the menu that appears, and select Properties.
If you launch Chrome from your Start menu or your desktop, right-click the shortcut on your Start menu or desktop instead.
Select the Shortcut tab and add the following text to the end of the Target box:
–enable-easy-off-store-extension-install
After changing this setting, close all Chrome windows and launch Chrome from the shortcut you modified. You may want to wait a few moments after closing all Chrome windows to ensure Chrome is no longer running in the background
Try to install an extension from a web page and you’ll see a familiar installation prompt – click Continue to the install the extension.
Changing Chrome Policies
Chrome includes policy settings designed for system administrators. If you use Chrome in your business and want to allow extension installation from a specific website or two, you can modify Chrome’s policies. This setting is changed in the registry on Windows, and in Chrome’s preferences files on Mac and Linux.
For example, on Windows, you could add the following registry entry to allow extension installation from lastpass.com:
SoftwarePoliciesGoogleChromeExtensionInstallSources1 = “https://lastpass.com/*”
For more information about this Chrome policy setting and other Chrome policy settings, consult the Policy List page on the Chromium Project’s website.