Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It is not necessary to parse this file as these values are accessible in Java using the SDK constant values :</p> <pre><code>Build.VERSION.INCREMENTAL Build.PRODUCT </code></pre> <p>More information on these values are available here : <a href="http://developer.android.com/reference/android/os/Build.VERSION.html" rel="nofollow">http://developer.android.com/reference/android/os/Build.VERSION.html</a></p> <p>If some values located in <code>build.prop</code> are not exposed by the SDK, you can retrieve them using the <code>getprop</code> command-line utility available in your android shell :</p> <pre><code>getprop # retrieves all the existing key/value pairs getprop ro.product.name </code></pre> <p>For completeness, note that <code>getprop</code> uses internally the <code>property_get</code> C API which is available in the Android NDK. </p> <p>More info on this point here : <a href="https://github.com/android/platform_system_core/blob/master/toolbox/getprop.c" rel="nofollow">https://github.com/android/platform_system_core/blob/master/toolbox/getprop.c</a>.</p> <p><strong>EDIT :</strong> </p> <p>If you are expecting to parse this file on your own, outside of an Android environment (that is the SDK and the NDK), you could </p> <ul> <li>Write a simple parser for it with a tokenizer</li> <li>Write a script shell that does it (ex : <code>grep ro.build.version.incremental | cut -d '=' -f 2</code>)</li> <li>Try to use what Android uses internally to parse this file (<a href="https://android.googlesource.com/platform/bionic/+/5e9a086145764d64c0f7fbce5489d820aa7fdcd4/libc/bionic/system_properties_compat.c" rel="nofollow">https://android.googlesource.com/platform/bionic/+/5e9a086145764d64c0f7fbce5489d820aa7fdcd4/libc/bionic/system_properties_compat.c</a>).</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload