Merge change 26093 into eclair

* changes:
  Add NOTICE file and license tag for adb
diff --git a/adb/usb_vendors.c b/adb/usb_vendors.c
index f8c54d7..5534fd9 100644
--- a/adb/usb_vendors.c
+++ b/adb/usb_vendors.c
@@ -43,6 +43,12 @@
 #define VENDOR_ID_SAMSUNG       0x04e8
 // Motorola's USB Vendor ID
 #define VENDOR_ID_MOTOROLA      0x22b8
+// LG's USB Vendor ID
+#define VENDOR_ID_LGE           0x1004
+// Huawei's USB Vendor ID
+#define VENDOR_ID_HUAWEI        0x12D1
+// Acer's USB Vendor ID
+#define VENDOR_ID_ACER          0x0502
 
 /** built-in vendor list */
 int builtInVendorIds[] = {
@@ -50,6 +56,9 @@
     VENDOR_ID_HTC,
     VENDOR_ID_SAMSUNG,
     VENDOR_ID_MOTOROLA,
+    VENDOR_ID_LGE,
+    VENDOR_ID_HUAWEI,
+    VENDOR_ID_ACER,
 };
 
 #define BUILT_IN_VENDOR_COUNT    (sizeof(builtInVendorIds)/sizeof(builtInVendorIds[0]))
diff --git a/logcat/event-log-tags b/logcat/event-log-tags
index 4db86cb..fcb2708 100644
--- a/logcat/event-log-tags
+++ b/logcat/event-log-tags
@@ -40,7 +40,8 @@
 2718  e
 
 2719 configuration_changed (config mask|1|5)
-2720 sync (id|3),(event|1|5),(source|1|5)
+# "account" is the java hash of the account name
+2720 sync (id|3),(event|1|5),(source|1|5),(account|1|5)
 2721 cpu (total|1|6),(user|1|6),(system|1|6),(iowait|1|6),(irq|1|6),(softirq|1|6)
 2722 battery_level (level|1|6),(voltage|1|1),(temperature|1|1)
 2723 battery_status (status|1|5),(health|1|5),(present|1|5),(plugged|1|5),(technology|3)
@@ -118,8 +119,9 @@
 2823 backup_agent_failure (Package|3),(Message|3)
 2824 backup_package (Package|3),(Size|1|2)
 2825 backup_success (Packages|1|1),(Time|1|3)
+2826 backup_reset (Transport|3)
 
-2830 restore_start (Transport|3)
+2830 restore_start (Transport|3),(Source|2|5)
 2831 restore_transport_failure
 2832 restore_agent_failure (Package|3),(Message|3)
 2833 restore_package (Package|3),(Size|1|2)
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index e28dd30..3bb2262 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -11,10 +11,13 @@
 copy_from += etc/vold.conf
 endif
 
-# for non -user build, also copy emulator-support script into /system/etc
-ifneq ($(TARGET_BUILD_VARIANT),user)
+# the /system/etc/init.goldfish.sh is needed to enable emulator support
+# in the system image. In theory, we don't need these for -user builds
+# which are device-specific. However, these builds require at the moment
+# to run the dex pre-optimization *in* the emulator. So keep the file until
+# we are capable of running dex preopt on the host.
+#
 copy_from += etc/init.goldfish.sh
-endif
 
 copy_to := $(addprefix $(TARGET_OUT)/,$(copy_from))
 copy_from := $(addprefix $(LOCAL_PATH)/,$(copy_from))
@@ -36,13 +39,13 @@
 ALL_PREBUILT += $(file)
 endif
 
-# for non -user build, also copy emulator-specific init script into /
-ifneq ($(TARGET_BUILD_VARIANT),user)
+# Just like /system/etc/init.goldfish.sh, the /init.godlfish.rc is here
+# to allow -user builds to properly run the dex pre-optimization pass in
+# the emulator.
 file := $(TARGET_ROOT_OUT)/init.goldfish.rc
 $(file) : $(LOCAL_PATH)/etc/init.goldfish.rc | $(ACP)
 	$(transform-prebuilt-to-target)
 ALL_PREBUILT += $(file)
-endif
 
 # create some directories (some are mount points)
 DIRS := $(addprefix $(TARGET_ROOT_OUT)/, \
diff --git a/rootdir/init.rc b/rootdir/init.rc
index f9728ee..034e378 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -103,7 +103,7 @@
 # create basic filesystem structure
     mkdir /data/misc 01771 system misc
     mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
-    mkdir /data/misc/keystore 0770 keystore keystore
+    mkdir /data/misc/keystore 0700 keystore keystore
     mkdir /data/misc/vpn 0770 system system
     mkdir /data/misc/vpn/profiles 0770 system system
     # give system access to wpa_supplicant.conf for backup and restore
@@ -336,7 +336,7 @@
 service racoon /system/bin/racoon
     socket racoon stream 600 system system
     # racoon will setuid to vpn after getting necessary resources.
-    group net_admin keystore
+    group net_admin
     disabled
     oneshot
 
@@ -347,7 +347,7 @@
     disabled
     oneshot
 
-service keystore /system/bin/keystore
+service keystore /system/bin/keystore /data/misc/keystore
     user keystore
     group keystore
     socket keystore stream 666