android 系统使用c语言获取系统属性

1. 包含bionic库中"sys/system_properties.h" 

2. 使用接口

a:获取接口 int _system_property_get(const char* key, char* buf),buf[PROP_NAME_MAX]
参数1:获取的属性值,参数2:output:char*

b:设置接口 int __system_property_set(const char *key, const char *value);

参数1:属性值,参数2:value值

原文地址:https://www.cnblogs.com/snail-micheal/p/4181622.html