OSDN Git Service

Merge remote-tracking branch 'x86/marshmallow-x86' into nougat-x86
[android-x86/device-generic-common.git] / init.sh
diff --git a/init.sh b/init.sh
index 2c0999f..07c73bc 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -51,6 +51,7 @@ function init_hal_bluetooth()
        case "$PRODUCT" in
                T10*TA|HP*Omni*)
                        BTUART_PORT=/dev/ttyS1
+                       set_property hal.bluetooth.uart.proto bcm
                        ;;
                MacBookPro8*)
                        rmmod b43
@@ -68,18 +69,16 @@ function init_hal_bluetooth()
                        modprobe btusb
                        ;;
                *)
-                       for bt in $(lsusb -v | awk ' /Class:.E0/ { print $9 } '); do
+                       for bt in $(busybox lsusb -v | awk ' /Class:.E0/ { print $9 } '); do
                                chown 1002.1002 $bt && chmod 660 $bt
                        done
-                       modprobe btusb
                        ;;
        esac
 
        if [ -n "$BTUART_PORT" ]; then
                set_property hal.bluetooth.uart $BTUART_PORT
                chown bluetooth.bluetooth $BTUART_PORT
-               start btattach:-B$BTUART_PORT
-               log -t hciconfig -p i "`hciconfig`"
+               start btattach
        fi
 }
 
@@ -405,16 +404,8 @@ function do_bootcomplete()
                        alsa_amixer -c $c set 'Internal Mic Boost' 3
                fi
        done
-}
 
-function do_hci()
-{
-       local hci=`hciconfig | grep ^hci | cut -d: -f1`
-       local btd="`getprop init.svc.bluetoothd`"
-       log -t bluetoothd -p i "$btd ($hci)"
-       if [ -n "`getprop hal.bluetooth.uart`" ]; then
-               [ "`getprop init.svc.bluetoothd`" = "running" ] && hciconfig $hci up
-       fi
+       post_bootcomplete
 }
 
 PATH=/sbin:/system/bin:/system/xbin
@@ -457,9 +448,6 @@ case "$1" in
        bootcomplete)
                do_bootcomplete
                ;;
-       hci)
-               do_hci
-               ;;
        init|"")
                do_init
                ;;