Thanks Frank, I found when setting the property the system will check the calling ID and refused my access. That should be the reason, thanks again.
Best Regards, Ray -----Original Message----- From: android-developers@googlegroups.com [mailto:android-developers@googlegroups.com] On Behalf Of FrankG Sent: 2011年3月18日 22:17 To: Android Developers Subject: [android-developers] Re: property settings in Java and native C code Hello Ray, this is the wrong group to ask this kind of question. ( better android-platform ) But nevertheless: It depends from the name scheme of the system property which rights you need. But I assume that this property can only be set by a system app and theirfore your app must be signed with the platform key. Good luck ! Frank On 18 Mrz., 03:40, Sun Ray-B17777 <b17...@freescale.com> wrote: > Hi All, > > I want to set the property in Java code and get the property in C code. Is > this available? > > What I used is as below: > > 1. Set the property to 0x2 > mPowerControl = getInt(POWER_CONFIG, > 0x0);//get the configuration value of power > > System.setProperty("rw.power.config", String.valueOf(mPowerControl)); > > 2. Get the property, always to be 1, as I set in the init.rc > property_get("rw.power.config", propBuf, "0");) > > 3. Get the property through adb shell, it's same with the value > by property_get getprop rw.power.config > > Thanks, > Ray -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en