Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Systemproperties.set doesn't work

I want to add a property cam.sound in framework/base/core/Java/Android/hardware/Camera.Java so that I can use to turn on or turn off the camera shutter sound, but it seems that the Systemproperties.set function doesn't work. Below is my test steps:

  • import Android.os.SystemProperties;
  • call function whit SystemProperties.set("cam.sound", "on");

After that, the value of cam.sound didn't change.

like image 968
nobody Avatar asked Jul 26 '26 00:07

nobody


1 Answers

I think you need prefix name "persist.sys."

And then AndroidManifest.xml add (android:sharedUserId="android.uid.system")

And then Android.mk add (LOCAL_CERTIFICATE :=platform)

like image 152
Randolph Avatar answered Jul 28 '26 13:07

Randolph



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!