blob: 659740f78282e063352a8e858546c5fe98d5cc35 [file] [log] [blame] [view]
Cheng-Han Yang4563a2c2019-01-14 08:08:531# Chrome OS RMA shim
2
3[TOC]
4
Cheng-Han Yang730845a2019-01-25 07:31:575## Overview
Cheng-Han Yang4563a2c2019-01-14 08:08:536
Cheng-Han Yang730845a2019-01-25 07:31:577RMA stands for Return Merchandise Authorization. When there’s a problem that the
8end user cannot solve, the user returns the device to the partner’s service
9center for diagnosis and repair. The service center may swap components and
10reinstall the firmware and/or software image. For Chromebooks, that means the
11service center may need to disable write protection and change the HWID to match
12the new configuration.
Cheng-Han Yang4563a2c2019-01-14 08:08:5313
Cheng-Han Yang730845a2019-01-25 07:31:5714### RMA shim
15
16Chromebooks are highly secured. With verified boot and write protection, it’s
17difficult for the service center to run diagnosis and repair programs (usually
18built and customized by partners) because those won’t be signed by Google.
19Service centers may also have limited (or even no) network access. In general,
20what the partner needs is a tool that fulfills these requirements:
21
22* The tool is signed by Google. An operator can boot the device by turning on
23 the developer mode, attaching a USB stick and invoking recovery mode.
24* The tool can run the partner’s customized tool programs to check and verify
25 components, very similar to the way the factory process works.
26
27The RMA shim image is designed to meet these requirements. An RMA shim image is
28a combination of existing [Chrome OS factory bundle](./BUNDLE.md) components,
29all combined into one disk, including:
30
31* [Factory install
Stimim Chen38241b42020-12-08 05:07:3432 shim](https://chromium.googlesource.com/chromiumos/platform/factory_installer/+/HEAD/README.md)
Cheng-Han Yang730845a2019-01-25 07:31:5733* Release image (FSI)
34* Test image
35* Factory toolkit
36* HWID bundle
37* Other optional components (firmware, complete script, etc.)
38
39### Universal RMA shim (Multi-board RMA shim)
40
41A problem for regular (single-board) RMA shims is that we have to create
42separate per-board RMA shims for each project, which makes it hard to manage
43shim images and physical USB drives. A universal shim contains multiple RMA
44shims for different boards, which is easier to manage and distribute.
45
46Pros:
47
48* Reduce the number of shims to manage.
49
50Cons:
51
52* The size of a universal shim can be large. Each board in a shim takes about
53 3 GB, so a universal shim containing 3 boards will have size 9~10 GB.
54
Cheng-Han Yang169e2b92019-04-25 03:54:5155## Get the tool
56
57[image_tool](../py/tools/image_tool.py) is a useful tool to manage RMA shims. We
58can get this tool by downloading the factory public repo.
59
60 $ git clone https://chromium.googlesource.com/chromiumos/platform/factory
61 $ cd factory/
62
63The tool is located at `setup/image_tool`. It's recommended to sync the git repo
64periodically to get the latest version.
65
66 (in factory/ repository)
67 $ git pull
68
69After downloading the factory repo, we can run the unit test for RMA commands
70to check if it runs normally on the machine. The tool should be able to run in
71a fresh Linux environment without chroot.
72
73 $ py/tools/image_tool_rma_unittest.py
74
Cheng-Han Yang730845a2019-01-25 07:31:5775## Create an RMA shim
76
77To create an RMA shim, you should first get a factory bundle and follow the
78steps below.
79
80### Adjust RMA test list in factory toolkit ###
81
82RMA test list is different from the test list used in factory manufacture line.
83For instance, there is no factory server during RMA. Hence, we need another test
84list for RMA.
85
86The recommended way is to create a test list that inherits
87`generic_rma.test_list.json`, which already takes care of general RMA settings
88such as disabling factory server and enabling `rma_mode`, and then add factory
89tests to `RMAFFT` group.
90
91```javascript
92{
93 "inherit": [
94 "generic_rma.test_list"
95 ],
96 "label": "RMA Test List for <project>",
97 "definitions": {
98 "RMAFFT": {
99 "subtests": [
100 ...
101 ...
102 ]
103 }
104 }
105}
106```
107
108* In general, run all factory tests (runin and fatp) in the service centers with
109 reduced test cycles. For example, reduce the duration of the stress test from
110 4 hours to 10 minutes.
111* Verify that all spare mainboards used in service centers complete SMT tests.
112* Verify that all spare mainboards have a registration code that was burned into
113 RW_VPD during the factory process before sending the boards to service
114 centers.
115* Discuss with the OEM to finalize test items for the RMA process.
116* **Do not** modify or remove any GRT (Google Required Test) items.
117* Make sure the firmware write protection is enabled (which should be true if
118 `constants.phase` is set to PVT).
119
120### Combine factory bundle components into an RMA shim image ###
121
122After getting all the bundle components ready, we can combine these components
Cheng-Han Yang169e2b92019-04-25 03:54:51123into a single RMA shim image. To create an RMA shim image from a factory bundle,
124use `image_tool rma create` command:
Cheng-Han Yang4563a2c2019-01-14 08:08:53125
Cheng-Han Yang169e2b92019-04-25 03:54:51126 $ setup/image_tool rma create \
127 --board BOARD \
128 --factory_shim path/to/factory_install_shim.bin \
129 --test_image path/to/chromiumos_test_image.bin \
130 --toolkit path/to/install_factory_toolkit.run \
131 --release_image path/to/chromiumos_image.bin \
132 --hwid path/to/hwid_bundle.sh \
133 --output rma_image.bin
Cheng-Han Yang4563a2c2019-01-14 08:08:53134
135The command can be simplified if all the components are put in their respective
Cheng-Han Yang169e2b92019-04-25 03:54:51136[bundle](./BUNDLE.md) directories (`release_image/`, `test_image/`, etc.):
Cheng-Han Yang4563a2c2019-01-14 08:08:53137
Cheng-Han Yang169e2b92019-04-25 03:54:51138 $ setup/image_tool rma create \
139 --board BOARD \
140 --output rma_image.bin
141
142We can also specify the active test list when creating the RMA shim, so that we
143don't need to modify `active_test_list.json` in factory toolkit.
144
145 $ setup/image_tool rma create \
146 --board BOARD \
147 --output rma_image.bin \
148 --active_test_list rma_main
Cheng-Han Yang4563a2c2019-01-14 08:08:53149
Cheng-Han Yang730845a2019-01-25 07:31:57150## Use an RMA shim
Cheng-Han Yang4563a2c2019-01-14 08:08:53151
Cheng-Han Yang730845a2019-01-25 07:31:57152Flash the `rma_image.bin` to a USB drive, boot it with developer switch
153enabled in recovery mode (see following steps), and then the device will boot
154from the RMA shim.
155
Cheng-Han Yang97c0af92019-07-20 18:57:01156Note: The following instructions only work for a Google signed RMA shim. If you
157are using a developer signed RMA shim, the boot process is the same as
Stimim Chen38241b42020-12-08 05:07:34158[booting from a test image](https://chromium.googlesource.com/chromiumos/docs/+/HEAD/developer_guide.md#boot-from-your-usb-disk).
Cheng-Han Yang97c0af92019-07-20 18:57:01159
Cheng-Han Yang730845a2019-01-25 07:31:57160### Flash an image to USB drive
161
162Use `dd` command to flash a shim image to a USB drive or SD card, replacing
163`/dev/sdX` with the name of the USB/SD device.
164
165 $ sudo dd if=rma_image.bin of=/dev/sdX bs=8M iflag=fullblock oflag=dsync
166
167If you have a
Stimim Chen38241b42020-12-08 05:07:34168[Chromium OS development environment](https://chromium.googlesource.com/chromiumos/docs/+/HEAD/developer_guide.md),
Cheng-Han Yang730845a2019-01-25 07:31:57169you can also use
170[`cros flash`](https://sites.google.com/a/chromium.org/dev/chromium-os/build/cros-flash)
171command in chroot.
172
173 $ cros flash usb:// rma_image.bin
174
175### Boot from RMA shim (clamshells / convertibles)
176
Cheng-Han Yang6f8aa662021-01-07 05:51:171771. Enter recovery mode.
Cheng-Han Yang97c0af92019-07-20 18:57:011781. Press `CTRL + D` to turn on developer switch.
1791. Press `ENTER` to confirm.
Cheng-Han Yang6f8aa662021-01-07 05:51:171801. Enter recovery mode again (no need to wait for wiping).
Cheng-Han Yang97c0af92019-07-20 18:57:011811. Insert and boot from USB stick with `rma_image.bin`.
Cheng-Han Yang730845a2019-01-25 07:31:57182
183### Boot from RMA shim (tablets / detachables)
184
Cheng-Han Yang6f8aa662021-01-07 05:51:171851. Enter recovery mode.
Cheng-Han Yang97c0af92019-07-20 18:57:011861. Press `VOL_UP + VOL_DOWN` to show recovery menu.
Cheng-Han Yang730845a2019-01-25 07:31:571871. Press `VOL_UP` or `VOL_DOWN` to move the cursor to "Confirm Disabling OS
Cheng-Han Yang97c0af92019-07-20 18:57:01188 Verification", and press `POWER` to select it.
Cheng-Han Yang6f8aa662021-01-07 05:51:171891. Enter recovery mode again (no need to wait for wiping).
Cheng-Han Yang97c0af92019-07-20 18:57:011901. Insert and boot from USB stick with `rma_image.bin`.
Cheng-Han Yang730845a2019-01-25 07:31:57191
Cheng-Han Yang6f8aa662021-01-07 05:51:17192See [here](https://google.com/chromeos/recovery) for instructions to enter
193recovery mode.
194
Cheng-Han Yang169e2b92019-04-25 03:54:51195### RMA shim menu
196
Cheng-Han Yang730845a2019-01-25 07:31:57197The RMA shim has a menu that allows the user to select an action to perform,
198which is described in
199[Factory Installer README](https://chromium.googlesource.com/chromiumos/platform/factory_installer/#factory-shim-menu).
Cheng-Han Yangb82a1932019-04-20 06:04:48200Moreover, if the RMA shim is created using `image_tool rma create` command, the
Cheng-Han Yang730845a2019-01-25 07:31:57201tool adds a flag `RMA_AUTORUN=1` in `lsb-factory` file, which sets the default
Cheng-Han Yang1e425682020-07-14 08:53:50202action of the menu depending on the cr50 version and hardware write protection
Cheng-Han Yang730845a2019-01-25 07:31:57203status, such that:
204
Chih-Yao Chuang7bc752d2024-10-09 02:43:012051. If hardware write protection is enabled, set the default action to
206 **(E) Reset Cr50**, also known as RSU (RMA Server Unlock) to disable
207 hardware write protection and enter factory mode. After RMA reset, the
208 device will reboot. The user should enter recovery mode and boot to shim
209 again.
2101. If hardware write protection is disabled, set the default action to
211 **(I) install** to install payloads from USB. If hardware write protection
212 is disabled by disconnecting the battery instead of doing RSU, the install
213 script will also enable factory mode at the end of installation.
Cheng-Han Yang730845a2019-01-25 07:31:57214
215You can stop the default action and return to shim menu by pressing any key
216within 3 seconds when the console prompts "press any key to show menu instead".
217
218During installation, you can remove the RMA shim when the copy is complete (the
219text color changes from yellow to green). After the installation, the device
220will boot into the test image with factory toolkit. Run through the factory
221tests to complete the flow. The last test should wipe out the factory test image
222and enable the release image.
223
224## Create a universal RMA shim
225
Cheng-Han Yang169e2b92019-04-25 03:54:51226We can use `image_tool rma merge` command to create a universal shim using
227multiple RMA shims.
Cheng-Han Yang730845a2019-01-25 07:31:57228
Cheng-Han Yang169e2b92019-04-25 03:54:51229 $ setup/image_tool rma merge \
Cheng-Han Yang730845a2019-01-25 07:31:57230 -i soraka.bin scarlet.bin \
231 -o universal.bin
232
Cheng-Han Yang169e2b92019-04-25 03:54:51233To delete a previously generated output image, specify the `-f` option:
Cheng-Han Yang730845a2019-01-25 07:31:57234
Cheng-Han Yang169e2b92019-04-25 03:54:51235 $ setup/image_tool rma merge \
Cheng-Han Yang730845a2019-01-25 07:31:57236 -i soraka.bin scarlet.bin \
237 -o universal.bin -f
238
Cheng-Han Yang169e2b92019-04-25 03:54:51239## Update a universal RMA shim
240
241`image_tool rma merge` supports merging universal shims. If there are duplicate
242boards, it will ask the user to select which one to use. It can be used to
243update a board in a universal shim using an updated single-board RMA shim.
244
245 $ setup/image_tool rma merge \
246 -i universal.bin soraka_new.bin \
247 -o universal_new.bin
248 Scanning 2 input image files...
249
250 Board soraka has more than one entry.
251 ========================================================================
252 (1)
253 From universal.bin
254 board : soraka
255 install_shim : 10323.39.28
256 release_image : 10575.37.0 (Official Build) dev-channel soraka
257 test_image : 10323.39.24 (Official Build) dev-channel soraka test
258 toolkit : soraka Factory Toolkit 10323.39.24
259 firmware : Google_Soraka.10431.32.0;Google_Soraka.10431.48.0
260 hwid : None
261 complete : None
262 toolkit_config: None
263 lsb_factory : lsb_factory
264 ========================================================================
265 (2)
266 From soraka_new.bin
267 board : soraka
268 install_shim : 10323.39.31
269 release_image : 10575.37.0 (Official Build) dev-channel soraka
270 test_image : 10323.39.24 (Official Build) dev-channel soraka test
271 toolkit : soraka Factory Toolkit 10323.39.24
272 firmware : Google_Soraka.10431.32.0;Google_Soraka.10431.48.0
273 hwid : None
274 complete : None
275 toolkit_config: None
276 lsb_factory : lsb_factory
277 ========================================================================
278 Please select an option [1-2]:
279
Cheng-Han Yang730845a2019-01-25 07:31:57280## Use a universal RMA shim
281
282Using a universal RMA shim is exactly the same as using a normal single-board
283RMA shim. Flash the image to a USB drive and boot from it using the instructions
284mentioned [above](#use-an-rma-shim).
285
286## Other RMA commands
287
288There are other `image_tool` commands that makes verifying and modifying RMA
Cheng-Han Yang169e2b92019-04-25 03:54:51289shims easier. For detailed description and usage, please use the `--help`
290argument of the commands. For instance:
291
292 $ setup/image_tool rma show --help
Cheng-Han Yang730845a2019-01-25 07:31:57293
294### Print bundle components in an RMA shim
295
Cheng-Han Yang169e2b92019-04-25 03:54:51296`image_tool rma show` command can print the component versions in an RMA shim.
Cheng-Han Yang18ac6e62019-01-15 06:23:18297
Cheng-Han Yang169e2b92019-04-25 03:54:51298 $ setup/image_tool rma show -i soraka.bin
Cheng-Han Yang18ac6e62019-01-15 06:23:18299 This RMA shim contains boards: soraka
Cheng-Han Yang169e2b92019-04-25 03:54:51300 ========================================================================
301 board : soraka
302 install_shim : 10323.39.31
303 release_image : 10575.37.0 (Official Build) dev-channel soraka
304 test_image : 10323.39.24 (Official Build) dev-channel soraka test
305 toolkit : soraka Factory Toolkit 10323.39.24
306 firmware : Google_Soraka.10431.32.0;Google_Soraka.10431.48.0
307 hwid : None
308 complete : None
309 toolkit_config: cb5b52296cd4fcb0418b6879c0acc32b
310 lsb_factory : d2c9d6a7d32ee3b1279c2b0b27244727
311 ========================================================================
Cheng-Han Yang18ac6e62019-01-15 06:23:18312
Cheng-Han Yang730845a2019-01-25 07:31:57313This command also applies to universal RMA shim.
Cheng-Han Yang18ac6e62019-01-15 06:23:18314
Cheng-Han Yang169e2b92019-04-25 03:54:51315 $ setup/image_tool rma show -i universal.bin
Cheng-Han Yang18ac6e62019-01-15 06:23:18316 This RMA shim contains boards: soraka scarlet
Cheng-Han Yang169e2b92019-04-25 03:54:51317 ========================================================================
318 board : soraka
319 install_shim : 10323.39.31
320 release_image : 10575.37.0 (Official Build) dev-channel soraka
321 test_image : 10323.39.24 (Official Build) dev-channel soraka test
322 toolkit : soraka Factory Toolkit 10323.39.24
323 firmware : Google_Soraka.10431.32.0;Google_Soraka.10431.48.0
324 hwid : None
325 complete : None
326 toolkit_config: cb5b52296cd4fcb0418b6879c0acc32b
327 lsb_factory : d2c9d6a7d32ee3b1279c2b0b27244727
328 ========================================================================
329 board : scarlet
330 install_shim : 10211.68.0
331 release_image : 10575.67.0 (Official Build) stable-channel scarlet
332 test_image : 10211.53.0 (Official Build) dev-channel scarlet test
333 toolkit : scarlet Factory Toolkit 10211.53.0
334 firmware : Google_Scarlet.10388.26.0
335 hwid : None
336 complete : None
337 toolkit_config: None
338 lsb_factory : c82d4c1f831bf20d7cdc70138fe4ef72
339 ========================================================================
340
341### Replace bundle components in an RMA shim
342
343`image_tool rma replace` command can replace components in an RMA shim. For
344instance, to replace the HWID bundle in an RMA shim with a new one:
345
346 $ setup/image_tool rma replace -i rma_image.bin --hwid new_hwid_bundle.sh
347
348If the RMA shim is a universal shim, argument `--board` is needed.
349
350 $ setup/image_tool rma replace -i universal.bin \
351 --board soraka --hwid new_hwid_bundle.sh
352
353This command supports replacing `release_image`, `test_image`, `toolkit`,
354`factory_shim`, `firmware`, `hwid`, `complete_script` and `toolkit_config`.
355
356### Extract a single-board RMA shim from a universal shim
357
358`image_tool rma extract` command can extract a single-board RMA shim from a
359universal shim.
360
361 $ setup/image_tool rma extract -i universal.bin -o extract.bin
362 Scanning input image file...
363
364 Please select a board to extract.
365 ========================================================================
366 (1)
367 board : soraka
368 install_shim : 10323.39.31
369 release_image : 10575.37.0 (Official Build) dev-channel soraka
370 test_image : 10323.39.24 (Official Build) dev-channel soraka test
371 toolkit : soraka Factory Toolkit 10323.39.24
372 firmware : Google_Soraka.10431.32.0;Google_Soraka.10431.48.0
373 hwid : None
374 complete : None
375 toolkit_config: cb5b52296cd4fcb0418b6879c0acc32b
376 lsb_factory : d2c9d6a7d32ee3b1279c2b0b27244727
377 ========================================================================
378 (2)
379 board : scarlet
380 install_shim : 10211.68.0
381 release_image : 10575.67.0 (Official Build) stable-channel scarlet
382 test_image : 10211.53.0 (Official Build) dev-channel scarlet test
383 toolkit : scarlet Factory Toolkit 10211.53.0
384 firmware : Google_Scarlet.10388.26.0
385 hwid : None
386 complete : None
387 toolkit_config: None
388 lsb_factory : c82d4c1f831bf20d7cdc70138fe4ef72
389 ========================================================================
390 Please select an option [1-2]:
391
392### Edit lsb-factory config in an RMA shim
393
394`image_tool edit_lsb` command can modify `lsb-factory` config, such as
395`RMA_AUTORUN` flag.
396
397 $ setup/image_tool edit_lsb -i rma_image.bin
398
399 Current LSB config:
400 ========================================================================
401 CHROMEOS_AUSERVER=http://...
402 CHROMEOS_DEVSERVER=http://...
403 FACTORY_INSTALL=1
404 HTTP_SERVER_OVERRIDE=true
Cheng-Han Yang169e2b92019-04-25 03:54:51405 FACTORY_INSTALL_FROM_USB=1
406 RMA_AUTORUN=true
407 ========================================================================
Chih-Yao Chuangc548f492023-07-20 02:27:47408 (1) Modify board to install.
409 (2) Modify Chrome OS Factory Server address.
410 (3) Modify default action (will be overridden by RMA autorun).
411 (4) Enable/disable countdown before default action.
412 (5) Enable/disable complete prompt in RMA shim.
413 (6) Enable/disable autorun in RMA shim.
414 (7) Modify cutoff config in cros payload (only for old devices).
415 (8) Enable or disable qrcode when factory reset.
Cheng-Han Yang169e2b92019-04-25 03:54:51416 (w) Apply changes and exit.
Chih-Yao Chuangc548f492023-07-20 02:27:47417 (q) Quit without saving changes.
418 Please select an option [1-9, w, q]:
419
Cheng-Han Yang169e2b92019-04-25 03:54:51420
421or
422
423 $ setup/image_tool edit_lsb -i universal.bin --board soraka
424
Chih-Yao Chuangc548f492023-07-20 02:27:47425|Flags|Description|Option to modify|release shim version|
426|-|-|-|-|
427|CHROMEOS_RELEASE_BOARD|For using board specific config. (might be overridden by the value in firmware)|(1)|-|
428|CHROMEOS_AUSERVER|Chrome OS Factory Server address.|(2)|-|
429|CHROMEOS_DEVSERVER|Not used.|(2)|-|
430|FACTORY_INSTALL_DEFAULT_ACTION|The factory shim will execute the default action automatically if not interrupted by user.|(3)|-|
431|FACTORY_INSTALL_ACTION_COUNTDOWN|Countdown before doing default action, the countdown is 3 seconds|(4)|12387|
432|FACTORY_INSTALL_COMPLETE_PROMPT|Wait for ENTER after action **(I) Install** is completed.|(5)|11766|
Chih-Yao Chuang7bc752d2024-10-09 02:43:01433|RMA_AUTORUN|The factory shim will set the default action to **(I) Install** or **(E) Perform RSU**, depending on HWWP status. |(6)|11394|
Chih-Yao Chuangc548f492023-07-20 02:27:47434|CUTOFF_METHOD, CUTOFF_AC_STATE, CUTOFF_BATTERY_MIN_PERCENTAGE, CUTOFF_BATTERY_MAX_PERCENTAGE, CUTOFF_BATTERY_MIN_VOLTAGE, CUTOFF_BATTERY_MAX_VOLTAGE, SHOPFLOOR_URL|[Deprecated](#deprecate_cutoff).|(7)|-|
435|DISPLAY_QRCODE|Display the information of the DUT as a qrcode, to increase the flexibility of customized process of factory reset.|(8)|15448|
Chih-Yao Chuang1b9c2022023-12-05 07:31:05436|DISPLAY_INFO|Support fields are: `hwid`, `serial_number`, `mlb_serial_number`, `wifi_mac0`, `service_tag`. For example: `hwid serial_number, wifi_mac0` will display hwid and serial_number in the first qrcode, and display wifi_mac0 in the second qrcode. |(8)|15448|
Chih-Yao Chuangc548f492023-07-20 02:27:47437|NETBOOT_RAMFS|This flag is automatically set to `1` when using netboot firmware. The factory shim will set the default action to **(I) Install**.|N/A|-|
438
Cheng-Han Yang169e2b92019-04-25 03:54:51439Note:
440
441* Please do not directly mount the stateful partition and modify `lsb-factory`
442 file. The actual config is stored in cros payload, so the modifications in
443 the file will be overwritten.
Chih-Yao Chuangc548f492023-07-20 02:27:47444* <div id="deprecate_cutoff">Starting from version 12162.0.0, cutoff config is not stored in `lsb-factory`.
Cheng-Han Yang169e2b92019-04-25 03:54:51445 Using this command to modify cutoff config is only effective for factory shim
446 older than this version. For factory shim later than this version, please use
Chih-Yao Chuangc548f492023-07-20 02:27:47447 `image_tool edit_toolkit_config` command to edit cutoff config.</div>
448* The install shim also checks `/etc/lsb-factory` for flags that decides the
449default action of the shim menu (listed from high priority to low priority).
450 * `NETBOOT_RAMFS=1`
451 * `RMA_AUTORUN=true`
452 * `DEFAULT_ACTION=<action>`
Cheng-Han Yang169e2b92019-04-25 03:54:51453
454### Edit toolkit config in an RMA shim.
455
456`image_tool edit_toolkit_config` command can modify toolkit config, such as
Chih-Yao Chuang4a460522024-03-29 05:53:33457active test list and cutoff config (after version 12162.0.0) and the config of
458customized reset process.
Cheng-Han Yang169e2b92019-04-25 03:54:51459
460 $ setup/image_tool edit_toolkit_config -i rma_image.bin
461
462 Toolkit config:
463 ========================================================================
464 {
465 "cutoff": {
466 "CUTOFF_BATTERY_MAX_PERCENTAGE": 90,
467 "CUTOFF_BATTERY_MIN_PERCENTAGE": 60,
468 "CUTOFF_METHOD": "battery_cutoff",
Chih-Yao Chuangf8a01312023-09-04 07:49:39469 "CUTOFF_AC_STATE": "remove_ac",
470 "CONTINUE_KEY": "s",
471 "QRCODE_INFO": "serial_number"
Cheng-Han Yang169e2b92019-04-25 03:54:51472 },
473 "active_test_list": {
474 "id": "main_rma"
475 }
476 }
477 ========================================================================
478 (1) Modify active test list.
479 (2) Modify test list constants.
480 (3) Modify cutoff config.
Chih-Yao Chuang4a460522024-03-29 05:53:33481 (4) Enable or disable a confirmation before battery cutoff.
482 (5) Enable or disable qrcode right before cutoff.
483 (6) Modify the config to perform customized reset process.
Cheng-Han Yang169e2b92019-04-25 03:54:51484 (q) Quit without saving changes.
485 (w) Apply changes and exit.
486 Please select an option [1-3, q, w]:
487
488or
489
490 $ setup/image_tool edit_toolkit_config -i universal.bin --board soraka
491
Chih-Yao Chuangc548f492023-07-20 02:27:47492|Flags|Description|Option to modify|
493|-|-|-|
494|active_test_list.id|The default test list when starting toolkit.|(1)|
Chih-Yao Chuang4a460522024-03-29 05:53:33495|test_list_constants|The constant variables in test list.|(2)|
496|cutoff|Cutoff process is at the end of factory reset. Check [cutoff README](https://chromium.googlesource.com/chromiumos/platform/factory/+/HEAD/sh/cutoff/README.md) for more information.|(3), (4), (5)|
497|custom_reset_process|The config to perform customized reset process. Check [CUSTOM_RESET_PROCESS](./CUSTOM_RESET_PROCESS.md) for more information.|(6)|
Chih-Yao Chuangc548f492023-07-20 02:27:47498
Cheng-Han Yang953efab2019-05-22 11:55:15499### Unpack and repack toolkit in an RMA shim.
Cheng-Han Yang169e2b92019-04-25 03:54:51500
Cheng-Han Yang953efab2019-05-22 11:55:15501`image_tool payload toolkit` command can unpack and repack the factory toolkit
502in an RMA shim.
Cheng-Han Yang169e2b92019-04-25 03:54:51503
Cheng-Han Yang953efab2019-05-22 11:55:15504 $ setup/image_tool payload toolkit -i rma_image.bin --unpack toolkit_path
Cheng-Han Yang169e2b92019-04-25 03:54:51505 (Edit some files in toolkit_path/ ...)
Cheng-Han Yang953efab2019-05-22 11:55:15506 $ setup/image_tool payload toolkit -i rma_image.bin --repack toolkit_path
Cheng-Han Yang169e2b92019-04-25 03:54:51507
508or
509
Cheng-Han Yang953efab2019-05-22 11:55:15510 $ setup/image_tool payload toolkit \
511 -i universal.bin --board soraka --unpack toolkit_path
Cheng-Han Yang169e2b92019-04-25 03:54:51512 (Edit some files in toolkit_path/ ...)
Cheng-Han Yang953efab2019-05-22 11:55:15513 $ setup/image_tool payload toolkit \
514 -i universal.bin --board soraka --repack toolkit_path