自訂國家/地區和操作員設定資產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版和更新版本才支援這項功能,適用于桌上出版本 (家用版、專業版、企業版和教育版) This feature is only supported in Windows 10, version 1703 and above for desktop editions (Home, Pro, Enterprise, and Education)

在桌面映射處理期間,可以使用 OEM 產生的布建套件來擴充 COSA。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. 您也可以在現有的回應檔案中,使用運算子來變更或移除現有的設定檔 ReplaceYou 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,以確保如果有資料裝置特定的 APNs 將這些 apns 新增至 OEM COSA 檔案 (,以防操作員針對平板電腦使用不同的 APNs,而非行動電話) 。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. 資料包含設定檔識別碼, (通常是 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 is the profile ID.
  • ProfileSuppressedByAfterMarketProfile –當 OEM 套件包含的設定檔符合 COSA 設定檔也相符的設定檔時發佈。ProfileSuppressedByAfterMarketProfile – Published when an OEM package contains a profile that matches when a COSA profile also matches. 遙測資料包含設定檔識別碼。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
網際網路Internet 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. COSA OEM 產生的布建套件必須從 .PBR 遷移中排除,以避免重複的專案,請參閱 排除檔案和設定The COSA OEM-generated provisioning package needs to be excluded from the PBR migration to avoid duplicate entries, see Exclude Files and Settings.
    • 若要測試排除檔案是否成功,您必須具有已執行的原廠映射,然後移至 [設定]-> 更新-> 重設這部電腦,然後在重設之後,您仍然可以在 [設定] 中看到自訂的 APN-> 網路 > 行動資料。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 UpdateUpdate 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 Update 上的驅動程式,裝置將會掃描並尋找此驅動程式的較新版本,以下載並安裝。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 Update 在相同機制中測試更新機制,就像測試發行前版本裝置或驅動程式的驅動程式更新一樣。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 Update,在隨附的裝置上更新其 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.