init.qcom.usb.sh: Pass blank MSM serial number for virtual Android

In Android GVM env, the path '/sys/devices/soc0/serial_number'
does not exist because SMEM is not virtualized. So the
msm_serial_hex gets updated to 0x00000000. This differs from MSM
serial number in EDL mode (it has access to SMEM). This leads to
external automation tools treating the same target as two
different devices in EDL and Android HLOS modes respectively.
Such confusion does not exist if the MSM serial number is blank.

Keep msm_serial_hex blank for Android GVM case.

Change-Id: I8e60909927234753b15d5287e12df2be75b0fe5d
diff --git a/etc/init.qcom.usb.sh b/etc/init.qcom.usb.sh
index 5ce2b6f..12a7dae 100644
--- a/etc/init.qcom.usb.sh
+++ b/etc/init.qcom.usb.sh
@@ -140,7 +140,11 @@
 if [ -d /config/usb_gadget ]; then
 	# Chip-serial is used for unique MSM identification in Product string
 	msm_serial=`cat /sys/devices/soc0/serial_number`;
-	msm_serial_hex=`printf %08X $msm_serial`
+	# If MSM serial number is not available, then keep it blank instead of 0x00000000
+	if [ "$msm_serial" != "" ]; then
+		msm_serial_hex=`printf %08X $msm_serial`
+	fi
+
 	machine_type=`cat /sys/devices/soc0/machine`
 	setprop vendor.usb.product_string "$machine_type-$soc_hwplatform _SN:$msm_serial_hex"