0

I want to make an answering app for my personal use in android. Is there a convenient way using software tools (not Bluetooth or aux cables) in order to write custom audio stream in the mic stream during phone calls ?

PS: I have root privileges

Markus Kauppinen
  • 3,025
  • 4
  • 20
  • 30
Lilo
  • 640
  • 1
  • 9
  • 22
  • See https://stackoverflow.com/questions/21024851/redirecting-audio-creating-alternate-sound-paths-in-android/ In short: yes, it might be possible, but it might require you to create your own custom Android ROM. – Michael Oct 10 '18 at 11:29

1 Answers1

1

Unfortunately it's not possibile to send data/streams to the MIC expecially during the phone call. When a voicecall is active the MIC is exclusively managed by a DIFFERENT chipset and it is disconnected from the internal Android mixer system. This behaviour makes the MIC temporarily unavailable for the whole System while in a voicecall.

emandt
  • 2,547
  • 2
  • 16
  • 20
  • are there any kernel modules to add in order to have have such feature ? I am using a custom ROM, so I guess I can recompile its kernel. – Lilo Oct 10 '18 at 10:55
  • I don't think it could be "fixed" using a software. During the voicecall there is an "electrical switch" that redirects the MIC to the modem/GSM chip. This "switch_to" command (I think) it's sent by the GSM chips itself to take the ownership of the MIC while the voicecall is active. Even if it could be possibile to intercept/stop that "switch_to" command the result will be that the System mantains the ownership of the MIC but the GSM/modem chip cannot send your voice to the caller......so...... – emandt Oct 10 '18 at 11:01
  • I rally believe that there is a way because I saw that some of the 3G USB dongles (which usually have similar modem chips as android devices) have the ability to communicate voice using a custom software on windows. I think the trick is in a modified kernel that will give the ability to write raw bytes (data) in the device file of the mic. – Lilo Oct 10 '18 at 11:59
  • I'm not sure USB 3G dongles makes REAL voicecall. Maybe a VOIp call. But event if these dongles makes voicecall, the mic+speakers are connected to a computer and there isn't any limit there where the mic should pass inside the INTERNAL Audio Card and THEN flows through the USB dongle. – emandt Oct 10 '18 at 12:10
  • @emandt Can you please provide a link with details about MIC, including the fact that during a voice call MIC is managed by a different chipset ? And has this been changed since your answer. – zCode93 Oct 03 '22 at 07:40