0

I am trying to enable A2dp sink profile for Android phone and stream audio from another device. I know the process of how to do the same for bluedroid stack of Android . But I want to use Bluez stack .I got a link explaining to do it for Android 4.1 as from Android 4.2 bluez was replaced by bluedroid.Here

But I wanted to know how to port bluez to Android versions > 4.1 without having to build the whole AOSP tree by replacing bluedroid ? As from Bluez 5.21 there is support for Android 4.4 and 5.0,5.1 but for it we have to build the Android source code again due to various dependencies.

Is there anyway without replacing bluedroid and building whole thing ,we can disable bluedroid and place a bluez executable compatible with Android and use it ? Here is the link for porting bluez to Android by building whole thing

  • BlueZ doesn't implement A2DP profile in favor of Audio application developers. This means, you need to implement your own A2DP profile (sink/source) when using BlueZ. One reference implmentation is https://github.com/Arkq/bluez-alsa. In short, this repo implements A2DP sink and source, but provides startup switch to control the operation mode. So if you need to use BlueZ, you should consider implementing it. Both bluedroid and bluez shares the common code i.e lile management interface. You can also use pulseaudio + BlueZ to get A2DP. – Parthiban Sep 19 '18 at 11:20
  • Thanks @Parthiban . I am using Android phone which has bluedroid as the bluetooth stack and I want to use bluez instead of it ,so do I need to build the android source code (replacing bluedroid with bluez) and flash it or is there any other way to do it ? – oindrila93 Sep 19 '18 at 11:50
  • If you have access to bash/shell for your phone, then you should be able to run the manually cross compiled bluez. But I am not sure about complete procedure of flashing android. – Parthiban Sep 19 '18 at 11:58
  • @Parthiban Can you share how to cross-compile it ? – oindrila93 Sep 20 '18 at 05:59
  • If I cross-compile and push it on Android Phone , will the phone use bluez stack as its default bluetooth stack as bluedroid is already there? – oindrila93 Sep 20 '18 at 06:22
  • Sorry, am not much sure about Android OS. – Parthiban Sep 20 '18 at 08:09

0 Answers0