Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 1 | # Chromium Updater Migration Test Instructions |
| 2 | |
| 3 | This document describes how to do basic developer testing with [Chromium |
| 4 | Updater](https://source.chromium.org/chromium/chromium/src/+/main:chrome/updater/) |
| 5 | on systems or with software that already uses Keystone or Omaha 3. The intended |
| 6 | audience is Google developers who work on software that uses Keystone (or Omaha |
| 7 | 3) and want to verify that their software works as expected with Chromium |
| 8 | Updater. |
| 9 | |
| 10 | ## Step 1: Install Keystone or Omaha 3 |
| 11 | Install your product as you normally would, and run it. This should result in |
| 12 | a successful setup of the updater. It is useful to install an old version of |
| 13 | your product so that you can test that it updates correctly. |
| 14 | |
| 15 | The updater can be installed at either per-user or system-wide scopes; the |
| 16 | instructions will vary depending on which type of installation your product |
| 17 | uses. |
| 18 | |
| 19 | ## Step 2: Opt-In to Chromium Updater Deployment |
| 20 | On macOS, and with a per-user Keystone (this is common), run: |
| 21 | ``` |
Joshua Pawlicki | 777e339f | 2023-02-08 15:53:05 | [diff] [blame] | 22 | ~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/ksadmin -C chromium-updater-opt-in -P com.google.Keystone && ~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/ksadmin --install -P com.google.Keystone && sleep 10 && ~/Library/Application\ Support/Google/GoogleUpdater/*/GoogleUpdater.app/Contents/MacOS/GoogleUpdater --wake --enable-logging --vmodule="*/updater/*=2" |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 23 | ``` |
| 24 | |
| 25 | On macOS, and with a system-wide Keystone, run: |
| 26 | ``` |
Joshua Pawlicki | 777e339f | 2023-02-08 15:53:05 | [diff] [blame] | 27 | sudo /Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Helpers/ksadmin -C chromium-updater-opt-in -P com.google.Keystone -S && /Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Resources/CheckForUpdatesNow.command && sleep 10 && sudo /Library/Application\ Support/Google/GoogleUpdater/*/GoogleUpdater.app/Contents/MacOS/GoogleUpdater --wake --system --enable-logging --vmodule="*/updater/*=2" |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 28 | ``` |
| 29 | |
| 30 | On Windows, and with a per-user Omaha 3, use `regedit.exe` to open the key |
| 31 | `HKEY_CURRENT_USER\SOFTWARE\Google\Update\ClientState\{430FD4D0-B729-4F61-AA34-91526481799D}\cohort` |
| 32 | and set the value of `hint` (`REG_SZ`) to `chromium-updater-opt-in`. Then, |
| 33 | delete the `LastChecked` value from `HKEY_CURRENT_USER\SOFTWARE\Google\Update`. |
| 34 | Then, run `taskschd.msc`, click `Task Scheduler Library`, and run a |
Joshua Pawlicki | c92f58d7 | 2023-02-07 23:38:56 | [diff] [blame] | 35 | `GoogleUpdateTaskUserUA` task. Wait 5 minutes and then run |
| 36 | `%LOCALAPPDATA%\Google\GoogleUpdater\updater.exe --wake --enable-logging --vmodule="*/updater/*=2"` |
| 37 | from an the command prompt (non-admin). |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 38 | |
| 39 | On Windows, and with a system-wide Omaha 3, use `regedit.exe` to open the key |
| 40 | `HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google\Update\ClientState\{430FD4D0-B729-4F61-AA34-91526481799D}\cohort` |
| 41 | and set the value of `hint` (`REG_SZ`) to `chromium-updater-opt-in`. Then, |
Joshua Pawlicki | e4b9fb4 | 2023-02-01 17:40:10 | [diff] [blame] | 42 | delete the `LastChecked` value from `HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google\Update`. |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 43 | Then, run `taskschd.msc`, click `Task Scheduler Library`, and run a |
Joshua Pawlicki | c92f58d7 | 2023-02-07 23:38:56 | [diff] [blame] | 44 | `GoogleUpdateTaskMachineUA` task. Wait 5 minutes and then run |
| 45 | `%PROGRAMFILES(X86)%\Google\GoogleUpdater\updater.exe --wake --system --enable-logging --vmodule="*/updater/*=2"` |
| 46 | from an admin command prompt. |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 47 | |
| 48 | ## Step 3: Check that Chromium Updater is Installed |
| 49 | On macOS, check that |
Joshua Pawlicki | c92f58d7 | 2023-02-07 23:38:56 | [diff] [blame] | 50 | `~/Library/Application Support/Google/GoogleUpdater` (per-user) or |
| 51 | `/Library/Application Support/Google/GoogleUpdater` (per-system) exists. |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 52 | |
| 53 | On Windows, check that `%LOCALAPPDATA%\Google\GoogleUpdater` (per-user) or |
| 54 | `%PROGRAMFILES(X86)%\Google\GoogleUpdater` (system-wide) exists. |
| 55 | |
| 56 | ## Step 4: Test Your Software |
| 57 | If your software uses any updater APIs (such as checking for updates on-demand, |
| 58 | or Windows app commands), exercise those APIs and verify that they work as |
| 59 | expected. |
| 60 | |
| 61 | If you installed an old version of your software, verify that Chromium Updater |
| 62 | can update your software. You can either wait (up to 6 hours) for Chromium |
| 63 | Updater to update it automatically, or you can trigger an early check by |
| 64 | running: |
| 65 | |
| 66 | (macOS, per-user): |
Joshua Pawlicki | 777e339f | 2023-02-08 15:53:05 | [diff] [blame] | 67 | `~/Library/Application\ Support/Google/GoogleUpdater/*/GoogleUpdater.app/Contents/MacOS/GoogleUpdater --wake --enable-logging --vmodule="*/updater/*=2"` |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 68 | |
| 69 | (macOS, system-wide): |
Joshua Pawlicki | 777e339f | 2023-02-08 15:53:05 | [diff] [blame] | 70 | `sudo /Library/Application\ Support/Google/GoogleUpdater/*/GoogleUpdater.app/Contents/MacOS/GoogleUpdater --wake --system --enable-logging --vmodule="*/updater/*=2"` |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 71 | |
| 72 | (Windows, per-user): |
Joshua Pawlicki | c92f58d7 | 2023-02-07 23:38:56 | [diff] [blame] | 73 | `%LOCALAPPDATA%\Google\GoogleUpdater\*\updater.exe --wake --enable-logging --vmodule="*/updater/*=2"` |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 74 | |
| 75 | (Windows, system-wide) in command prompt running as admin: |
Joshua Pawlicki | c92f58d7 | 2023-02-07 23:38:56 | [diff] [blame] | 76 | `%PROGRAMFILES(X86)%\Google\GoogleUpdater\*\updater.exe --wake --system --enable-logging --vmodule="*/updater/*=2"` |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 77 | |
| 78 | ## Step 5: Removing Chromium Updater |
| 79 | To remove Chromium Updater from your system, run: |
| 80 | |
| 81 | On macOS, and with a per-user updater, run: |
Joshua Pawlicki | 7a1f73d | 2023-02-09 15:53:19 | [diff] [blame] | 82 | `~/Library/Application\ Support/Google/GoogleUpdater/*/GoogleUpdater.app/Contents/MacOS/GoogleUpdater --uninstall && rm -rf ~/Library/Google/GoogleSoftwareUpdate` |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 83 | |
| 84 | On macOS, and with a system-wide updater, run: |
Joshua Pawlicki | 7a1f73d | 2023-02-09 15:53:19 | [diff] [blame] | 85 | `sudo /Library/Application\ Support/Google/GoogleUpdater/*/GoogleUpdater.app/Contents/MacOS/GoogleUpdater --uninstall --system && sudo rm -rf /Library/Google/GoogleSoftwareUpdate` |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 86 | |
Joshua Pawlicki | e4b9fb4 | 2023-02-01 17:40:10 | [diff] [blame] | 87 | On Windows, and with a per-user updater, run `%LOCALAPPDATA%\Google\GoogleUpdater\*\updater.exe --uninstall`, then use `regedit.exe` to open the key |
Joshua Pawlicki | 52d66e2 | 2023-01-05 15:31:21 | [diff] [blame] | 88 | `HKEY_CURRENT_USER\SOFTWARE\Google\Update\ClientState\{430FD4D0-B729-4F61-AA34-91526481799D}\cohort` |
| 89 | and set the value of `hint` (`REG_SZ`) to `` (empty string). |
| 90 | |
| 91 | On Windows, and with a system-wide updater, from a command prompt running as admin, run `%PROGRAMFILES(X86)%\Google\GoogleUpdater\*\updater.exe --uninstall --system`, then use `regedit.exe` to open the key |
| 92 | `HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Google\Update\ClientState\{430FD4D0-B729-4F61-AA34-91526481799D}\cohort` |
| 93 | and set the value of `hint` (`REG_SZ`) to `` (empty string). |
| 94 | |
| 95 | Then, remove or reinstall any software that uses Keystone or Omaha 3 to update. |
| 96 | |
| 97 | ## Filing Issues |
| 98 | Any discovered bugs can be filed under the `Internals>Updater` component at |
| 99 | crbug.com. It is helpful to include the updater log files in the report. The |
| 100 | updater log files are at: |
| 101 | |
| 102 | (macOS, per-user): |
| 103 | `~/Library/Application Support/Google/GoogleUpdater/updater.log` |
| 104 | |
| 105 | (macOS, system-wide): |
| 106 | `/Library/Application Support/Google/GoogleUpdater/updater.log` |
| 107 | |
| 108 | (Windows, per-user): |
| 109 | `%LOCALAPPDATA%\Google\GoogleUpdater\updater.log` |
| 110 | |
| 111 | (Windows, system-wide): |
| 112 | `%PROGRAMFILES(X86)%\Google\GoogleUpdater\updater.log` |
| 113 | |
| 114 | You may need to use admin permissions or `sudo` to view logs from a system-wide |
| 115 | updater. |