Post Reply

[Q] property_set and property_get usage

OP arTsmarT

18th June 2014, 04:12 PM   |  #1  
OP Junior Member
Thanks Meter: 0
 
2 posts
Join Date:Joined: Jan 2012
Hi,
I'm trying to set and retrieve properties in my native code using property_get and property_set but it doesn't seem to be working. I tried adding debug logs but they don't show up too. I'm not sure if I'm doing it all wrong but here's what I did,
I have
Code:
property_set("dm.scheme",value);
in a function in one file and

Code:
char value[PROPERTY_VALUE_MAX]; 
property_get("dm.scheme",value,"0");
in another file.

I modified property_service.c to this

Code:
/* White list of permissions for setting property services. */
struct {
    const char *prefix;
    unsigned int uid;
    unsigned int gid;
} property_perms[] = {
    { "net.rmnet0.",      AID_RADIO,    0 },
        ...
    { "service.adb.tcp.port", AID_SHELL,    0 },
    { "persist.sys.",     AID_SYSTEM,   0 },
    { "persist.service.", AID_SYSTEM,   0 },
    { "persist.security.", AID_SYSTEM,   0 },
    { "dm.", AID_SYSTEM,  0},
    { NULL, 0, 0 }
};
Am I missing anything here?
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Android Q&A, Help & Troubleshooting by ThreadRank