Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Exploring SE for Android
  • Table Of Contents Toc
Exploring SE for Android

Exploring SE for Android

By : Confer, Roberts
4 (3)
close
close
Exploring SE for Android

Exploring SE for Android

4 (3)
By: Confer, Roberts

Overview of this book

This book is intended for developers and engineers with some familiarity of operating system concepts as implemented by Linux. A basic background in C code would be helpful. Their positions range from hobbyists wanting to secure their Android powered creations to OEM engineers building handsets to engineers of emerging areas where Android is seeing growth.
Table of Contents (16 chapters)
close
close
15
Index

Creating and labeling new properties


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...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Exploring SE for Android
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon