how are the SystemProperties accessed in Android

1,194 views
Skip to first unread message

arun gupta

unread,
Feb 12, 2010, 11:02:50 PM2/12/10
to android-...@googlegroups.com
hi all,
i was going through the SystemProperties.java in Android.
there is a call to native library
private static native String native_get(String key);
and others these are native and shd must have library loaded
where are the library?
which file has the defination for these functions?
 
regards
Arun Gupta
 

NoraBora

unread,
Feb 16, 2010, 11:10:55 PM2/16/10
to android-platform
native_get() is SystemProperties_getSS() in frameworks/base/core/jni/
android_os_SystemProperties.cpp.
SystemProperties_getSS() uses property_get() which is defined in
system/core/libcutils/properties.c.

NoraBora

unread,
Feb 16, 2010, 11:17:58 PM2/16/10
to android-platform
actually the definition of property_get() is determined by
#ifdef HAVE_LIBC_SYSTEM_PROPERTIES and #elif
defined(HAVE_SYSTEM_PROPERTY_SERVER)
in my case property_get() uses __system_property_get() which is
defined in bionic/libc/bionic/system_properties.c.

arun gupta

unread,
Feb 17, 2010, 1:00:32 PM2/17/10
to android-...@googlegroups.com
now how is the system prpertises like device type or roaming are stored in the device. i saw a file called buildinfo.sh that contains some data in it.
if i want to set a data how i am going to do it...
 
 
 
regards
arun gupta
--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.


NoraBora

unread,
Feb 17, 2010, 9:20:12 PM2/17/10
to android-...@googlegroups.com
AFAIK, the properties is in vendor/your_product/system.prop.

2010/2/18 arun gupta <arungu...@gmail.com>

arun gupta

unread,
Feb 18, 2010, 11:47:50 AM2/18/10
to android-...@googlegroups.com
hi i would like too add a few things the build.prop file info is updated by the build info.sh
but  is there any other way to do it
regards arun gupta

NoraBora

unread,
Feb 21, 2010, 7:11:03 PM2/21/10
to android-...@googlegroups.com
How about using PRODUCT_PROPERTY_OVERRIDES?

2010/2/19 arun gupta <arungu...@gmail.com>

arun gupta

unread,
Feb 22, 2010, 2:23:47 AM2/22/10
to android-...@googlegroups.com
can u elaborate what u are asking ?
 
regards
Arun Gupta

NoraBora

unread,
Feb 22, 2010, 3:46:54 AM2/22/10
to android-...@googlegroups.com
If you want to add some properties to build.prop

you can use PRODUCT_PROPERTY_OVERRIDES.

to see how to use it, check http://android.git.kernel.org/?p=platform/vendor/aosp.git;a=blob;f=products/aosp_core.mk;h=7d5df934a740a260cf89def498a8705be91890f8;hb=HEAD

2010/2/22 arun gupta <arungu...@gmail.com>
Reply all
Reply to author
Forward
0 new messages