Android system properties

Make the following access to the same internal set of properties, or is there a difference in their semantics?

For example, after a call:

System.setProperty("myprop", "1");

adb shell getprop myprop returns an empty string.


Note. SystemPropertiesis an inner class that does not appear in the SDK but is used by other system classes.

+3
source share
1 answer

SystemProperties.set()and adb shell setpropare interchangeable: both of them change the same value of a system property.

However, it System.setProperty()is specific to Java and VM and uses various naming conventions.

+8
source

All Articles