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

Discussion in 'Android Forum' started by tarun18, Aug 22, 2012.

  1. tarun18

    tarun18 New Member

    Joined:
    Aug 22, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +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?

     
  2. DevilDogMP

    DevilDogMP Silver Member

    Joined:
    Jul 16, 2012
    Messages:
    3,797
    Likes Received:
    21
    Trophy Points:
    153
    Location:
    Raleigh, NC
    Ratings:
    +21
    Sorry I can't help you on that one.

    Sent from my DROID BIONIC
     
  3. kiers

    kiers New Member

    Joined:
    Jan 27, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Did you find a solution?

    Hello
    did you find solution?
    This is very important topic....the NSA of USA is spying also.
     
  4. Techdummyneedshelp

    Techdummyneedshelp New Member

    Joined:
    Nov 9, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Current Phone Model:
    Samsung s5
    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??
     
  5. me just sayin

    me just sayin Gold Member

    Top Poster Of Month

    Joined:
    Jun 7, 2017
    Messages:
    2,251
    Likes Received:
    924
    Trophy Points:
    348
    Location:
    35.7051° N, 89.9695° W
    Ratings:
    +997
    Current Phone Model:
    Note 8
    are you using ok google? if so or even if you don't, you can disable it and see if it is the problem.
     
  6. Sajo

    Sajo Diamond Member

    Joined:
    Jan 25, 2013
    Messages:
    11,316
    Likes Received:
    7,080
    Trophy Points:
    1,863
    Location:
    Tennessee
    Ratings:
    +7,589
    Current Phone Model:
    Moto Droid Z Force
    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
     
  7. Techdummyneedshelp

    Techdummyneedshelp New Member

    Joined:
    Nov 9, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Current Phone Model:
    Samsung s5
    No not that I am aware of.
     
  8. Techdummyneedshelp

    Techdummyneedshelp New Member

    Joined:
    Nov 9, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Current Phone Model:
    Samsung s5
    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.
     
Search tags for this page
an app on my phone is using my mic. how do i find out which
,

another application is using the microphone

,

another application might be using the microphone

,
could not record audio another application might be using th
,

it looks like another application is using the mic

,
mic is already on because it is being used by another applic
,
shazam another app using microphone
,
shazam another application using microphone
,
shazam could not record audio
,
what app is using my microphone