2014-11-03 12 views

Odpowiedz

6

Poszedłem z popen jak opisano w odpowiedzi na https://stackoverflow.com/a/478960/2833126, aby uruchomić getprop. Coś takiego jak

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);