Replacement for `__system_property_get` in Android L NDK

As of Android L NDK, __system_property_get is __system_property_get deleted ( https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/keQP6L9aVyU ). Is there another API in Android L NDK to access the same property values?

+5
source share
1 answer

I went with popen as described in fooobar.com/questions/21128 / ...'s answer to run getprop . Sort of

 std::string command = "getprop ro.product.model"; FILE* file = popen(command.c_str(), "r"); if (!file) { // error } // read the property value from file pclose(file); 
+6
source

Source: https://habr.com/ru/post/1206115/


All Articles