diff --git a/init/init_msm8974.cpp b/init/init_msm8974.cpp index 0807d89..c331bf4 100644 --- a/init/init_msm8974.cpp +++ b/init/init_msm8974.cpp @@ -34,6 +34,9 @@ #include #include +#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ +#include + #include "vendor_init.h" #include "property_service.h" #include "log.h" @@ -46,6 +49,17 @@ void init_target_properties() { } +void property_override(char const prop[], char const value[]) +{ + prop_info *pi; + + pi = (prop_info*) __system_property_find(prop); + if (pi) + __system_property_update(pi, value, strlen(value)); + else + __system_property_add(prop, strlen(prop), value, strlen(value)); +} + static int read_file2(const char *fname, char *data, int max_size) { int fd, rc; diff --git a/init/init_msm8974.h b/init/init_msm8974.h index 587b76e..2c11511 100644 --- a/init/init_msm8974.h +++ b/init/init_msm8974.h @@ -31,5 +31,6 @@ #define __INIT_MSM8974__H__ void init_target_properties(); +void property_override(char const prop[], char const value[]); #endif /* __INIT_MSM8974__H__ */