Originariamente inviato da
ChristianTroy
ok, ho risolto anche la storia dei permessi e del cambio di rfkill (son riuscito a trovare una rom compilata armv7 con quell'hack per il bluetooth!)
Qui trovate tutto il necessario, e ricapitoliamo il tutto:
- scomprimere boot.img ed inserire tutti i file .ko nella root
- modificare init.rc e caricare i moduli nella sezione "on fs"
codice:
on fs
insmod /rk29xxnand_ko.ko
insmod /bluetooth.ko
insmod /btusb.ko
insmod /l2cap.ko
insmod /rfcomm.ko
insmod /bnep.ko
insmod /sco.ko
insmod /hidp.ko
- modificare init.rk29board.rc commentando questa parte
codice:
#service hciattach /system/bin/hciattach -n -s 1500000 /dev/ttyS0 bcm4329 1500000 flow
# console
# user bluetooth
# group bluetooth net_bt_admin
# disabled
# oneshot
#service patch_plus /system/bin/brcm_patchram_plus --patchram /etc/bluez/bcm432x/BCM4329B1_TestOnly_0237_26MHz_SEMCO_B23.hcd --baudrate 1500000 --enable_hci /dev/ttyS0
# console
# user bluetooth
# group bluetooth net_bt_admin
# disabled
# oneshot
- modificare ueventd.rk29board.rc così:
codice:
/dev/galcore 0666 system graphics
/dev/video0 0660 system camera
/dev/video1 0660 system camera
/dev/video2 0660 system camera
/dev/pmem_cam 0660 system camera
/dev/vpu 0660 system system
/dev/vpu_mem 0666 system system
# for Sensor HAL
/dev/akm8973 0660 system system
/dev/accelerometer 0660 system system
# for GPS
#/dev/ttyS3 0600 gps gps
# for BT
/dev/vflash 0660 bluetooth bluetooth
/dev/ttyS0 0660 bluetooth bluetooth
/dev/ttyS2 0660 bluetooth bluetooth
# for radio
/dev/ttyUSB0 0660 radio radio
/dev/ttyUSB1 0660 radio radio
/dev/ttyUSB2 0660 radio radio
/dev/ttyUSB3 0660 radio radio
/dev/ttyUSB4 0660 radio radio
/dev/ttyUSB5 0660 radio radio
/sys/devices/platform/usb20_host/usb2/2-1/2-1:1.0/bluetooth/hci0/rfkill* state 0660 bluetooth bluetooth
- ricostruire il boot.img
- modificare system.img inserendo:
il file "bluetoothd" dentro "/system/bin"
le due librerie "libbluedroid.so" e "libbluetoothd.so" in "/system/lib"
Flashare, inserire la chiavetta usb, aspettare un paio di secondi poi attivare il bluetooth (ricordo che non tutte funzionano, se la vostra chiavetta ha uno stack cambridge silicon radio ci son buone possibilità che funzioni).
In questo modo si può staccare ed attaccare la chiavetta senza bisogno di riavviare, perchè librerie e bluetoothd sono stati patchati per risolvere il problema dell'incremento di rfkill.
Adesso è veramente completo.
Gli auricolari bluetooth non funzionano, in logcat all'avvio del bluetooth si vede "Unable to start service Intent { act=android.bluetooth.IBluetoothHeadset }: not found" ma non ho idea di cosa sia.