crash_reporter: Add model_manifest_id field to report

Add the model_manifest_id from weave's configuration to the
crash report.

Bug: 22874192
Change-Id: I26d5334a6eb3b82fd07338e98ce0f3efbb2ff16d
diff --git a/crash_sender b/crash_sender
index 7f9062a..6907d14 100755
--- a/crash_sender
+++ b/crash_sender
@@ -79,6 +79,9 @@
 # Set this to 1 to allow uploading of device coredumps.
 DEVCOREDUMP_UPLOAD_FLAG_FILE="${CRASH_STATE_DIR}/device_coredump_upload_allowed"
 
+# The weave configuration file.
+WEAVE_CONF_FILE="/etc/weaved/weaved.conf"
+
 # The syslog tag for all logging we emit.
 TAG="$(basename $0)[$$]"
 
@@ -288,6 +291,7 @@
   local version="$(get_key_value "${meta_path}" "upload_var_ver")"
   local upload_prefix="$(get_key_value "${meta_path}" "upload_prefix")"
   local guid
+  local model_manifest_id="$(get_key_value "${WEAVE_CONF_FILE}" "model_id")"
 
   set -- \
     -F "write_payload_size=${write_payload_size}" \
@@ -441,6 +445,7 @@
     -F "ver=${version}" \
     -F "hwclass=${hwclass}" \
     -F "exec_name=${exec_name}" \
+    -F "model_manifest_id=${model_manifest_id}" \
     ${image_type:+-F "image_type=${image_type}"} \
     ${boot_mode:+-F "boot_mode=${boot_mode}"} \
     ${error_type:+-F "error_type=${error_type}"} \