Fix ADB, and a typo in BoardConfig.mk

Added an instruction to copy init.vbox_x86.rc to the output's root.
This is required to properly setup networking and other stuff inside
the emulator.

Change-Id: I84b11b048120a59109aa95d4f18d496a3c874911
diff --git a/target/board/vbox_x86/BoardConfig.mk b/target/board/vbox_x86/BoardConfig.mk
index b6b041a..94df57c 100644
--- a/target/board/vbox_x86/BoardConfig.mk
+++ b/target/board/vbox_x86/BoardConfig.mk
@@ -17,7 +17,7 @@
 
 # For VirtualBox and likely other emulators
 BOARD_INSTALLER_CMDLINE := init=/init console=ttyS0 console=tty0 vga=788 verbose
-BOARD_KERNEL_CMDLINE :=    BOARD_KERNEL_CMDLINE :=    init=/init qemu=1 console=ttyS0 console=tty0 vga=788 verbose androidboot.hardware=vbox_x86 androidboot.console=ttyS0 android.qemud=ttyS1
+BOARD_KERNEL_CMDLINE := init=/init qemu=1 console=ttyS0 console=tty0 vga=788 verbose androidboot.hardware=vbox_x86 androidboot.console=ttyS0 android.qemud=ttyS1
 TARGET_USE_DISKINSTALLER := true
 
 TARGET_DISK_LAYOUT_CONFIG := build/target/board/vbox_x86/disk_layout.conf
diff --git a/target/board/vbox_x86/device.mk b/target/board/vbox_x86/device.mk
index 95f4be3..a028b98 100644
--- a/target/board/vbox_x86/device.mk
+++ b/target/board/vbox_x86/device.mk
@@ -29,4 +29,5 @@
     development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
     development/data/etc/vold.conf:system/etc/vold.conf \
     build/target/board/vbox_x86/init.rc:root/init.rc \
+    build/target/board/vbox_x86/init.vbox_x86.rc:root/init.vbox_x86.rc \
     $(LOCAL_KERNEL):kernel
diff --git a/target/board/vbox_x86/init.vbox_x86.rc b/target/board/vbox_x86/init.vbox_x86.rc
new file mode 100644
index 0000000..4c5d55c
--- /dev/null
+++ b/target/board/vbox_x86/init.vbox_x86.rc
@@ -0,0 +1,52 @@
+on boot
+    setprop ARGH ARGH
+    setprop net.eth0.dns1 10.0.2.3
+    setprop net.gprs.local-ip 10.0.2.15
+    setprop ro.radio.use-ppp no
+    setprop ro.build.product generic
+    setprop ro.product.device generic
+
+# fake some battery state
+    setprop status.battery.state Slow
+    setprop status.battery.level 5
+    setprop status.battery.level_raw  50
+    setprop status.battery.level_scale 9
+
+# disable some daemons the emulator doesn't want
+    stop dund
+    stop akmd
+
+    setprop ro.setupwizard.mode EMULATOR
+
+# enable Google-specific location features,
+# like NetworkLocationProvider and LocationCollector
+    setprop ro.com.google.locationfeatures 1
+
+# For the emulator, which bypasses Setup Wizard, you can specify
+# account info for the device via these two properties.  Google
+# Login Service will insert these accounts into the database when
+# it is created (ie, after a data wipe).
+#
+#   setprop ro.config.hosted_account username@hosteddomain.org:password
+#   setprop ro.config.google_account username@gmail.com:password
+#
+# You MUST have a Google account on the device, and you MAY
+# additionally have a hosted account.  No other configuration is
+# supported, and arbitrary breakage may result if you specify
+# something else.
+
+service goldfish-setup /system/etc/init.goldfish.sh
+   oneshot
+
+service qemud /system/bin/qemud
+    socket qemud    stream 666
+    oneshot
+
+# -Q is a special logcat option that forces the
+# program to check wether it runs on the emulator
+# if it does, it redirects its output to the device
+# named by the androidboot.console kernel option
+# if not, is simply exit immediately
+
+service goldfish-logcat /system/bin/logcat -Q
+    oneshot