[英]Is it possible to add a property on a non-rooted android phone?
For my non-rooted device (which I am not allowed to root, so I need to find another way around), if I do对于我的非根设备(我不允许根,所以我需要找到另一种方法),如果我这样做
adb shell setprop MY_PROP 1
followed by其次是
adb shell getprop MY_PROP
I get a blank line.我得到一个空行。
How can I set a property?如何设置属性?
By default the shell
user is not allowed to create properties: 默认情况下,不允许shell
用户创建属性:
$ adb shell "setprop test.test 1; dmesg | grep test\.test"
[ 271.706897,0] init: avc: denied { set } for property=test.test scontext=u:r:shell:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service
[ 271.707157,0] init: sys_prop: permission denied uid:2000 name:test.test
Without root you can only add props that start with debug.
如果没有 root,你只能添加以debug.
adb shell setprop debug.my.prop newProp
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.