This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | yan12125 |
|---|---|
| Recipients | Alex.Willmer, Roman.Evstifeev, xdegaye, yan12125 |
| Date | 2016年04月26日.16:49:20 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1461689360.69.0.816450433719.issue26855@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
> Also how can we be sure that the '/system/build.prop' file may be guaranteed to exist on all android devices ? This path is hard-coded in BioniC [1]. Though I can't find a document/relevant source codes to guarantee 'ro.build.version.release' and 'ro.build.version.sdk' is always in /system/build.prop And the format of build.prop is not exactly INI. It supports 'import' clauses. See [2] and load_properties() function in [3] Other options include calling `getprop` via subprocess or using C level function __system_property_get(). The first approach should always work. It's just somewhat tricky on Android 4.1 [4]. For the second option, a bad news is that it's a private API and was just removed from the latest NDK. Chromium has a workaround for that [5] and CPython may use similar approaches. [1] https://android.googlesource.com/platform/bionic/+/master/libc/include/sys/_system_properties.h [2] http://forum.xda-developers.com/android/general/explanation-build-prop-values-t3069341 [3] https://android.googlesource.com/platform/system/core/+/master/init/property_service.cpp [4] https://github.com/rave-engine/python3-android/pull/10#issuecomment-159151445 [5] https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/keQP6L9aVyU |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2016年04月26日 16:49:20 | yan12125 | set | recipients: + yan12125, xdegaye, Roman.Evstifeev, Alex.Willmer |
| 2016年04月26日 16:49:20 | yan12125 | set | messageid: <1461689360.69.0.816450433719.issue26855@psf.upfronthosting.co.za> |
| 2016年04月26日 16:49:20 | yan12125 | link | issue26855 messages |
| 2016年04月26日 16:49:20 | yan12125 | create | |