Customize the Country and Operator Settings Asset
The Country and Operator Settings Asset (COSA) is a database of mobile operator profiles. It is included in Windows 10 as a provisioning package. 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.
Note
This feature is only supported in Windows 10, version 1703 and above for desktop editions (Home, Pro, Enterprise, and Education)
COSA can be extended with OEM-generated provisioning packages during desktop imaging. This enables OEMs to introduce new COSA profiles to the database, as well as replace or extend existing Windows COSA profiles. 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. You can also change or remove an existing profile using the Replace
operator in the existing answer file.
Important
- Please ensure that you read the How to support the COSA OEM-generated provisioning package once the device is in market section below.
- Generally you should only add APNs that are not included in the Windows COSA database. 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.
- 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 recommends Mobile Operators to submit any profile changes made to extend COSA to Microsoft. To learn more, see COSA/APN database submission.
Important
Microsoft is collecting the following telemetry data related to the COSA:
- AfterMarketProfile – Published when an OEM package adds a new profile. 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 – Published when the OEM package replaces a COSA profile. Data is the profile ID.
- 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
You can add a new profile that is not yet included in the COSA database using the following steps.
Create an answer file or edit an existing answer file that contains the new profile settings. Below is an example,
- 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>
- Please ensure that you are replacing the
Create a provisioning package that includes the answer file. For more information, see To build a provisioning package.
Place your provisioning packages (PPKG) in the following location: %WINDIR%\Provisioning\COSA\OEM.
Perform necessary tests for validation.
Below is a list of the Purpose Groups relevant for the APNs.
Type | Identificator |
---|---|
Internet | 3E5545D2-1137-4DC8-A198-33F1C657515F |
LTE attach | 11A6FE68-5B47-4859-9CB6-1EAC96A8F0BD |
Purchase | 95522B2B-A6D1-4E40-960B-05E6D3F962AB |
Administrative | 2FFD9261-C23C-4D27-8DCF-CDE4E14A3364 |
For a full list of COSA settings, please see Planning your COSA/APN database submission.
How to support the COSA OEM-generated provisioning package once the device is in market
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.
- The COSA OEM-generated provisioning package needs to be excluded from the PBR migration to avoid duplicate entries, see Exclude Files and Settings.
- 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. 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>
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.
- Update of the package is handled by a driver and Windows Update
- You 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
- 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
- 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.
- 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.
- 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.
Note
The PPKG will be applied in the following conditions. 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
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.