SystemProperties属性限制
android12-release
获取修改prop属性值
-
获取prop属性值,如
getprop ro.build.fingerprint
getprop ro.system.build.version.release
不记得全名,可以grep查找,如getprop | grep boot
-
修改prop属性值,如
setprop sys.boot_completed 0
,需要权限
android.os.SystemProperties 属性限制
android.os.SystemProperties
Android O之后属性限制
/**
* Android O removed the property name length limit, but com.amazon.kindle 7.8.1.5
* uses reflection to read this whenever text is selected (http://b/36095274).
* @hide
*/
@UnsupportedAppUsage
public static final int PROP_NAME_MAX = Integer.MAX_VALUE;
/** @hide */
public static final int PROP_VALUE_MAX = 91;
Android O之前属性限制
30 public static final int PROP_NAME_MAX = 31;
31 public static final int PROP_VALUE_MAX = 91;
ro
开头属性特例,不受PROP_VALUE_MAX
限制