Where does chrome store unpacked extensions local storage files - google-chrome

I'm developing an extension for Chrome which uses the local storage API. I would like to manually modify some of the data that has been stored by my extension in order to do some testing. I've determined that my installed (packaged) extensions use sqlite 3 files located here:
C:\Users\golear\AppData\Local\Google\Chrome\User Data\Default\Local Storage
but I can't find similar files for my unpacked extension. I've used the extension key to search my entire drive as I see that the packaged app use their keys in the names of their local storage sqlite files. I did find 3 folder names using my extension's key but none of them appear to have the file I am looking for.

For Mac, it's in Library/Application Support/Google/Chrome/Default/Local Extension Settings/<extension id>. I'm guessing it should be in similar folder for Windows.
This is also a good extension for viewing what you're looking for: https://chrome.google.com/webstore/detail/storage-area-explorer/ocfjjjjhkpapocigimmppepjgfdecjkb

Related

What is the purpose of CRX file?

Chrome Store does not accept CRX file but simple ZIP file.
So I am confused why the CRX files exist? Also extracting the ZIP file and loading it unpacked option is still an option.
As far as I know Chrome does not allow extension installation other than Chrome Store.
So what is the purpose of the CRX file?
To add to the other answer: CRX has some extra metadata (it's signed with the extension's private key) compared to a ZIP. A CRX file can still be opened with a ZIP archiver though.
Since CWS does the signing itself (having the private key), it does not require a CRX.
It's possible to privately host an extension. To do this you need to host the CRX file. There's some information about this in the Google docs for hosting extensions.
If you have a managed Chromebook for example, then you can push out a privately hosted Chrome extension to users. There's an example of this in the Google help docs for managing apps/extensions under the 'Select apps and extensions for your users' section.
By privately hosting the extension it doesn't need to be in the Chrome store.

How to locate Google Chrome extension dir

Hi i'm installing extensions by programmatically by a little c# program.
I just did see the software doesn't work on my friend.
i did see his chrome directory is not at %appdata% folder its at program files?
so how to find the real latest version of chrome directory for install plugins?
Google says
Windows:
chrome_root\Application\chrome_version\Extensions\
Example: c:\Users\Me\AppData\Local\Google\Chrome\Application\6.0.422.0\Extensions\
but how to find the chrome_root?
Visit chrome://version.
Look at Profile Path.
Extensions can be found in the Extensions subdirectory of the path you found at the previous step.
You can also load the extension using the --load-extension flag:
chrome.exe --load-extension=path/to/extension
The recommended mechanism for installing extensions programmatically is external extensions. It has the advantage of not depending on Chrome paths that might change, instead you can use a stable registry key or JSON file.

Now that chrome forces extensions to be downloaded using the webstore, is there a chance to migrate my old users?

I have an extension that I used to host on my server.
I have an update url pointing to my server where updates are automatically published to the users.
The newest chrome version does not allow installation of extensions over 3rd party urls, they need to be hosted in the webstore.
If I do that, do all users need to re-add the extension, or can they somehow migrate seemlessly to recieve future updates from the webstore?
Publish to the webstore, with the same id, by importing your existing key:
Put your private key as 'key.pem' in the root yof your extension directory and zip it along the extension. It will be removed upon upload.
Republish the old crx with update_url set to:
http://clients2.google.com/service/update2/crx
This way it will be seamless.
(Source:
https://groups.google.com/forum/?fromgroups#!topic/chromium-extensions/3vvygtEajMQ%5B1-25%5D
https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-apps/qZ5PXH2KzPs%5B1-25%5D )
You can still use 3rd party .crx extensions, themes, apps, etc.
But the file must be downloaded to a local folder and then dragged into the extensions manager (chrome://chrome/extensions/).

Where does google chrome store unpacked extensions?

I just lost all my changes to my google chrome plugin. However, the plugin is still running within the browser.
Where does Google Chrome store its cached copy of unpacked extensions?
I was able to find luck in:
Non-windows 7:
C:\Documents and Settings\<username>\Local Settings\Application Data\Google\Chrome\User Data\<profile>\Extensions
-or-
Windows 7:
C:\Users\<username>\AppData\Local\Google\Chrome\User Data\<profile>\Extensions
EDIT: You can go to "chrome://version/" (like a url) and it shows your "Profile Path". There you can find an "Extensions" folder which is the one you're looking for.
Turns out that unpacked extensions are left in their original locations. Only packed extension get extracted to the places Alex.Piechowski mentioned.
On Linux (OpenSuse 12.3), I managed to find all my installed extensions here:
~/.config/google-chrome/Default/Extensions/
It's important to first take note of the extension ID in case u wish to just copy a particular extension. For this, open chrome://extensions/ in your browser, copy the id of the extension of interest, and find it's directory under the extensions directory given above.
Being able to locally save copies of extensions like this has helped me to continue using (and even modifying / hacking) on extension that were eventually removed from the Chrome Store by either their owners or Google.
So I was debugging an extension I am building on Mac OS X and couldn't find the SQLite database in any of the standard locations. It doesn't store the DB in the path where the extension files live.
Here's where I found my database when running an unpacked extension:
~/Library/Application Support/Google/Chrome/Default/databases/http_foobar.com_0/XX
-Eric
User profiles are stored in User Data Directory and it vary depending on the operating system.
The easiest way is to navigate to chrome://version and look for the Profile Path field.
Example (Windows):
[Profile Path] C:\Users\Alice\AppData\Local\Google\Chrome\User Data\Default
[User Data Dir] C:\Users\Alice\AppData\Local\Google\Chrome\User Data
Then Extensions are located under Extensions/ folder.
In windows:
Path: C:\Users\yourusername\AppData\Local\Google\Chrome\User Data\Profile 1\Extensions
(Here, you will not able to see extensions by name but it will be by extensions by Id. Extension Id you can get it from chrome→extension→Developer modes)
Or
Path: C:\Documents and Settings\yourusername\Local Settings\Application Data\Google\Chrome\User Data\Default\Extensions
Or
Download Extension Source Locator. Give your username. It will list out all the extension with path details.

Add external extension by using registry

I use Windows 7(64bit) and repeat steps in Google Document.
This is what I added in register.
In HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Google\Chrome\Extensions\nbfjanngloflombfddlmkgnambnfhgjc
path="C:\Extension.crx"
version="2.1"
But extension isn't install.
Before testing .crx file distribution,
I installed and uninstalled this extension with unpacked files many times by UI(chrome://extensions) for development and tested setting policy by using register. (But I removed all of them now.)
Does it cause any problem?
But when I tested same thing in another clean PC(Windows XP 32bit) nothing is changed, too.
I already checked some common mistakes in Google Document several times, but I can't find any mistakes.
- Not specifying the same id/version as the one listed in the .crx
- Key created in the wrong location in the registry
- Registry entry points to the wrong path to the .crx file (or path specified but no filename)
- Permissions problems on a network share
Are there other common mistakes I should check to install external extension?
According to this page - https://developer.chrome.com/extensions/external_extensions -
it is no longer possible to use the registry method to install locally-hosted .crx files.
in fact, the only allowed extension are those from Google's Extension gallery.
See a quote below from Google's policy page:
An extension that's installed automatically is known as an external extension. Google Chrome supports two ways of installing external extensions:
-Using a preferences JSON file (Mac OS X and Linux only)
-Using the Windows registry (Windows only)
Both ways support installing an extension hosted at an update_URL. In the Windows registry, the update_URL must point to the Chrome Web Store where the extension is hosted.
The extension-ID cannot be chosen at random.
I've installed your .crx file in Chromium 18 (Linux), and Chrome 18 (Windows 7 in VirtualBox), and the correct extension-ID is: lhmigopickaaleaaelbppeabnbdgcdhe
The version number has to match. In the manifest.json file, in the extension, I see "version": "1.0". So, the version entry in the registry has to be 1.0.
I was not able to install the extension via the registry using the steps from the Documentation. I've found two right ways to install the extension through the registry. Create a .reg file, and paste the text below to install the extension:
set_page_color_chrome-extension.reg (based on this file, md5: 10a1b95c249a2481bc88d3d1aead0e33).
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\Extensions\lhmigopickaaleaaelbppeabnbdgcdhe]
"version"="1.0"
"path"="C:\\set_page_color.crx"
Replace HKEY_LOCAL_MACHINE with HKEY_CURRENT_USER if you're running in permission trouble, or if you want to install the extension only for the current user.