Patch a Factory OS image for testing

For faster testing, you can add drivers, customization packages, and test content directly into test images, eliminating the need to re-generate your image every time you want to test one of these types of packages.

Prerequisites

Usage

ImageApp.exe [OutputFile] /Patch [/Drivers:[List_of_INF_Files]] [/Customizations:[List_of_OEM_Customization_Cab]] [/TestContent:[Folder_Containing_Test_Collateral]] [/CPUType:x]

OutputFile: The path to the image to be modified.

/Patch: Add additional customizations to [OutputFile]

/CPUType:x: The CPU architecture type of the image being modified. Values: {arm|arm64|x86|amd64}

This command requires at least one of these options:

  • /Drivers:[Folder_containing_driver_files]: The path to a driver or a directory that includes drivers. Supports adding multiple driver files and/or directories, separated by semicolons. Recursively tries to install content.
  • /Customizations:[Folder_containing_Customization_Cabs]: Semicolon separated list of OEM customization cab file to add to [OutputFile]
  • /TestContent:[Folder_containing_test_collateral]: List of folders containing signed test collaterals to add to the image, under the TestContent folder in user data partition

Example:

ImageApp.exe image.ffu /Patch /Customizations:C:\workspace\Contoso_Customization\ /TestContent:c:\workspace\TestContent /CPUType:amd64

Note

You can't run this command against an image that's in a root folder. Run this command on an image that's in a clean folder that isn't a root folder.

Troubleshooting

Error code 0x800700ea

If you see error code 0x800700ea when trying to add a driver to an FFU image, you may have some VHDX files still mounted. Use Disk Management on your techician PC to try to dismount all of the mounted VHDXs related to the image you're working with, and try again.

Sample log showing error 0x800700ea:

{2/24/2020 4:56:43 PM}  Imaging: FFU file '\\?\C:\FFU\ImageApp\FactoryOS_Development_AMD64_UEFI_SpacesGPT_Hardware.ffu' loaded.
{2/24/2020 4:56:48 PM} Error: GetVolumeFromPartitionName: Waiting for DATA with store ID 0x0 failed with error code 0x800700ea.
{2/24/2020 4:56:48 PM} Error: [00:00:00] 'Failed call to GetPartitionPath for the ‘????’ partition': HRESULT_FROM_WIN32(234)
{2/24/2020 4:56:48 PM} Error: Imaging!UpdateImage: Failed to Initialize UpdateDLL::UpdateMain with error code: -2147024662 (0x800700EA)