Loading crash_reporter/crash_sender +4 −3 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ send_crash() { local kind="$(get_kind "${meta_path}")" local exec_name="$(get_key_value "${meta_path}" "exec_name")" local url="$(getprop crash_reporter.server)" local brillo_version="$(get_key_value "${meta_path}" "ver")" local bdk_version="$(get_key_value "${meta_path}" "bdk_version")" local hwclass="$(get_hardware_class)" local write_payload_size="$(get_key_value "${meta_path}" "payload_size")" local log="$(get_key_value "${meta_path}" "log")" Loading Loading @@ -370,12 +370,12 @@ send_crash() { fi # If ID or VERSION_ID is undefined, we use the default product name # and CHROMEOS_RELEASE_VERSION from /etc/lsb-release. # and bdk_version from /etc/os-release.d. if [ "${product}" = "undefined" ]; then product="${BRILLO_PRODUCT}" fi if [ "${version}" = "undefined" ]; then version="${brillo_version}" version="${bdk_version}" fi local image_type Loading Loading @@ -460,6 +460,7 @@ send_crash() { --capath "${RESTRICTED_CERTIFICATES_PATH}" --ciphers HIGH \ -F "prod=${product}" \ -F "ver=${version}" \ -F "bdk_version=${bdk_version}" \ -F "hwclass=${hwclass}" \ -F "exec_name=${exec_name}" \ -F "model_manifest_id=${model_manifest_id}" \ Loading crash_reporter/user_collector.cc +12 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include <base/strings/string_split.h> #include <base/strings/string_util.h> #include <base/strings/stringprintf.h> #include "chromeos/osrelease_reader.h" #include <chromeos/process.h> #include <chromeos/syslog_logging.h> #include <cutils/properties.h> Loading Loading @@ -64,6 +65,8 @@ const char kVersionProperty[] = "ro.build.id"; // The property containing the product id. const char kProductIDProperty[] = "ro.product.product_id"; static const char kBdkVersionKey[] = "bdk_version"; using base::FilePath; using base::StringPrintf; Loading Loading @@ -511,6 +514,15 @@ UserCollector::ErrorType UserCollector::ConvertAndEnqueueCrash( property_get(kProductIDProperty, value, "undefined"); AddCrashMetaUploadData("prod", value); chromeos::OsReleaseReader reader; reader.Load(); std::string bdk_version = "undefined"; if (!reader.GetString(kBdkVersionKey, &bdk_version)) { LOG(ERROR) << "Could not read " << kBdkVersionKey << " from /etc/os-release.d/"; } AddCrashMetaData(kBdkVersionKey, bdk_version); ErrorType error_type = ConvertCoreToMinidump(pid, container_dir, core_path, minidump_path); if (error_type != kErrorNone) { Loading Loading
crash_reporter/crash_sender +4 −3 Original line number Diff line number Diff line Loading @@ -292,7 +292,7 @@ send_crash() { local kind="$(get_kind "${meta_path}")" local exec_name="$(get_key_value "${meta_path}" "exec_name")" local url="$(getprop crash_reporter.server)" local brillo_version="$(get_key_value "${meta_path}" "ver")" local bdk_version="$(get_key_value "${meta_path}" "bdk_version")" local hwclass="$(get_hardware_class)" local write_payload_size="$(get_key_value "${meta_path}" "payload_size")" local log="$(get_key_value "${meta_path}" "log")" Loading Loading @@ -370,12 +370,12 @@ send_crash() { fi # If ID or VERSION_ID is undefined, we use the default product name # and CHROMEOS_RELEASE_VERSION from /etc/lsb-release. # and bdk_version from /etc/os-release.d. if [ "${product}" = "undefined" ]; then product="${BRILLO_PRODUCT}" fi if [ "${version}" = "undefined" ]; then version="${brillo_version}" version="${bdk_version}" fi local image_type Loading Loading @@ -460,6 +460,7 @@ send_crash() { --capath "${RESTRICTED_CERTIFICATES_PATH}" --ciphers HIGH \ -F "prod=${product}" \ -F "ver=${version}" \ -F "bdk_version=${bdk_version}" \ -F "hwclass=${hwclass}" \ -F "exec_name=${exec_name}" \ -F "model_manifest_id=${model_manifest_id}" \ Loading
crash_reporter/user_collector.cc +12 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include <base/strings/string_split.h> #include <base/strings/string_util.h> #include <base/strings/stringprintf.h> #include "chromeos/osrelease_reader.h" #include <chromeos/process.h> #include <chromeos/syslog_logging.h> #include <cutils/properties.h> Loading Loading @@ -64,6 +65,8 @@ const char kVersionProperty[] = "ro.build.id"; // The property containing the product id. const char kProductIDProperty[] = "ro.product.product_id"; static const char kBdkVersionKey[] = "bdk_version"; using base::FilePath; using base::StringPrintf; Loading Loading @@ -511,6 +514,15 @@ UserCollector::ErrorType UserCollector::ConvertAndEnqueueCrash( property_get(kProductIDProperty, value, "undefined"); AddCrashMetaUploadData("prod", value); chromeos::OsReleaseReader reader; reader.Load(); std::string bdk_version = "undefined"; if (!reader.GetString(kBdkVersionKey, &bdk_version)) { LOG(ERROR) << "Could not read " << kBdkVersionKey << " from /etc/os-release.d/"; } AddCrashMetaData(kBdkVersionKey, bdk_version); ErrorType error_type = ConvertCoreToMinidump(pid, container_dir, core_path, minidump_path); if (error_type != kErrorNone) { Loading