Android系统属性 - 你重置他们在命令行上 [英] Android system properties - unsetting them on the command line

查看:1197
本文介绍了Android系统属性 - 你重置他们在命令行上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以设置在Android手机上的系统属性(具有相应权限),使用setprop和键值对:

I can set a system property on an android phone (with appropriate permissions) using setprop and a key value pair:

$ adb shell setprop persist.this.is.my.property testing

然后我就可以得到属性:

I can then get the property:

$ adb shell getprop persist.this.is.my.property
testing

但我不能现在,它被设置(因为持续的关键开始它的存在在手机重启后)拔出钥匙。没有unsetprop或rmprop或类似的话。试图将值设置为零或空集的的价值和留空提示的帮助说明。

But I can't remove the key now that it is set (because of the persist at the start of the key it is there after the phone reboots). There is no unsetprop or rmprop or anything similar. Attempting to set the value to nil or null sets that to the value and leaving it empty prompts the help instructions.

有谁知道如何取消设置在命令行的系统属性已被设定之后?

Does anyone know how to unset a system property from the command line after it has been set?

(我知道我可以写一个小二进制这样做,但我会preFER不要在这个阶段。)

(I know that I could write a small binary to do this but I would prefer not to at this stage.)

推荐答案

要删除属性:

rm /data/property/persist.this.is.my.property && reboot

这篇关于Android系统属性 - 你重置他们在命令行上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆