sm8250-common: Set the USB model to something more device specific
* Also allow devices to override ro.product.vendor.model in cases where it's not really suitable for UX facing stuff, e.g. on OnePlus 8T our model is KB2003. This is not a suitable model to show users. Change-Id: Ica487b993c215ad258cfc44062daffe868a65556
This commit is contained in:
committed by
Michael Bestas
parent
b6a6e1ca2e
commit
d9700cfc9b
@@ -142,21 +142,11 @@ esac
|
|||||||
|
|
||||||
# check configfs is mounted or not
|
# check configfs is mounted or not
|
||||||
if [ -d /config/usb_gadget ]; then
|
if [ -d /config/usb_gadget ]; then
|
||||||
# Chip-serial is used for unique MSM identification in Product string
|
usb_product=`getprop vendor.usb.product_string`;
|
||||||
msm_serial=`cat /sys/devices/soc0/serial_number`;
|
vendor_model=`getprop ro.product.vendor.model`;
|
||||||
msm_serial_hex=`printf %08X $msm_serial`
|
if [ "$usb_product" == "" ]; then
|
||||||
machine_type=`cat /sys/devices/soc0/machine`
|
setprop vendor.usb.product_string "$vendor_model"
|
||||||
#ifdef VENDOR_EDIT
|
fi
|
||||||
#Fix product name for Android Auto/Ubuntu
|
|
||||||
product_string=`getprop ro.product.model`
|
|
||||||
if [ "$product_string" == "" ]; then
|
|
||||||
product_string="OnePlus"
|
|
||||||
fi
|
|
||||||
#else
|
|
||||||
#product_string="$machine_type-$soc_hwplatform _SN:$msm_serial_hex"
|
|
||||||
#endif
|
|
||||||
echo "$product_string" > /config/usb_gadget/g1/strings/0x409/product
|
|
||||||
setprop vendor.usb.product_string "$product_string"
|
|
||||||
|
|
||||||
# ADB requires valid iSerialNumber; if ro.serialno is missing, use dummy
|
# ADB requires valid iSerialNumber; if ro.serialno is missing, use dummy
|
||||||
serialnumber=`cat /config/usb_gadget/g1/strings/0x409/serialnumber 2> /dev/null`
|
serialnumber=`cat /config/usb_gadget/g1/strings/0x409/serialnumber 2> /dev/null`
|
||||||
|
|||||||
Reference in New Issue
Block a user