自定义国家/地区和操作员设置资产Customize the Country and Operator Settings Asset

国家和操作员设置资产 (COSA) 是移动运营商配置文件的数据库。The Country and Operator Settings Asset (COSA) is a database of mobile operator profiles. 它包含在 Windows 10 中作为预配包。It is included in Windows 10 as a provisioning package. 在启用了 COSA 的基于 Windows 的设备中插入 SIM 后,预配框架将通过在 COSA 中搜索匹配的配置文件和 APN 来尝试建立手机网络连接。When a SIM is inserted in a COSA-enabled Windows-based device, the provisioning framework attempts to establish a cellular connection by searching for the matching profile and APN in COSA.

备注

只有 Windows 10 版本1703及更高版本才支持此功能,适用于 desktop edition (Home、Pro、Enterprise 和教育) This feature is only supported in Windows 10, version 1703 and above for desktop editions (Home, Pro, Enterprise, and Education)

COSA 可以在桌面映像过程中通过 OEM 生成的预配包进行扩展。COSA can be extended with OEM-generated provisioning packages during desktop imaging. 这使 Oem 能够向数据库引入新的 COSA 配置文件,以及替换或扩展现有的 Windows COSA 配置文件。This enables OEMs to introduce new COSA profiles to the database, as well as replace or extend existing Windows COSA profiles. 例如,你可以通过创建包含这些设置的答案文件,为移动虚拟网络运营商添加一个配置文件, (MVNO) 当前不在 COSA 或新的移动计划合作伙伴。For example, you can add a profile for a mobile virtual network operator (MVNO) not currently in COSA, or a new partner for Mobile Plans, by creating an answer file that contains the settings. 你还可以使用 Replace 现有答案文件中的运算符来更改或删除现有配置文件。You can also change or remove an existing profile using the Replace operator in the existing answer file.

重要

  • 请确保阅读下面的 " 如何支持 COSA OEM 生成的预配包" 一 节。Please ensure that you read the How to support the COSA OEM-generated provisioning package once the device is in market section below.
  • 通常,只应添加不包含在 Windows COSA 数据库中的 APNs。Generally you should only add APNs that are not included in the Windows COSA database. 如果替换已存在于 COSA 中的条目,并且移动运营商在将来更改这些条目,则这些条目将不会自动更新,因为数据库将查找这些条目的 OEM COSA 包。If you replace entries that already exist in COSA, and the mobile operator changes those in the future, they will not be automatically updated since the database will look to the OEM COSA package for those entries.
  • 我们建议为你计划添加的移动运营商咨询最新的 APNs,以确保当操作员使用不同于手机) 的 COSA 时,如果有数据设备特定的 APNs 添加到 OEM 文件中,则会 (。We recommend consulting the latest APNs for the mobile operator you are planning to add, to ensure that if there are data device specific APNs that those are added to the OEM COSA file (in case the operator uses different APNs for tablets than phones).
  • Microsoft 建议移动运营商提交任何配置文件更改,以便将 COSA 扩展到 Microsoft。Microsoft recommends Mobile Operators to submit any profile changes made to extend COSA to Microsoft. 若要了解详细信息,请参阅 COSA/APN 数据库提交To learn more, see COSA/APN database submission.

重要

Microsoft 正在收集以下与 COSA 相关的遥测数据:Microsoft is collecting the following telemetry data related to the COSA:

  • AfterMarketProfile –在 OEM 包添加新的配置文件时发布。AfterMarketProfile – Published when an OEM package adds a new profile. 数据包括配置文件 ID (通常为 GUID) ,以及配置文件 (如 MCC、MNC、SPN 等) 的目标信息。Data includes the profile ID (typically a GUID) as well as the targeting info for the profile (such as MCC, MNC, SPN, and so on).
  • ProfileReplaced –在 OEM 包替换 COSA 配置文件时发布。ProfileReplaced – Published when the OEM package replaces a COSA profile. Data 是配置文件 ID。Data is the profile ID.
  • ProfileSuppressedByAfterMarketProfile –当 OEM 包包含与 COSA 配置文件也匹配的配置文件时发布。ProfileSuppressedByAfterMarketProfile – Published when an OEM package contains a profile that matches when a COSA profile also matches. 遥测数据包含配置文件 ID。The telemetry data contains the Profile ID.

添加新的配置文件To add a new profile

你可以使用以下步骤添加 COSA 数据库中尚未包含的新配置文件。You can add a new profile that is not yet included in the COSA database using the following steps.

  1. 创建应答文件或编辑现有答案文件,其中包含新的配置文件设置。Create an answer file or edit an existing answer file that contains the new profile settings. 下面是一个示例,Below is an example,

    • 请确保将 <ID> 标记信息替换为自己的 GUID。Please ensure that you are replacing the <ID> tag information with your own GUID.
     <?xml version="1.0" encoding="UTF-8"?>
    <WindowsCustomizations>
     <PackageConfig xmlns="urn:schemas-Microsoft-com:Windows-ICD-Package-Config.v1.0">
       <ID>{7240F79C-7567-4BA3-95C0-ABD31D02A385}</ID>
       <Name>COSAPC.Extension</Name>
       <Version>5.0</Version>
       <OwnerType>OEM</OwnerType>
     </PackageConfig>
     <Settings xmlns="urn:schemas-microsoft-com:windows-provisioning">
       <Customizations>
         <Targets>
           <Target Id="12345678-abcd-1111-aaaa-1ead5bca0320">
             <TargetState>
               <Condition Name="Mcc" Value="901" />
               <Condition Name="Mnc" Value="37" />
               <Condition Name="ICCID" Value="range:8988247000100000000,8988247000199999997" />
               <Condition Name="uiname" Value="Contoso (OEM)" />
               <Condition Name="uiorder" Value="0" />
             </TargetState>
           </Target>
           <Target Id="87654321-abcd-1111-aaaa-1ead5bca0320">
             <TargetState>
               <Condition Name="Mcc" Value="001" />
               <Condition Name="Mnc" Value="01" />
               <Condition Name="uiname" Value="Fabrikam (OEM)" />
               <Condition Name="uiorder" Value="0" />
             </TargetState>
           </Target>
         </Targets>
         <Profile Name="Fabrikam (OEM)">
           <TargetRefs>
             <TargetRef Id="87654321-abcd-1111-aaaa-1ead5bca0320" />
           </TargetRefs>
           <Settings>
             <Connections>
               <Cellular>
                 <Connection ConnectionName="Fabrikam (OEM)_i0$(__MVID)@WAP">
                   <PurposeGroups>{3e5545d2-1137-4dc8-a198-33f1c657515f}</PurposeGroups>
                   <AlwaysOn>1</AlwaysOn>
                   <FriendlyName>Fabrikan Connect</FriendlyName>
                   <AccessPointName>apn</AccessPointName>
                   <IPType>IPv4v6</IPType>
                   <AlwaysOn>1</AlwaysOn>
                   <Roaming>5</Roaming>
                 </Connection>
               </Cellular>
             </Connections>
             <DataMarketplace>
               <PerSimSettings>
                 <SettingsForSim SimIccid="$(__ICCID)">
                   <SupportDataMarketplace>1</SupportDataMarketplace>
                   <DataMarketplaceRoamingUIEnabled>0</DataMarketplaceRoamingUIEnabled>
                 </SettingsForSim>
               </PerSimSettings>
             </DataMarketplace>
           </Settings>
         </Profile>
         <Profile Name="Contoso (OEM)">
           <TargetRefs>
             <TargetRef Id="12345678-abcd-1111-aaaa-1ead5bca0320" />
           </TargetRefs>
           <Settings>
             <Connections>
               <Cellular>
                 <Connection ConnectionName="Contoso (OEM)_i0$(__MVID)@WAP">
                   <PurposeGroups>{3e5545d2-1137-4dc8-a198-33f1c657515f}</PurposeGroups>
                   <AlwaysOn>1</AlwaysOn>
                   <FriendlyName>Contoso Connect</FriendlyName>
                   <AccessPointName>apn</AccessPointName>
                   <IPType>IPv4v6</IPType>
                   <AlwaysOn>1</AlwaysOn>
                   <Roaming>5</Roaming>
                 </Connection>
               </Cellular>
             </Connections>
             <DataMarketplace>
               <PerSimSettings>
                 <SettingsForSim SimIccid="$(__ICCID)">
                   <SupportDataMarketplace>1</SupportDataMarketplace>
                   <DataMarketplaceRoamingUIEnabled>0</DataMarketplaceRoamingUIEnabled>
                 </SettingsForSim>
               </PerSimSettings>
             </DataMarketplace>
           </Settings>
         </Profile>
       </Customizations>
     </Settings>
    </WindowsCustomizations>
    
  2. 创建包含应答文件的预配包。Create a provisioning package that includes the answer file. 有关详细信息,请参阅 生成预配包For more information, see To build a provisioning package.

  3. 将预配包 (PPKG) 在以下位置:%WINDIR%\Provisioning\COSA\OEM。Place your provisioning packages (PPKG) in the following location: %WINDIR%\Provisioning\COSA\OEM.

  4. 执行所需的验证测试。Perform necessary tests for validation.

下面是与 APNs 相关的 用途组 的列表。Below is a list of the Purpose Groups relevant for the APNs.

类型Type 标识符Identificator
InternetInternet 3E5545D2-1137-4DC8-A198-33F1C657515F3E5545D2-1137-4DC8-A198-33F1C657515F
LTE 附加LTE attach 11A6FE68-5B47-4859-9CB6-1EAC96A8F0BD11A6FE68-5B47-4859-9CB6-1EAC96A8F0BD
购买Purchase 95522B2B-A6D1-4E40-960B-05E6D3F962AB95522B2B-A6D1-4E40-960B-05E6D3F962AB
管理Administrative 2FFD9261-C23C-4D27-8DCF-CDE4E14A33642FFD9261-C23C-4D27-8DCF-CDE4E14A3364

有关 COSA 设置的完整列表,请参阅 规划 COSA/APN 数据库提交For a full list of COSA settings, please see Planning your COSA/APN database submission.

设备进入市场后,如何支持 COSA OEM 生成的预配包How to support the COSA OEM-generated provisioning package once the device is in market

在设备映像中包括 COSA OEM 生成的预配包之前,请考虑一种在设备进入市场后更新 COSA OEM 生成的包的机制。Before including your COSA OEM-generated provisioning package in your device image, please consider a mechanism to update the COSA OEM-generated package after the device is in market. 下面是有关映像配置和更新的其他说明。Here are additional notes on image configuration and updates.

  1. 需要从 .PBR 迁移中排除 COSA OEM 生成的预配包,以避免重复条目,请参阅 排除文件和设置The COSA OEM-generated provisioning package needs to be excluded from the PBR migration to avoid duplicate entries, see Exclude Files and Settings.
    • 若要测试排除文件是否成功,你将需要使用已实现了 .PBR 的工厂映像,然后中转到 "设置-> 更新-> 重置此电脑",然后在 "重置" 后,你仍可以在 "设置-> 网络->" 移动电话中查看自定义接入点。To test that the exclusion file was successful, you will need to have a factory image with PBR implemented, then go to settings -> update -> reset this PC and after reset you should still be able to see the customized APN in settings -> network -> cellular. %WINDIR%\Provisioning\COSA\OEM 文件夹中还应该只有一个 OEM COSA 预配包。There should also only be one OEM COSA provisioning package in the %WINDIR%\Provisioning\COSA\OEM folder.

示例Example

<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/MyFileExclusions">
  <component type="Documents" context="System">
    <displayName>File exclusions</displayName>
    <role role="Data">
      <rules>       
        <unconditionalExclude>
          <objectSet>
            <pattern type="File">%SystemDrive%\Windows\Provisioning\Cosa\OEM\* [*]</pattern>
          </objectSet>
        </unconditionalExclude>
      </rules>
    </role>
  </component>
</migration>
  1. 对于通过 COSA OEM 生成的预配包添加的任何操作员,如果移动运营商将来更改,则需要由 OEM 维护,因此,你应确保你有一种机制,以便在将来更新这些操作员。For any operators you add via the COSA OEM-generated provisioning package, will need to be maintained by the OEM in case of future changes by the mobile operator so you should ensure you have a mechanism to update these in the future.

    • 包的更新由驱动程序和 Windows 更新Update of the package is handled by a driver and Windows Update
    • 你将需要确保设备上已存在设备上用于移动电话组件的设备驱动程序,并且 INF 文件已设置为复制 PPKGYou will need to ensure you have an existing device driver on the device for the cellular component and the INF file is set to copy the PPKG
    • 按照 本文档 中的说明创作 INF 文件示例:Follow the instructions in this document to author the INF file Example:
       [SourceDisksNames]
       1 = %DiskId1%
    
       [SourceDisksFiles]
       ContosoCosaCustomization.ppkg = 1
       ContosoCosaCustomizationWithDataClass.xml = 1
       ; other driver package files omitted from example for brevity
    
       [DestinationDirs]
       CosaCustomization.CopyList =10,Provisioning\Cosa\OEM
       ; other CopyFiles sections in DestinationDirs omitted from example for brevity
    
       ; Manufacturer and Models sections omitted for brevity. Assume Models section indicates a DDInstall section of ContosoInstallSection
    
       [ContosoInstallSection]
       CopyFiles=CosaCustomization.CopyList
    
       [CosaCustomization.CopyList]
       ContosoCosaCustomization.ppkg
       ContosoCosaCustomizationWithDataClass.xml
    
    • 需要预先加载出厂映像的驱动程序,以便在将来更新中的驱动 Windows 更新程序时,设备将扫描并查找此驱动程序的更新版本以供下载和安装。The driver needs to be preloaded on your factory image so that if you update the driver on Windows Update in the future the device will scan for and find a newer version of this driver to download and install.
    • 你应通过 Windows 更新在与为预发行设备或驱动程序测试驱动程序更新相同的机制中测试更新机制。You should test the update mechanism via Windows Update in the same mechanism as you would test driver updates for a prerelease device or driver.
    • 如果你具有用于更新 COSA OEM 生成的预配包的备用机制,请确保它在出厂映像上运行,并在运行 "推送" 按钮重置后,在设备上运行来测试最终用户方案。If you have an alternate mechanism to update the COSA OEM-generated provisioning package, ensure that it works both on the factory image, and on the device after push button reset is run to test the end user scenario.

    备注

    在以下条件下将应用 PPKG。The PPKG will be applied in the following conditions. 它的设计是,在将 PPKG 复制到指定位置时,不会应用它们It is by design that they are not applied at the event of the PPKG being copied to the specified location

    • 当系统处于空闲状态时操作系统重启After OS Reboot when system is idle
    • 当系统处于空闲状态时用户登录After User Login when system is idle
  2. 如果移动运营商为实例 APNs) 更新了任何设置信息 (并且设备 COSA 了 OEM 生成的用于该移动运营商的预配包,则 OEM 需要获取新的设置信息,并通过 Windows 更新在随附设备上更新其 COSA OEM 生成的预配包。If the mobile operator updates any provisioning information (for instance APNs) and the device is COSA OEM-generated provisioning package for that mobile operator, the OEM will need to get the new provisioning information and update their COSA OEM-generated provisioning package on the shipped devices via Windows Update.