Do the following access the same internal set of properties or is there any difference in their semantics?
java.lang.System.setProperty(String key, String value)
android.os.SystemProperties.set(String key, String value)
adb shell setprop 'key' 'value'
For example, after calling:
System.setProperty("myprop", "1");
adb shell getprop myprop
returns an empty string.
Note: SystemProperties
is an internal class, not exposed in the SDK, but used by other system classes.
SystemProperties.set()
and adb shell setprop
are inter-operable: they both alter the same system property value.
However, System.setProperty()
is Java and VM specific, and uses different key/value naming convention.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With