Surface Dev Center Manager tool to automate WHQL/Attestation submissions and Shipping Label creation for Microsoft Hardware Dev Center
Перейти к файлу
Ben Carpenter 8d8bc16691
update packagee references (#58)
2024-09-11 07:13:56 -07:00
.github Add issue template for bugs (#49) 2023-02-09 17:03:37 -08:00
Scripts Update scripts create objects (#51) 2023-03-20 10:46:56 -07:00
SurfaceDevCenterManager update packagee references (#58) 2024-09-11 07:13:56 -07:00
build Build process updates to set the version number for the assembly (#8) 2018-12-12 21:47:39 -08:00
.gitignore Initial commit 2018-09-30 09:35:24 -07:00
LICENSE Initial commit 2018-09-30 09:35:27 -07:00
README.md Update scripts create objects (#51) 2023-03-20 10:46:56 -07:00
SECURITY.md Update README files (#47) 2023-02-04 18:23:29 -08:00
SurfaceDevCenterManager.sln Add support for ENVOnly credential option. (#26) 2020-09-29 16:29:01 -07:00
azure-pipelines-ci.yml Build process updates to set the version number for the assembly (#8) 2018-12-12 21:47:39 -08:00
azure-pipelines.yml Update build yml for CI (#5) 2018-11-24 09:35:56 -08:00

README.md

Surface Dev Center Manager (SDCM)

Surface Dev Center Manager (SDCM) is a tool that utilizes the REST APIs made available by Microsoft Partner Center (a.k.a. Hardware Dev Center) to automate many common tasks for hardware development and maintenance around driver and firmware management.

SDCM enables you to create Attestation and WHQL products, submissions, download the resulting signed packages, and manage shipping labels to release software on Windows Update.

This tool is based on the Hardware Dashboard API. Detailed options are available with the -?, -h or -help option at the command line.


Getting Started

  1. Clone the repo
  2. Follow the steps here to setup your app to get credentials
  3. Edit authconfig.json to the appropriate values after your app was set up
    • Change clientId, tenantId and key to match the values from your app registration
    • You should not have to change the url or urlPrefix
  4. Build the project

Input Json Formats

Please refer to the Hardware Dashboard API documentation for detailed information on each of the settings below. This sample is targeted for a RS4 HLK submission and shipping label.

Creating a Product

{
    "createType": "product",
    "createProduct": {
        "productName": "ProductName_HLK",
        "testHarness": "HLK",
        "announcementDate": "2023-01-01T00:00:00",
        "deviceMetadataIds": null,
        "firmwareVersion": "0",
        "deviceType": "external",
        "isTestSign": false,
        "isFlightSign": false,
        "marketingNames": null,
        "selectedProductTypes": {
            "windows_v100_RS4": "Unclassified"
        },
        "requestedSignatures": [
            "WINDOWS_v100_X64_RS4_FULL"
        ],
        "additionalAttributes": null
    }
}

For an Attestation submission, change testHarness to Attestation.


Creating a Submission

{
    "createType": "submission",
    "createSubmission": {
        "name": "ProductName_HLK_Submission",
        "type":  "initial"
     }
 }

Creating a Shipping Label

{
    "createType": "shippingLabel",
    "createShippingLabel": {
        "publishingSpecifications": {
            "goLiveDate": "2023-01-01T00:00:00.000Z",
            "visibleToAccounts": [],
            "isAutoInstallDuringOSUpgrade": true,
            "isAutoInstallOnApplicableSystems": true,
            "manualAcquisition": false,
            "isDisclosureRestricted": true,
            "publishToWindows10s": false,
            "additionalInfoForMsApproval": {
                "microsoftContact": "contact@microsoft.com",
                "validationsPerformed": "TBD",
                "affectedOems": [
                    "Your Company"
                ],
                "isRebootRequired": true,
                "isCoEngineered": true,
                "isForUnreleasedHardware": true,
                "hasUiSoftware": false,
                "businessJustification": "Driver Update"
            }
        },
        "targeting": {
            "hardwareIds": [
                {
                    "bundleId": "0",
                    "infId": "empty.inf",
                    "operatingSystemCode": "WINDOWS_v100_RS4_FULL",
                    "pnpString": "empty pnp"
                }
            ],
            "chids": [
                {
                    "chid": "guid",
                    "distributionState": "pendingAdd"
                }
            ],
            "restrictedToAudiences": [],
            "inServicePublishInfo": {
                "flooring": "",
                "ceiling": ""
            }
        },
        "name": "ProductName_HLK_ShippingLabel",
        "destination": "windowsUpdate"
    }
}

Note that SDCM will auto-populate and publish all hardware IDs found in a Submission when creating a Shipping Label.



Basic Operations

Create a Product

Create a json file 'Create_ProductName_HLK.json' using the Product json example above.

sdcm.exe -create Create_ProductName_HLK.json

This will output a Product ID (PID) if successful



List the Product

Verify the product was created by listing the details.

sdcm.exe -list product -productid PID


Create a Submission

Create a json file 'Create_ProductName_Submission_HLK.json' using the Submission json example above.

sdcm.exe -create Create_ProductName_Submission_HLK.json -productid PID

This will output a Submission ID (SID) if successful



List the Submission

List all the submissions for the product

sdcm.exe -list submission -productid PID

List a specific submission for the product

sdcm.exe -list submission -productid PID -submissionid SID


Upload a package to a Submission

Make sure the package (.cab or .hlkx) is signed by the Extended Validation Certificate (EV Cert) registered with your Partner Center Hardware Account

sdcm.exe -upload test.hlkx -productid PID -submissionid SID


Commit a Submission

When everything is ready to start processing the submission, commit it

sdcm.exe -commit -productid PID -submissionid SID


Wait for a Submission to be Ready

sdcm.exe -wait -productid PID -submissionid SID


Download files from a Submission

sdcm.exe -download hlksigned.zip -productid PID -submissionid SID


WHQL signing a Driver

See HLKx.ps1 in the Scripts folder.



Attestation signing a Driver

See Attestation.ps1 in the Scripts folder.



Creating a Shipping Label

See ShippingLabel.ps1 in the Scripts folder.



Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.