Send both system id and product id to Omaha.
The request will have two <app> with different app_id and version.
Test: observe request in the log
Change-Id: I51b0dcf3c0affc81fe152ff24ce0ccc9a36e6385
(cherry picked from commit 573919d54a8421f1b2147d801ae4104adebf5cd7)
diff --git a/image_properties_android.cc b/image_properties_android.cc
index e3b7616..0e6385d 100644
--- a/image_properties_android.cc
+++ b/image_properties_android.cc
@@ -32,9 +32,10 @@
namespace {
-// Build time properties name used in Brillo.
+// Build time properties name used in Android Things.
const char kProductId[] = "product_id";
const char kProductVersion[] = "product_version";
+const char kSystemId[] = "system_id";
const char kSystemVersion[] = "system_version";
// Prefs used to store the target channel and powerwash settings.
@@ -67,14 +68,17 @@
brillo::OsReleaseReader osrelease;
osrelease.Load();
- result.product_id = GetStringWithDefault(
- osrelease, kProductId, "developer-boards:brillo-starter-board");
+ result.product_id =
+ GetStringWithDefault(osrelease, kProductId, "invalid-product");
+ result.system_id = GetStringWithDefault(
+ osrelease, kSystemId, "developer-boards:brillo-starter-board");
result.canary_product_id = result.product_id;
std::string system_version =
- GetStringWithDefault(osrelease, kSystemVersion, "0.0.0");
+ GetStringWithDefault(osrelease, kSystemVersion, "0.0.0.0");
std::string product_version =
- GetStringWithDefault(osrelease, kProductVersion, "0");
- result.version = system_version + "." + product_version;
+ GetStringWithDefault(osrelease, kProductVersion, "0.0.0.0");
+ result.version = product_version;
+ result.system_version = system_version;
char prop[PROPERTY_VALUE_MAX];
property_get(kPropProductName, prop, "brillo");