[Android Q&A, Help & Troubleshooting] blaster44:
I try to fix BT on ICS ROM for my device, HTC magic. ROM was ported from HTC hero, but on hero BT also not working.

I try to changing .so files in system/lib/bluez-plugin from other ROM with working BT.

I also try to add:

chown bluetooth bluetooth /dev/ttyHS0

chmod 0770 /dev/ttyHS0

to init.sapphire.rc in boot.img

But it still not working. Where is other files responsible for BT? What other things I can change for make it working?

Kernel what I'm using have working BT on CM7, so problem probably lies in ROM...

Bluetooth turning on, but very fast(more faster than in ROMs with working BT), icon on notification bar is visible, but phone not see any devices, and vice versa.

Here's the logcat:

D/ToolboxWidget( 777): Bluetooth: toggleState()

D/BluetoothAdapterStateMachine( 704): HotOff process message: 1

D/BluetoothAdapterStateMachine( 704): Bluetooth state 10 -> 11

D/ToolboxWidget( 777): BlueTooth: onReceive()

I/ActivityManager( 704): Start proc com.android.settings for broadcast com.android.settings/.bluetooth.DockEventReceiver: pid=1288 uid=1000 gids={1015, 3002, 3001, 3003, 3007}

E/DropBoxManagerService( 704): Can't init

E/DropBoxManagerService( 704): java.io.IOException: Can't list files: /data/system/dropbox

E/DropBoxManagerService( 704):	at com.android.server.DropBoxManagerService.init(DropBoxManagerService.java:574)

E/DropBoxManagerService( 704):	at com.android.server.DropBoxManagerService.access$200(DropBoxManagerService.java:58)

E/DropBoxManagerService( 704):	at com.android.server.DropBoxManagerService$1$1.run(DropBoxManagerService.java:114)

D/BluetoothEventLoop( 704): Property Changed: Powered : true

D/BluetoothAdapterStateMachine( 704): Switching process message: 54

D/BluetoothEventLoop( 704): Property Changed: Pairable : true

D/BluetoothEventLoop( 704): Property Changed: Class : 5898240

D/BluetoothEventLoop( 704): Property Changed: Pairable : true

D/BluetoothEventLoop( 704): Property Changed: Discoverable : true

D/BluetoothAdapterStateMachine( 704): Switching process message: 53

D/BluetoothAdapterStateMachine( 704): Bluetooth state 11 -> 12

D/ToolboxWidget( 777): BlueTooth: onReceive()

V/AudioHardwareMSM72XX( 656): setParameters() bluetooth_enabled=true

V/AudioHardwareMSM72XX( 656): setParameters() A2dpSuspended=false

I/ActivityManager( 704): Start proc com.android.bluetooth for broadcast com.android.bluetooth/.pbap.BluetoothPbapReceiver: pid=1303 uid=10038 gids={3003, 3002, 3001, 1015}

I/ActivityManager( 704): No longer want com.google.android.onetimeinitializer (pid 1093): hidden #16

I/ActivityThread( 1303): Pub com.android.bluetooth.opp: com.android.bluetooth.opp.BluetoothOppProvider

I/ActivityManager( 704): Start proc com.evervolv.widgets for broadcast com.evervolv.widgets/.BluetoothWidgetProvider: pid=1315 uid=10028 gids={3002, 3001}

I/ActivityManager( 704): No longer want com.noshufou.android.su (pid 1076): hidden #16

D/LocalBluetoothProfileManager( 1288): Adding local A2DP profile

D/LocalBluetoothProfileManager( 1288): Adding local HEADSET profile

D/LocalBluetoothProfileManager( 1288): Adding local OPP profile

D/LocalBluetoothProfileManager( 1288): LocalBluetoothProfileManager construction complete

D/DockEventReceiver( 1288): finishStartingService: stopping service

I/BtOppRfcommListener( 1303): Accept thread started on channel 12

D/ToolboxWidget( 777): Bluetooth: toggleState()

D/BluetoothAdapterStateMachine( 704): BluetoothOn process message: 2

D/SettingsProvider( 704): external modification to /data/data/com.android.providers.settings/databases/settings.db; event=2

D/SettingsProvider( 704): updating our caches for /data/data/com.android.providers.settings/databases/settings.db

D/BluetoothAdapterStateMachine( 704): Bluetooth state 12 -> 13

E/DropBoxManagerService( 704): Can't init

E/DropBoxManagerService( 704): java.io.IOException: Can't list files: /data/system/dropbox

E/DropBoxManagerService( 704):	at com.android.server.DropBoxManagerService.init(DropBoxManagerService.java:574)

E/DropBoxManagerService( 704):	at com.android.server.DropBoxManagerService.access$200(DropBoxManagerService.java:58)

E/DropBoxManagerService( 704):	at com.android.server.DropBoxManagerService$1$1.run(DropBoxManagerService.java:114)

V/AudioHardwareMSM72XX( 656): setParameters() bluetooth_enabled=false

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

V/BluetoothEventManager( 1288): Received android.bluetooth.adapter.action.STATE_CHANGED

I/BtOppRfcommListener( 1303): stopping Accept Thread

E/Bluetooth HS/HF( 818): BluetoothServerSocket could not accept connection

D/SettingsProvider( 704): cache for settings table 'secure' rows=47; fullycached=true

D/ToolboxWidget( 777): BlueTooth: onReceive()

D/BluetoothEventLoop( 704): Property Changed: Discoverable : false

D/BluetoothAdapterStateMachine( 704): Switching process message: 53

D/BluetoothEventLoop( 704): Property Changed: Pairable : false

E/BtOppRfcommListener( 1303): Error accept connection java.io.IOException: Operation Canceled

I/BtOppRfcommListener( 1303): BluetoothSocket listen thread finished

D/BluetoothEventLoop( 704): Property Changed: Powered : false

D/BluetoothAdapterStateMachine( 704): Switching process message: 54

D/BluetoothAdapterStateMachine( 704): Bluetooth state 13 -> 10

D/DockEventReceiver( 1288): finishStartingService: stopping service

V/BluetoothEventManager( 1288): Received android.bluetooth.adapter.action.STATE_CHANGED

D/ToolboxWidget( 777): BlueTooth: onReceive()

D/SettingsProvider( 704): cache for settings table 'system' rows=65; fullycached=true

D/DockEventReceiver( 1288): finishStartingService: stopping service

I/ActivityManager( 704): No longer want com.android.mms (pid 1107): hidden #16

D/CountryDetectorService( 704): No listener is left

W/InputManagerService( 704): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4154b3f0

D/dalvikvm( 777): GC_CONCURRENT freed 461K, 18% free 7969K/9671K, paused 5ms+8ms

D/dalvikvm( 704): GC_CONCURRENT freed 1393K, 13% free 10100K/11591K, paused 11ms+37ms

E/DropBoxManagerService( 704): Can't write: system_app_strictmode

E/DropBoxManagerService( 704): java.io.IOException: Can't list files: /data/system/dropbox

E/DropBoxManagerService( 704):	at com.android.server.DropBoxManagerService.init(DropBoxManagerService.java:574)

E/DropBoxManagerService( 704):	at com.android.server.DropBoxManagerService.add(DropBoxManagerService.java:168)

E/DropBoxManagerService( 704):	at android.os.DropBoxManager.addText(DropBoxManager.java:272)

E/DropBoxManagerService( 704):	at com.android.server.am.ActivityManagerService$10.run(ActivityManagerService.java:7425)