I found the reason is that I didn't set the right prefix to the property. When I set sys.xxx, I got the right value.
So, to set the prop, we should follow the prefix specified in property_service.c. Thank you all very much. On Feb 27, 3:29 am, Deva R <[email protected]> wrote: > hello, > > >When I use setprop to add a new one, it's successful. So it should not reach > >the max limit of system.property. > > its not successful unless getprop of that key returns what is set... > > btw, by any chance did u peeked at how much entries are there at > present?? (just run "getprop" from shell once) > > setprop warnings on failure might be suppressed by default. > for eg, if u keep running below sequence in shell, eventually getprop > will stop displaying right value.. > > $setprop key1 1;getprop key1 > $setprop key2 2;getprop key2 > ... > $setprop key170 2;getprop key170 > ... > > and ya, this issue have been discussed like 40 times already in this > very same > forum,http://groups.google.com/group/android-porting/browse_thread/thread/7... > > > > > > On Sat, Feb 26, 2011 at 7:57 AM, 王利平 <[email protected]> wrote: > > When I use setprop to add a new one, it's successful. So it should not reach > > the max limit of system.property. > > > Best regards > > Swandle > > > 2011/2/26 Deva R <[email protected]> > > >> possibly u reached max limit of system.property entries. > >> run "getprop" and see how much entries you alreay got. > >> there is a maximum limit for system property database.., u need to > >> increase that. > > >> On Thu, Feb 24, 2011 at 3:59 PM, Swan <[email protected]> wrote: > >> > In file services/java/com/android/server/MountService.java. > >> > In function private void updatePublicVolumeState(String path, String > >> > state) {} > > >> > Add: > >> > SystemProperties.set(path, state); > >> > Slog.d(TAG, "***** set prop: " + path + " : " + state); > >> > Slog.d(TAG, "***** get prop: " + path + " : " + > >> > SystemProperties.get(path, "null")); > > >> > The value gotten from SystemProperties.get(path, "null") is null, but > >> > it's not null exactly. > >> > Later I use getprop command to get the value of the path, but it does > >> > not exist. But I use setprop, it can set the value of the prop. > > >> > Could anyone tell me the reason? > >> > Thanks. > > >> > -- > >> > unsubscribe: [email protected] > >> > website:http://groups.google.com/group/android-porting > > >> -- > >> Regards, > >> Deva > >>www.bittoggler.com > > -- > Regards, > Devawww.bittoggler.com- Hide quoted text - > > - Show quoted text - -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
