[MOD] Patched libaudiopolicy_sec.so to mute camera

Search This thread

letama

Senior Member
Feb 13, 2008
1,689
2,324
Hello all,

Here is a way to mute the camera shutter/focus sound.

Pre-requisite:
  • Watch must be rooted to replace the file
  • Adb working with gear

Installation with adb:
  1. Extract the file on your PC, in adb directory if you don't have it in your PATH
  2. Connect your watch to PC
  3. Type these commands on the PC:
    Code:
    adb shell su -c mount -o remount,rw /
    adb shell su -c mount -o remount,rw /system
    adb shell su -c mkdir /tmp
    adb push libaudiopolicy_sec.so /tmp
    adb shell su -c mv /system/lib/libaudiopolicy_sec.so /system/lib/libaudiopolicy_sec.so.org
    adb shell su -c cp /tmp/libaudiopolicy_sec.so /system/lib/
    adb shell sync
    adb shell sync
    adb reboot
  4. Gear reboots
  5. Set volume to vibrate and voila!

Notes:
  • Camera is muted only when watch volume is set to vibrate mode with this patch.
  • I patched NA3 firmware file, so maybe NA3 firmware installed is required. There are good chances that this file didn't change between MK7 and NA3, let me know if it works on MK7
 

Attachments

  • libaudiopolicy_patched.zip
    40.1 KB · Views: 403

XanoZuke

Senior Member
Hello all,

Here is a way to mute the camera shutter/focus sound.

Pre-requisite:
  • Watch must be rooted to replace the file
  • Adb working with gear

Installation with adb:
  1. Extract the file on your PC, in adb directory if you don't have it in your PATH
  2. Connect your watch to PC
  3. Type these commands on the PC:
    Code:
    adb shell su -c mount -o remount,rw /
    adb shell su -c mount -o remount,rw /system
    adb shell su -c mkdir /tmp
    adb push libaudiopolicy_sec.so /tmp
    adb shell su -c mv /system/lib/libaudiopolicy_sec.so /system/lib/libaudiopolicy_sec.so.org
    adb shell su -c cp /tmp/libaudiopolicy_sec.so /system/lib/
    adb shell sync
    adb shell sync
    adb reboot
  4. Gear reboots
  5. Set volume to vibrate and voila!

Notes:
  • Camera is muted only when watch volume is set to vibrate mode with this patch.
  • I patched NA3 firmware file, so maybe NA3 firmware installed is required. There are good chances that this file didn't change between MK7 and NA3, let me know if it works on MK7

Worked like a charm! Thank you!
 
  • Like
Reactions: letama

letama

Senior Member
Feb 13, 2008
1,689
2,324
Works on MK7, thanks :)

Just out of curiosity. What did you patch?

Thanks for confirming it works in MK7!

I patched setSystemProperty("ro.camera.sound.forced", value) function in audio policy dll to be always 0 (it sets the ENFORCED_AUDIBLE:canBeMuted flag to true if you know a bit about the audio policy dll).

I tried to do it in a less "invasive" way, but it didn't work. Patch is rather safe though, audio_policy is not that big and shouldn't change too often.
 

Sepharite

Senior Member
Oct 12, 2011
672
31
Awesome thanks!

Do people even use the non-vibrate option for their GG? I assumed everyone used Vibrate, negating any sound from the camera.
 

omnigod

Member
Jun 18, 2009
13
3
finally, after much googling...

i managed to follow and install the patch..

im not too familiar with linux commands... so, personally, this is the workaround i used...
this video helped me for the installation: http://www.youtube.com/watch?v=KzKbRaYdQ-A
i even downloaded the link in the video, where i got the ADB and keyboard.
instead of installing the keyboard, i copy and pasted every line of the instruction here...

it worked! im in MK7, rooted device. now my camera has no sound in mute mode...

thanks!
 
  • Like
Reactions: Dentsu

dproldan

Senior Member
Dec 7, 2007
262
367
Malaga
Can you tell me about how you patched a .so file? We have a problem with the MotoACTV, where the audio input only works for a bluetooth connection, but doesn't work for any usual android function.

Is there any web page I can read about that kind of patching?

These are the files for the MotoACTV, in case you wwant to take a look.

https://github.com/dproldan/android_vendor_motorola_G2/tree/master/proprietary/lib

Thanks in advance
 

letama

Senior Member
Feb 13, 2008
1,689
2,324
Can you tell me about how you patched a .so file? We have a problem with the MotoACTV, where the audio input only works for a bluetooth connection, but doesn't work for any usual android function.

Is there any web page I can read about that kind of patching?

These are the files for the MotoACTV, in case you wwant to take a look.

https://github.com/dproldan/android_vendor_motorola_G2/tree/master/proprietary/lib

Thanks in advance

Well, I did arm disassembly, locate the location that need patching and changed an arm conditional jump opcode to inconditional.

It works in simple case, your problem seems much more complicated than that. In this case, I'm afraid you'd have to rewrite dll from scratch.
 

xtra12

New member
Dec 18, 2013
4
1
adb?

Hello, I was just about to try this, but I don't understand the adb directory. Where do I find that? Is it from the command prompt on the PC? I just rooted the Gear and installed the Samsung drivers in the process, but I don't know about adb. Where can I find this?

Thanks!

---------- Post added at 07:53 PM ---------- Previous post was at 07:21 PM ----------

Okay, so I found the answer and wanted to put it up here if anyone else is new to rooting like I am. Here is the link on how to use ADB on your pc. It helped me set it up and now this fantastic mod works great!

galaxy-note-3.wonderhowto.com/how-to/install-android-debug-bridge-adb-utility-windows-pc-0149131/
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Hello all,

    Here is a way to mute the camera shutter/focus sound.

    Pre-requisite:
    • Watch must be rooted to replace the file
    • Adb working with gear

    Installation with adb:
    1. Extract the file on your PC, in adb directory if you don't have it in your PATH
    2. Connect your watch to PC
    3. Type these commands on the PC:
      Code:
      adb shell su -c mount -o remount,rw /
      adb shell su -c mount -o remount,rw /system
      adb shell su -c mkdir /tmp
      adb push libaudiopolicy_sec.so /tmp
      adb shell su -c mv /system/lib/libaudiopolicy_sec.so /system/lib/libaudiopolicy_sec.so.org
      adb shell su -c cp /tmp/libaudiopolicy_sec.so /system/lib/
      adb shell sync
      adb shell sync
      adb reboot
    4. Gear reboots
    5. Set volume to vibrate and voila!

    Notes:
    • Camera is muted only when watch volume is set to vibrate mode with this patch.
    • I patched NA3 firmware file, so maybe NA3 firmware installed is required. There are good chances that this file didn't change between MK7 and NA3, let me know if it works on MK7
    1
    Hello all,

    Here is a way to mute the camera shutter/focus sound.

    Pre-requisite:
    • Watch must be rooted to replace the file
    • Adb working with gear

    Installation with adb:
    1. Extract the file on your PC, in adb directory if you don't have it in your PATH
    2. Connect your watch to PC
    3. Type these commands on the PC:
      Code:
      adb shell su -c mount -o remount,rw /
      adb shell su -c mount -o remount,rw /system
      adb shell su -c mkdir /tmp
      adb push libaudiopolicy_sec.so /tmp
      adb shell su -c mv /system/lib/libaudiopolicy_sec.so /system/lib/libaudiopolicy_sec.so.org
      adb shell su -c cp /tmp/libaudiopolicy_sec.so /system/lib/
      adb shell sync
      adb shell sync
      adb reboot
    4. Gear reboots
    5. Set volume to vibrate and voila!

    Notes:
    • Camera is muted only when watch volume is set to vibrate mode with this patch.
    • I patched NA3 firmware file, so maybe NA3 firmware installed is required. There are good chances that this file didn't change between MK7 and NA3, let me know if it works on MK7

    Worked like a charm! Thank you!
    1
    Thanks for the confirmation :)

    Are you on MK7 or NA3 ?

    Sorry, forgot to mention. I'm on NA3.
    1
    Works on MK7, thanks :)

    Just out of curiosity. What did you patch?
    1
    finally, after much googling...

    i managed to follow and install the patch..

    im not too familiar with linux commands... so, personally, this is the workaround i used...
    this video helped me for the installation: http://www.youtube.com/watch?v=KzKbRaYdQ-A
    i even downloaded the link in the video, where i got the ADB and keyboard.
    instead of installing the keyboard, i copy and pasted every line of the instruction here...

    it worked! im in MK7, rooted device. now my camera has no sound in mute mode...

    thanks!