How do we disable the (virtual) microphone when launching the emulator?
Situation
When launching an Android Studio stock emulator device, the microphone is always enabled and listening.
Why would we want this fix
- Convenience, Many users have a microphone headset and when the microphone is enabled, they lose noise canceling and/or stereo. It can be extremely annoying, forcing the user to disconnect the device which swaps the emulator audio + sounds to another microphone/speaker input/output.
- Security risk, the microphone is actively listening. Is the data going anywhere? Who knows...this is an unnecessary security risk for any organization, IE a dev is on a (zoom, teams, meetings) call with an open emulator that is using the microphone and listening).
Possible Solutions (based on practicality)
- flag to disable virtual audio devices (IE the mac's speaker or attached headphones w/ a microphone). I've seen 0 documentation regarding a flag like this.
- flag to provide to the emulator to disable all audio input (see answer 1). TLDR add the flag
-no-audio
- route the android studio emulator (or the mac's microphone audio input) to a virtual device that is not listening. Or have the default OS microphone input set to 0 volume. This can be done via macOSX Automator
- route the adb emulator to the mac's internal microphone instead of the current microphone to avoid it triggering the headsets microphone settings.
The preferred solution
- Microphone audio-in is disabled when booting the emulator
- Android device audio-out remains and uses the computer's default speakers
- The computer's default microphone is not triggered (at all) to avoid causing a stereo -> mono swap or noise cancellation breakage.
System Information:
- android emulator: 31.2.10.0
- MacOS 12.3.1
- Headsets tested with these issues:
- Bose NC 700
- Bose QC series
- Sony WF-1000XM4
- Sony WH-1000XM3
- any headset with a microphone connection macro that does something with the speaker (like talk through) or with the input audio like stereo -> mono.