在App的mk文件设置了LOCAL_CERTIFICATE := platform和在
AndroidManifest.xml里有android:sharedUserId="android.uid.system"进行
SystemProperties.set("persist.env.test.enabled", String.valueOf(true));
报java.lang.RuntimeException: failed to set system property。
1.SystemProperties.set("persist.sys.env.fastdorm.enabled", String.valueOf(true));
执行成功,初步推断是属性命名有问题
2.adb shell setenforce 0 手动关闭SELinux执行可以成功。所"persist.env.test.enabled"的命名不符合SELinxu的安全上下文。
3.查看
\LINUX\android\system\sepolicy\private\property_contexts和\LINUX\android\device\qcom\sepolicy\common\property_contexts有对persist.sys. u:object_r:system_prop:s0
的定义没有对persist.env的定义
4.persist.env. u:object_r:system_prop:s0
将这行添加到LINUX\android\device\qcom\sepolicy\common\property_contexts文件,重新编译make vendorimage
再执行SystemProperties.set("persist.env.test.enabled", String.valueOf(true));
5. 可以通过命令adb shell :
getprop查看手机上所有属性状态值。
或者 getprop init.svc.bootanim制定查看某个属性状态
使用setprop init.svc.bootanim start 设置某个属性的状态
//public static final int PROP_NAME_MAX = 31; O之前现在属性名字现在31个字符
/**
* 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).
*/
public static final int PROP_NAME_MAX = Integer.MAX_VALUE;
public static final int PROP_VALUE_MAX = 91;
分享到:
相关推荐
System.setProperty("org.apache.commons.logging.LogFactory", "org.apache.commons.logging.impl.SimpleLogFactory"); System.setProperty("log4j.rootLogger", "DEBUG, stdout"); ``` 总的来说,解决"The ...
6、 第15行set_property ip_repo_paths C:/xup/hls/sources/lab4 [current_fileset]路径改为set_property ip_repo_paths d:/lab4 [current_fileset] 7、 将audio_project_create.tcl 的每一行拷贝入 Tcl Console ...
本地开发Spark/Hadoop报错“ERROR Shell: Failed to locate the winutils binary in the hadoop binary path ...2、下载该文件到D:\hadoop\bin下,并在代码中设置System.setProperty("hadoop.home.dir","D:\\hadoop");
Notice file: system/extras/taskstats/NOTICE -- out/target/product/astar-evb30/obj/NOTICE_FILES/src//system/xbin/taskstats.txt Import includes file: out/target/product/astar-evb30/obj/EXECUTABLES/...
* When TDropFileTarget.GetDataOnEnter is set to True, the component doesn't work with WinZip. Although the file names are received correctly by TDropFileTarget, WinZip doesn't extract the files and...
An important property of such botnets is that the originator of the botnet can remotely control and issue commands to all the nodes in the botnet. Hence, it becomes possible for the attacker to issue...
* pcs property set:用于设置集群属性。 二、PCS资源管理命令 PCS提供了多种命令来管理和维护集群资源,包括: * pcs resource list:用于查看可用的资源列表。 * pcs resource describe:用于查看资源的详细...
SCGCQ00327929 Defect Command to enable Patrol Read on SSDs controller property is not shown in Help SCGCQ00331576 Defect LSI MegaCLI EncInfo (Enclosure Info) duplicates the first power supply status ...
- The information field "Runtime Mode" has been added to the system statistic display. This shows whether the driver is running in the demo mode or in the licenced mode (with a valid key). - ...
[ 3.175402] Bluetooth: get rtl8723bs rtl8723bs_bt_host_wake gpio failed [ 3.953017] Bluetooth: RFCOMM TTY layer initialized [ 3.958456] Bluetooth: RFCOMM socket layer initialized [ 3.964183] ...
2. ZoomPen definition failed to save in tee files. Now resolved. 3. Integer overflow error reported after multiple zooms. Now resolved. 4. The property 'Controls' in TeeCommander coincides with...
Used to lock ranges between records in a table to prevent phantom insertions or deletions into a set of records. Ensures serializable transactions. RID A Row Identifier. Used to individually lock a ...
[ 3.175402] Bluetooth: get rtl8723bs rtl8723bs_bt_host_wake gpio failed [ 3.953017] Bluetooth: RFCOMM TTY layer initialized [ 3.958456] Bluetooth: RFCOMM socket layer initialized [ 3.964183] ...
# Set indication (checked by vold) that we have finished this action setprop vold.post_fs_data_done 1 # to force to start sdcard # class_start late_start # This module write data to /data should...
devices (currently only used to set the speed reported by device and to specify an alternative redolog file of USB MSD disk image modes) - hard drive - new disk image mode 'vvfat' - ported the ...
[ 3.175402] Bluetooth: get rtl8723bs rtl8723bs_bt_host_wake gpio failed [ 3.953017] Bluetooth: RFCOMM TTY layer initialized [ 3.958456] Bluetooth: RFCOMM socket layer initialized [ 3.964183] ...
System.setProperty("javax.net.ssl.trustStore", "path/to/myTruststore"); System.setProperty("javax.net.ssl.trustStorePassword", "myPassword"); ``` 接下来,我们将讨论如何使用httpUtils工具发送HTTPS...
public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { // 处理连接失败的情况 } } ``` 然后,你可以通过`ProxySelector.setDefault(new CustomProxySelector())`来设置全局的代理选择器...
如果想要自定义临时文件的存储位置,可以使用`System.setProperty("java.io.tmpdir", "自定义路径")`在程序启动时设置临时目录。但请注意,这可能需要相应的权限。 5. **异常处理** 在创建临时文件时,可能会遇到...
[ 3.175402] Bluetooth: get rtl8723bs rtl8723bs_bt_host_wake gpio failed [ 3.953017] Bluetooth: RFCOMM TTY layer initialized [ 3.958456] Bluetooth: RFCOMM socket layer initialized [ 3.964183] ...