Want to know which application is using microphone reached a conclusion,plz help

tarun18

New Member
Joined
Aug 22, 2012
Messages
2
Reaction score
0
I was trying to do the following:-
I was trying to find which application of my phone is using my phone microphone,i made lot of try and research and found the following:-
When app want to use microphone, it must use "android.media.MediaRecorder" class,
then the request will be delivered to /system/bin/mediaserver which is a system service,
this service will open device and record voice,if you try to find app, it is very hard to do,
because the request is delivered by Binder, we should monitor "/system/bin/mediaserver",
if the service is using the "/dev/msm_pcm_in" device, it means it is recording,
then we could list all running apps and find the app which have "RECORD_AUDIO" permission and also consumes CPU,
I know it is a dirty way, but it maybe works.


You could detect if microphone is working, you just need to su as root, then run "lsof | grep msm_pcm_in",

ABOVE SOLUTION CANNOT BE USED BECAUSE I CANT USE THE ROOT PERMISSION



then I FOUND

dumpsys doesn't need root permission,
although dumpsys can't give any mic information, but it could dump the service information,
it also could help you find the app is using mic, we can combine two ways into one.

1. all apps use microphone via "/system/mediaserver", it is a service whose name is "media.player".
2. dumpsys can get information from specific service.


Finally, we get the answer, "dumpsys media.player",
if we are running any recording app,
you will see a "MediaRecorderClient" which includes pid and more information,
it means the app is using mic and recording voice ,now I can find the correct app which is using mic.

BUT I WAS NOT ABLE TO USE DUMPSYS THROUGH C


THEN I SWITCHED FINALLY TO lsof COMMAND AND RUN THE lsof CODE THROUGH MY NDK CODE AND I FOUND IN THE DUMP OF lsof THAT THERE IS SERVICE NAMED MEDIA SERVER AND FINALLY



As per Android Multimedia framework the MediaServer is responsible for opening the device and the Java based audio applications connect it as a client. The data transfer happens on the Binder. May because of this there is only one process seen which opens the audio device.


HOWEVER I REACHED HERE NOW I WANT TO KNOW HOW TO READ FROM THE INFO FROM MEDIA SERVER.

OR

ANYOTHER WAY TO DETECT WHICH APPLICATION IS USING MY PHONE MICROPHONE?
 
Did you find a solution?

Hello
did you find solution?
This is very important topic....the NSA of USA is spying also.
 
Ok so I really need dummied down answers for this one.. What does it mean when I try to use Shazam but can't because an app was using my mic. Not cool and a bit worried someone out there is listening. Feeling a bit violated. Am I being realistic in thinking that or not and if so how do I avoid or block that from happening again. I was able to use Shazam after turning off and on my phone but really not using Shazam isn't really my concern. Mic being used not by me is. Sorry to speak so laymans but how else do you learn right??
 
Ok so I really need dummied down answers for this one.. What does it mean when I try to use Shazam but can't because an app was using my mic. Not cool and a bit worried someone out there is listening. Feeling a bit violated. Am I being realistic in thinking that or not and if so how do I avoid or block that from happening again. I was able to use Shazam after turning off and on my phone but really not using Shazam isn't really my concern. Mic being used not by me is. Sorry to speak so laymans but how else do you learn right??
Welcome to the Forum. What phone do you have?

You could try going to Settings > Apps > Gear symbol (or menu button depending on phone) > App Permissions > Microphone. Look for apps that have the slider bar set to On and see if anything looks out of place, like an app that normally wouldn't need the microphone or one that you don't remember giving access to the mic.

Sent from my XT1650 using Tapatalk
 
Welcome to the Forum. What phone do you have?

You could try going to Settings > Apps > Gear symbol (or menu button depending on phone) > App Permissions > Microphone. Look for apps that have the slider bar set to On and see if anything looks out of place, like an app that normally wouldn't need the microphone or one that you don't remember giving access to the mic.

Sent from my XT1650 using Tapatalk
OK thank you, this was helpful. Maybe it was google? I did turn off Mic for that app as I do not use ok google but I have yet to check other apps to turn off that allowance.
 
Back
Top