How to migrate Google Chrome profile (extensions, cookies, etc.) to another Windows installation?

4

4

This question has been asked a million times on the web (example) but I have found no solutions that actually work, so I'm asking it again. Please actually read the entire question before posting.

The question is pretty simple. I have installed a second copy of Windows on the same machine (same OS -- Windows 8.1 -- with the same product key and all) and I'm trying to migrate everything to it.
However, when I try to make the new installation of Chrome use my old profile, it wipes some of the data (e.g. all of my extensions), claiming they are corrupt, while preserving others (e.g. bookmarks).
Needless to say, the profile isn't actually corrupt; it works just fine in my old Windows installation. And yes, I'm using the same version of Chrome (version 47 x64) and all.

For the life of me, I can't figure out how or why it does this. I've even looked at the Chromium source code and can't even figure out where Chrome makes the decision to reset the profile, and what it bases this decision on. I've tried using Process Monitor to figure out how it detects anything is going on, and I haven't found anything.

Can someone explain to me what is going on and how I can continue to use my old profile as-is, intact in my new Windows installation?

Note: Due to the frustratingly low amount of information on this issue and high number of non-working "solutions" on this site and elsewhere on the web, please, don't make random guesses. Only post an answer if you have reproduced the problem and can reproduce a working solution to it, or alternatively, if you can point to the exact line causing this in the Chromium source code. Thanks.

user541686

Posted 2016-01-01T11:03:25.583

Reputation: 21 330

I wonder if this is related to items you've chosen to sync and if you've selected to encrypt those selected to select. – Sathyajith Bhat – 2016-01-01T12:25:57.740

@Sathya: I'm not syncing or encrypting anything at all; this is a plain local installation. – user541686 – 2016-01-01T12:30:44.650

@Everyone: If you have attempted but are unable to reproduce the problem, that would also be helpful to know, so please comment if so. – user541686 – 2016-01-01T12:32:01.503

In the past simply copying the chrome user profile to the new computer has worked for me personally – Ramhound – 2016-01-01T13:28:10.577

2@Ramhound: Yes in the past it worked for me personally too, but that's in the past. They've really cracked down on this in the past year for some bizarre reason but I have no idea how or why. – user541686 – 2016-01-01T13:55:21.753

Answers

2

A partial answer from myself:

It seems that this has to do with the "Secure Preferences" feature, and the profile is encrypted based on the Machine SID in Windows. I managed to change my machine SID to the old one, and now my profile loads and my extensions are not deleted. However, my cookies still don't seem to work, so if someone knows why, please explain.

Relevant code bits are in pref_hash_store_impl.cc as of this writing (GenerateDeviceId, which calls GetDeterministicMachineSpecificId, which calls LookupAccountNameW).

user541686

Posted 2016-01-01T11:03:25.583

Reputation: 21 330

The https://www.nirsoft.net/utils/dpapi_data_decryptor.html (https://www.nirsoft.net/utils/chrome_cookies_view.html) tool says that not only SID but "User SID + Login Password (SHA1 Hash)" are used to encrypt the key; the key is stored in the user home folder, Application data\Microsoft\Protect (https://technet.microsoft.com/en-us/library/cc962112.aspx). There are some solutions to migrate all keys with help of dpapimig.exe https://www.reddit.com/r/vivaldibrowser/comments/65qrlb/importing_cookiespasswords_from_vivaldichrome/ or https://gist.github.com/HarmJ0y/2af9ac57f95e6663a26742774c822b10

– osgx – 2018-02-25T07:20:58.147

So, how we avoid this? I have around 50 instances of ChromePortable, that will get a corrupted profile after opening them on the new computer. From the old computer, I only have the username and the password, as I don't have access to it anymore[it has been recycled]. – Nick – 2018-08-18T05:07:55.777

@Nick: I gave up on trying to find a way to avoid it. I tried a lot but it still didn't work. – user541686 – 2018-08-18T05:13:30.023

But I can't give up. I'll lose too much. I need a path to follow. – Nick – 2018-08-18T05:15:45.793

@Nick: well beats me, I ended up giving up. But what would you be losing? There are cookies, which you might be able to export/import with other extensions (may or may not work), and there are extension settings which you can hopefully spend a while setting again. (Bookmarks shouldn't be lost.) That's the path I would follow. – user541686 – 2018-08-18T06:15:51.953

I need to do this for each portable install that I have, and I have quite a few. – Nick – 2018-08-18T09:13:01.953

@Nick: OK well I don't know what to tell you. – user541686 – 2018-08-18T09:22:39.433

0

Not a complete migration, but information on the encryption and keyset migration.

Several files of Google Chrome profile are encrypted with DPAPI. Keys used to encrypt data are stored in "the user profile under RootDirectory \Documents and Settings\< username >\Application Data\Microsoft\Protect" - https://technet.microsoft.com/en-us/library/cc962112.aspx; and additionally encrypted by combination of User SID and hash of his password.

There are some solutions to decrypt data: https://www.nirsoft.net/utils/chrome_cookies_view.html and https://www.nirsoft.net/utils/dpapi_data_decryptor.html (which gives more details about encryption mode and key file used). DPAPI decryptor may also work offline (reading files from the harddrive of another windows installation). But they both can't reencrypt data with newer keys or import data into new profile.

There are also some ideas to migrate all user keys to another installation of the Windows (search internet by "dpapimig.exe" for such kind of instructions):

So, migration method (importing of DPAPI keys) may work for you. In complete migration solution user DPAPI keys should be decrypted with older windows installation master keys/sids and then reencrypted with sids/master keys of newer windows installation.

osgx

Posted 2016-01-01T11:03:25.583

Reputation: 5 419