0

I want to route speaker output to dummy device1, and route mic input to a dummy device2 on Android, so that reading from device1 gets the audio stream from all Android apps and phone calls, and writing to device2 generates fake audio input for all Android apps (skype etc). Are these possible?

My phone is Samsung Galaxy Note II, and there is an audio_policy.conf file under /etc. It contains the following codes:

global_configuration {
  attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER
  default_output_device AUDIO_DEVICE_OUT_SPEAKER
  attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC
}

Is this the right location that I replace the built-in audio interface with my dummy file? And how to make Android accept my dummy file?

Thanks!

Daniel
  • 619
  • 5
  • 14
  • There's a lot more to it than just modifying the audio_policy.conf file. To do what you want would require source code changes in several places, and you'd have to be quite familiar with the target platform and it's audio implementation before you attempt this. I'm afraid a description of all the necessary steps would be beyond the scope of a Q&A site like StackOverflow. – Michael Aug 23 '13 at 15:29
  • Thank you Michael! I also notice this, and is reviewing Android source code now. I find the following tool to modify specific functions in Android without compiling the whole system. Still wish to hear better ideas about what I want to do. https://github.com/rovo89/XposedBridge/wiki/Development-tutorial – Daniel Aug 23 '13 at 15:51

0 Answers0