Merge "init.qcom.usb.rc: Set serial string on init"

This commit is contained in:
Linux Build Service Account 2014-08-11 14:53:58 -07:00 committed by Gerrit - the friendly Code Review server
commit 60eaa33d34
2 changed files with 1 additions and 20 deletions

View File

@ -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

View File

@ -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