Hi Andrei, there are two approaches you could take. Create a binder interface for your extension or use the system property settings. The property service defines permissions for various properties, based on the prefix of the property name. You can find them in the following file:
system/core/init/property_service.c By default in the adb shell you are running under the "shell" user, so you need to define properties matching the AID_SHELL permission. In KitKat you could use for example "setprop debug.my_awasome_feature 1" On Monday, 24 March 2014 21:53:34 UTC+1, Andrei wrote: > > I've implemented a custom feature inside AudioFlinger that I want to be > able to turn on and off. I am currently able to do it by reading a custom > system properties (property_get()) and setting it from adb when running adb > as root. > > If I understand things correctly, Android security architecture does not > allow me to modify these properties (property_set()) from an app, e.g. > Setting or a custom app, even if I compile the app with the system UID and > sign it the system signing identity. The reason is that I need to be > *root*, not *system*, in order to set them for AudioFlinger to see. (Can > someone confirm this?) So I'm abandoning this strategy. > > Instead, I'm thinking for using a named semaphore in the OS which would > wait for the app the toggle a switch and then set the appropriate setting. > This seems like a bit of an overkill. > > What is the way to implement this correctly? Is there an event API that > the OS code itself could listen to, similar to BroadcastListener in Dalvik? > Any feedback is much appreciated. > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.