Linux commands

Tuesday, April 3, 2012

How to declare new system property in Android

Open init.rc or your proprietary init.xyz.rc
//declare new property from following line
setprop sys.newprop 0

//Now you can use it in your code as follows
#include <cutils/properties.h>
property_set("sys.newprop","1");

No comments:

Post a Comment