I need to read an Android property on my device, in C++.
The property in question is sys.serialno.
At the moment, I access the property in java, with something similar to:
Process p = Runtime.getRuntime().exec( "getprop sys.serialno" );
p.waitFor();
BufferedReader reader = new BufferedReader( new InputStreamReader( p.getInputStream() ) );
String line = reader.readLine();
however I'd now like to do the same in C++. I don't want to emulate the code above, I just need to access the property in the easiest way possible.
I appreciate I can just call the java from my C++, but I'd rather not do that, as ideally I would be performing this call early on in the app life-cycle.