Skip to content

Commit

Permalink
usb: Disable USB debugging by default on user builds
Browse files Browse the repository at this point in the history
USB debugging shouldn't be enabled by default on user builds.
USB debugging is still enabled by default on userdebug builds.

Bug: 29154113
Change-Id: I78baae2761abb0828b73eb313f003d624f5bdd03
  • Loading branch information
Siqi Lin committed Jun 23, 2016
1 parent 4950127 commit 091397d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions init.common.diag.rc.user
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

on property:ro.boot.mode=normal
rm /dev/diag

on boot
setprop persist.sys.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage
1 change: 1 addition & 0 deletions init.common.diag.rc.userdebug
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ on post-fs-data

on boot
chmod 666 /dev/diag
setprop persist.sys.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb
1 change: 0 additions & 1 deletion init.common.usb.rc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on boot
write /sys/class/android_usb/android0/iProduct ${ro.product.model}

write /sys/class/android_usb/f_mass_storage/lun/nofua 1
setprop persist.sys.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb

write /sys/class/android_usb/android0/f_rndis_qc/rndis_transports BAM2BAM_IPA
write /sys/module/g_android/parameters/mtp_tx_req_len 131072
Expand Down

0 comments on commit 091397d

Please sign in to comment.