Merge "Use dhcp netmask value rather than its pointer (patch from Marvell)"
diff --git a/adb/usb_vendors.c b/adb/usb_vendors.c
index 2effb12..141b32a 100644
--- a/adb/usb_vendors.c
+++ b/adb/usb_vendors.c
@@ -99,6 +99,8 @@
#define VENDOR_ID_T_AND_A 0x1BBB
// Lenovo's USB Vendor ID
#define VENDOR_ID_LENOVO 0x2006
+// Vizio's USB Vendor ID
+#define VENDOR_ID_VIZIO 0xE040
/** built-in vendor list */
@@ -135,6 +137,7 @@
VENDOR_ID_COMPAL,
VENDOR_ID_T_AND_A,
VENDOR_ID_LENOVO,
+ VENDOR_ID_VIZIO,
};
#define BUILT_IN_VENDOR_COUNT (sizeof(builtInVendorIds)/sizeof(builtInVendorIds[0]))
diff --git a/debuggerd/debuggerd.c b/debuggerd/debuggerd.c
index 685f147..892bc99 100644
--- a/debuggerd/debuggerd.c
+++ b/debuggerd/debuggerd.c
@@ -695,6 +695,18 @@
struct sigaction act;
int logsocket = -1;
+ /*
+ * debuggerd crashes can't be reported to debuggerd. Reset all of the
+ * crash handlers.
+ */
+ signal(SIGILL, SIG_DFL);
+ signal(SIGABRT, SIG_DFL);
+ signal(SIGBUS, SIG_DFL);
+ signal(SIGFPE, SIG_DFL);
+ signal(SIGSEGV, SIG_DFL);
+ signal(SIGSTKFLT, SIG_DFL);
+ signal(SIGPIPE, SIG_DFL);
+
logsocket = socket_local_client("logd",
ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_DGRAM);
if(logsocket < 0) {
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 9556885..f843824 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -320,6 +320,25 @@
class_reset late_start
class_reset main
+# Used to disable USB when switching states
+on property:sys.usb.config=none
+ stop adbd
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/bDeviceClass 0
+ setprop sys.usb.state $sys.usb.config
+
+# adb only USB configuration
+# This should only be used during device bringup
+# and as a fallback if the USB manager fails to set a standard configuration
+on property:sys.usb.config=adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 18d1
+ write /sys/class/android_usb/android0/idProduct D002
+ write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state $sys.usb.config
+
# USB accessory configuration
on property:sys.usb.config=accessory
write /sys/class/android_usb/android0/enable 0
@@ -339,6 +358,8 @@
start adbd
setprop sys.usb.state $sys.usb.config
+# Used to set USB configuration at boot and to switch the configuration
+# when changing the default configuration
on property:persist.sys.usb.config=*
setprop sys.usb.config $persist.sys.usb.config