
Why is Android Studio's Emulator always listening to my microphone? - Zenbit_UX
https://stackoverflow.com/questions/52945864/android-studio-wants-access-to-microphone
======
biktor_gj
Doesn't the Android emulator run in QEMU? And doesn't qemu actually emulate a
Soundcard? So it makes sense that when the emulator starts and boots the
kernel in the VM it will probe the devices and act as an audio in&out pass
thru, like the virtual SD card, or like the network connection or everything
else really...

Coding a special SDK image to adapt to the host system permissions doesnt make
any sense. Android will always have access to hardware, and you're testing
that it will work on Android, not on an emulator...

------
reificator
It wouldn't be an accurate Android emulator without that feature.

~~~
tus88
I wonder if AI would detect this as sarcasm or not.

~~~
kylek
I wonder if this is how an AI would respond when it meets an exception

 _glares_

------
monocasa
It just enables the microphone at emulated device instantiation time. Easier
than enabling/and disabling it at runtime.

[https://android.googlesource.com/platform/external/qemu/+/a7...](https://android.googlesource.com/platform/external/qemu/+/a7c579bdcbe2543472535718d3b637cb864f6f36/hw/android/goldfish/audio.c#288)

------
sdinsn
Why is a 1 year old stack overflow question (with no answers) being reposted
to HN?

(Also, I cannot replicate this by the way)

~~~
djmips
I thought HN audience was smart and not manipulated by inflammatory headlines.

------
newnewpdro
Isn't the emulator emulating devices having a microphone like phones and such?
It seems rational for it to plumb the host's microphone into the emulated one,
so such features may be tested etc.

~~~
Zenbit_UX
It would be rational if you used an app that required the microphone, or if
you allowed it permissions. By your logic it also seems rational if an android
phone used it's microphone 100% of the time just in case you need to make a
phone call.

~~~
kllrnohj
Always-on hotword recognition is a normal thing phones do. Even if the
emulator is only requesting mic access when an app uses it, that would still
actually be "basically always" unless you are using a no-Google image. Which
isn't the recommended image.

~~~
altShiftDev
> Always-on hotword recognition is a normal thing phones do.

I wouldn't call that normal at all, nor does your theory address the issue of
the permissions request being explicitly denied while still gaining access.

~~~
kllrnohj
> I wouldn't call that normal at all

What would you call it then? It's a thing 99% of modern phones do (Android &
iOS). If that's not "normal" then what is "normal" in your world?

> nor does your theory address the issue of the permissions request being
> explicitly denied while still gaining access

My theory was not intended to address what is obviously an OSX bug. The theory
is _why_ it was asking. Why it managed to get access anyway after being denied
is just a straight up permission bug in OSX and has nothing to do with Android
Studio or the emulator.

------
edmundo
The same happens with the iOS Simulator. I noticed when developing an app
(that doesn't need any microphone permissions itself), my noise cancelling
headphones would stop the noise cancelling feature, like it happens when
calling someone and using the microphone. Resetting the permissions and
denying “fixed” the issue for me.

Can't understand why the Simulator needs it.

------
egdod
Welcome to modern computing.

------
pcroh
>I received a pop up in which Android Studio requests permission to access my
microphone.

Uh? What OS shows that? Perhaps a newer Mac OS?

~~~
dddddaviddddd
Since Micro Snitch is referenced in one of the comments, yes.

[https://www.obdev.at/products/microsnitch/index.html](https://www.obdev.at/products/microsnitch/index.html)

------
catalogia
There is a certain sense of poetic justice that developers of Android
applications be subjected to invasive spyware, since that describes the vast
majority of applications those developers create.

At this point I avoid all apps that aren't from F-Droid. Both Google and
Amazon's android app stores are packed to the gills with software that wants
to spy on me and advertise to me.

~~~
altShiftDev
This seems rather off topic and unproductive to the effort of solving the SO
ticket. I highly doubt it's a matter of Google spying on developers, more
likely a bug or weird interaction with the OS.

~~~
catalogia
> _" unproductive to the effort of solving the SO ticket."_

That's an odd thing to object to. I have no interest in resolving the SO
ticket. Google doesn't pay me to fix their problems and nor am I inclined to
donate my labor to a for-profit corporation.

