How can I modify data stored by Chrome extensions?
Various chrome extensions store data about their settings and other persistent information (whitelists for adblock and ghostery, scripts for tampermonkey, styles for stylish, etc). Where do they store it? How can I view and edit it?
Solution 1:
Some data Google Chrome stores in Local Storage
folder in SQLite format (.localstorage
files). See: How do I open Local Storage files in Google Chrome?
Some other data which is stored in IndexedDB
folders (for each profile) (see: Where does Google Chrome save LocalStorage from Extensions?) are in LevelDB format. It's an open source key-value store format developed by Google and it is hosted on GitHub.
To modify files in LevelDB format outside of Chrome, it's not a straightforward process as you would need to implement a compatible comparator in order to inspect Chrome's Indexed DB leveldb instances. See: How to access Google Chrome's IndexedDB/LevelDB files?
Solution 2:
Another profile folder worth looking into is Local Extension Settings
, which contains LevelDB stores.
There's a question on Software Recommendations seeking a LevelDB client, but there doesn't seem to be many good free options. For the extension I was messing with, using the leveldb Python library was enough:
>>> import leveldb
>>> db = leveldb.LevelDB('path/to/Chrome profile/Local Extension Settings/extension id')
>>> # Available library methods
>>> dir(db)
['CompactRange', 'CreateSnapshot', 'Delete', 'Get', 'GetStats', 'Put', 'RangeIter', 'Write', ...]
>>> # List of keys
>>> [x[0] for x in db.RangeIter()]
[bytearray(b'accessToken'), bytearray(b'count'), bytearray(b'fullListArr'), ...]
>>> # Access keys with bytestrings
>>> db.Get(b'donated')
bytearray(b'true')
>>> # Put values with bytestrings
>>> db.Put(b'donated', b'false')
Solution 3:
Maybe you could check these:
- What is store in Local Storage used for in Chrome?
- How do I open Local Storage files in Google Chrome?
It looks like SQLite format (.localstorage extension files).
Edit: You could also check development tool, then Application tab > Local Storage.
E.g. on Adblock option page:
This file corresponds to ...\Data\profile\Default\Local Storage\chrome-extension_gighmmpiobklfepjocnamgkkbiglidom_0.localstorage
Please note that any change you make on the local storage may be overwritten by the web application/extension etc.