我怎样才能克服&QUOT的财产长度不限;亚行外壳setprop" [英] How can I overcome the property length limitation of the "adb shell setprop"

查看:169
本文介绍了我怎样才能克服&QUOT的财产长度不限;亚行外壳setprop"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到一个错误,当我尝试设置值与name属性> = 32个字符

I get an error when I try set a value for property with name >= 32 characters

adb shell setprop 01234567890123456789012345678901 VALUE

错误:

could not set property

这正常工作

adb shell setprop 0123456789012345678901234567890 VALUE
adb shell getprop 0123456789012345678901234567890
VALUE

有没有办法用较长的名称设置属性?

Is there any way to set properties with longer names?

推荐答案

看起来就没有办法绕过这个限制。我看到了Android的Java源文件相同的规则。

It looks like there would be no way to bypass this limitation. I see the same rules in android java sources.

public class SystemProperties
{
    public static final int PROP_NAME_MAX = 31;
    public static final int PROP_VALUE_MAX = 91;

    ...
}

这篇关于我怎样才能克服&QUOT的财产长度不限;亚行外壳setprop"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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