Associate a Package with a Config
Stay organized with collections
Save and categorize content based on your preferences.
Associating one or more packages with a configuration allows those OTAs to be delivered to the
devices associated with that config. Note that the packages must all use the same target
build fingerprint.
The simplest way to associate packages with a config is to issue the following API requests.
- Get a
list of all packages in the deployment.
GET /v1/deployments/$deploymentName/packages HTTP/1.1
Host: androidovertheair.googleapis.com
...
{
"packages": [
{
"name": "bb3f51c1271.zip",
"title": "test zip"
},
{
"name": "6152c380bd6.zip",
"title": "package_2.zip"
}
]
}
- Get a
package list for the config you want to update. This list contains the
all the packages currently associated with the configuration. Note that you must know the config
key in order to make this call. If you don't know the config key, you must first
list the configs
to get it.
GET /v1/deployments/$deploymentName/configs/$configName/packages HTTP/1.1
Host: androidovertheair.googleapis.com
...
{
"configs": [
{
"packageName": "0908bf7b1b70b3245bb3f51c1271.zip",
"downloadOptions": {
"downloadType": "NORMAL"
}
}
]
}
- Create a
PackageConfig
and add it to the list you obtained in step 2 and call
updatePackages
with that new list.
PUT /v1/deployments/$deploymentName/configs/$configName/packages HTTP/1.1
Host: androidovertheair.googleapis.com
...
{
"configs": [
{
"packageName": "0908bf7b1b70b3245bb3f51c1271.zip",
"downloadOptions": {
"downloadType": "NORMAL"
}
},
{
"packageName": "bb3f51c1271.zip",
"downloadOptions": {
"downloadType": "NORMAL"
}
}
]
}
To remove a package from a config, you can follow the above steps but you remove the package
from the updatePackages
call rather than adding one.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-07 UTC."],[[["Associating packages with a configuration enables OTA delivery to devices under that configuration, requiring all packages to share the same target build fingerprint."],["Packages are associated with a configuration using three API requests: listing all deployment packages, getting the current package list for the config, and updating the config's package list with desired additions or removals."],["To add a package, retrieve the config's current package list, append the new package information, and update the config with the modified list using the `updatePackages` API call."],["Removing a package follows a similar process, but instead of adding, the target package is removed from the config's package list before the `updatePackages` call."]]],["Associating packages with a configuration enables OTA delivery to associated devices, ensuring all packages share the same target build fingerprint. This involves three API requests: listing all deployment packages via `GET /v1/deployments/$deploymentName/packages`, retrieving the existing package list for a specific config via `GET /v1/deployments/$deploymentName/configs/$configName/packages`, and finally, updating the configuration's package list by adding or removing a PackageConfig through `PUT /v1/deployments/$deploymentName/configs/$configName/packages`. Removing a package follows the same steps, omitting the package from the update call.\n"]]