How Can I Overcome The Property Length Limitation Of The "adb Shell Setprop"
I get an error when I try set a value for property with name >= 32 characters adb shell setprop 01234567890123456789012345678901 VALUE Error: could not set property This w
Solution 1:
It looks like there would be no way to bypass this limitation. I see the same rules in android java sources.
publicclassSystemProperties
{
publicstaticfinalint PROP_NAME_MAX = 31;
publicstaticfinalint PROP_VALUE_MAX = 91;
...
}
Solution 2:
I also faced same problem. as the answer mentioned above it's not possible use the NAME which longer than 31. so i change package name to shorter than 31 and it works now.
Solution 3:
Update: The system property name limit of 32 characters was removed in Android O. You are free to have longer names now.
publicclassSystemProperties{
/**
* 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).
*/publicstaticfinalint PROP_NAME_MAX = Integer.MAX_VALUE;
publicstaticfinalint PROP_VALUE_MAX = 91;
...
}
Solution 4:
Maybe using redirection?
Set small property which will hold file name for conf file:
setprop confFileName "myConf.yml"
in that conf file have all your big property names and values.
Post a Comment for "How Can I Overcome The Property Length Limitation Of The "adb Shell Setprop""