title: How To Modify Android's Bluetooth Stack to Enable A2dp Sink
body: <p>I'm working on an audio recorder app that uses a bluetooth mic to record audio on to an Android device (Nexus 7 - rooted Android 4.4.2). It's currently implemented on HFP and everything is working fine. The bluetooth mic is implemented with Bluegiga's WT32 bluetooth module + a mic input, audio quality via HFP isn't great but it's sufficient for now. </p>
  
  <p>However, I'm now trying to change the bluetooth profile to A2dp, since there are two mic inputs (L/R) and WT32 supports A2dp (source). After much research I found that stock Android doesn't support A2dp (sink), and it's possible to modify Android's bluetooth stack to enable A2dp (sink). </p>
  
  <p><strong>What I don't understand is how does one access and modify the bluetooth stack.</strong> It would be nice if someone with an answer is able to break-down the steps to achieve this.</p>
  
  <p>I've tried following the answer to this question:
  <a href="https://stackoverflow.com/questions/15557933/receive-audio-via-bluetooth-in-android">Receive audio via Bluetooth in Android</a>, yet I can't seem to find the appropriate file to modify. Actually, I don't even know if I'm looking into the right folder. I've looked through the devices file via Android-studio's DDMS-File Explorer.</p>
  
  <p>ps, I'm still fairly new with Android app development, so I may have misused some of the terminologies and I apologies in-advance for that.</p>