Merge "init.qcom.usb.rc: Set serial string on init"
This commit is contained in:
commit
60eaa33d34
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
on init
|
on init
|
||||||
write /sys/class/android_usb/android0/f_rndis/wceis 1
|
write /sys/class/android_usb/android0/f_rndis/wceis 1
|
||||||
|
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||||
|
|
||||||
on charger
|
on charger
|
||||||
setprop sys.usb.config mass_storage
|
setprop sys.usb.config mass_storage
|
||||||
|
|
|
@ -27,26 +27,6 @@
|
||||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Update USB serial number from persist storage if present, if not update
|
|
||||||
# with value passed from kernel command line, if none of these values are
|
|
||||||
# set then use the default value. This order is needed as for devices which
|
|
||||||
# do not have unique serial number.
|
|
||||||
# User needs to set unique usb serial number to persist.usb.serialno
|
|
||||||
#
|
|
||||||
serialno=`getprop persist.usb.serialno`
|
|
||||||
case "$serialno" in
|
|
||||||
"")
|
|
||||||
serialnum=`getprop ro.serialno`
|
|
||||||
case "$serialnum" in
|
|
||||||
"");; #Do nothing, use default serial number
|
|
||||||
*)
|
|
||||||
echo "$serialnum" > /sys/class/android_usb/android0/iSerial
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "$serialno" > /sys/class/android_usb/android0/iSerial
|
|
||||||
esac
|
|
||||||
|
|
||||||
chown -h root.system /sys/devices/platform/msm_hsusb/gadget/wakeup
|
chown -h root.system /sys/devices/platform/msm_hsusb/gadget/wakeup
|
||||||
chmod -h 220 /sys/devices/platform/msm_hsusb/gadget/wakeup
|
chmod -h 220 /sys/devices/platform/msm_hsusb/gadget/wakeup
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue