-
Book Overview & Buying
-
Table Of Contents
Exploring SE for Android
By :
All properties are dynamically created in the system using setprop calls or function calls that do the equivalent from C (bionic/libc/include/sys/system_properties.h) and Java (android.os.SystemProperties). Note that the System.getProperty() and System.setProperty() Java calls work on application private property stores and are not tied into the global one.
For DAC controls, you need to modify property_perms[] as noted earlier to have permissions for non-root users to create or set the property. Note that root can always set and create, unless constrained by SELinux policy.
Suppose we want to create the udoo.name and udoo.owner properties; we only want the root user and shell domain to access them. We could create them like this:
root@udoo:/ # setprop udoo.name udoo avc: denied { set } for property=udoo.name scontext=u:r:shell:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service root@udoo:/ # setprop udoo.owner William
Notice the denial shows...
Change the font size
Change margin width
Change background colour