How to declare new system property in Android?
I want to add a new system property in android code, a property I can set and get by property_set() and property_get() in native code.
How to add a new system property? For example I want to declare new sys.newprop
go to init.rc or your proprietary init.xyz.rc
declare new property
setprop sys.newprop 0
then now you can use it in your code
#include <cutils/properties.h> property_set("sys.newprop","1");
Why not simply use a HashMap<String,Object>?