[issue26855] android: add platform.android_ver()

Chi Hsuan Yen report at bugs.python.org
Wed May 4 15:47:19 EDT 2016


Chi Hsuan Yen added the comment:

Several questions on implementation:
1. Should Android 4.1 supported? If not pass_fds and logics for deriving it can be removed.
2. I can't find ro.build.version.full on any device/emulator I have access to. Maybe it should be removed due to low popularity?

Some related Android source codes, as my implementation basis:
1. Android 4.1's ANDROID_PROPERTY_WORKSPACE: https://android.googlesource.com/platform/bionic/+/android-4.1.1_r1/libc/bionic/system_properties.c#55
2. The Android Framework assumes property values to be valid UTF-8: https://android.googlesource.com/platform/frameworks/base/+/android-5.1.1_r37/core/jni/android_os_SystemProperties.cpp#49. In fact if I feed a malformed /system/build.prop to DalvikVM, it crashes [1]
3. Google's Android Compatibility Test Suite (CTS) [2] assumes `getprop` binary is in $PATH and can be executed: https://android.googlesource.com/platform/cts/+/android-5.1.1_r37/tests/tests/os/src/android/os/cts/BuildTest.java#110

[1] https://github.com/rave-engine/python3-android/pull/10#issuecomment-159390390
[2] https://source.android.com/compatibility/cts/

----------
Added file: http://bugs.python.org/file42721/android_ver.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26855>
_______________________________________


More information about the Python-bugs-list mailing list