Author xdegaye
Recipients Alex.Willmer, Ethan Smith, Roman.Evstifeev, eric.snow, ethan.furman, xdegaye, yan12125, zach.ware
Date 2017-01-14.17:21:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Current status:

Available using the pyona build system [1]:
  * Cross compilation of Python for a given Android API level and architecture with android-ndk-r13b.
  * Cross compilation of third party extension modules (currently as a patch).
  * Interactive interpreter with curses and readline support, the Android adb (remote) shell is used to start the interpreter on the qemu emulator or a device connected with USB.
  * Remote debugging with gdb and support of the python-gdb module.
  * The adb shell is used to start a run of the test suite on the emulator or a device.

To be defined for the support of the Android platform:
  * Support starting with which Python release ?
     sys.getandroidapilevel() has been defined in Python 3.7 by issue 28740, so unless this enhancement is backported to 3.6 the first release to support Android could be 3.7.
  * What is the supported Android API level(s) [2] ?
     Level 21 is the first to provide a reliable wide character support.
     Level 24 is the most recent api level currently supported by the NDK and is the first where the adb shell is run as the 'shell' user instead of as 'root' and as a consequence, where the test suite must now cope with Android SELinux non permitted operations (hard link, mkfifo, mknod, bind on a unix socket).
  * On which architecture(s) ?
     The x86 platform is useful for testing and debugging as it runs fast on the Android qemu emulator.
     AFAIK the armv7 platform is still one of the most widespread Android platforms [3] [4].
  * Building with which NDK version ?
     The next android-ndk-r14 release is the first to provide "Unified headers", see issue #29040.
  * The buildbots run the test suite on the Android qemu emulator or on a device or both ?

Test suite results on the Android qemu emulator:
  test_builtin is excluded in all the tests - test_asyncio is excluded on armv7-android-api-21.
  x86 platform (duration: about 27 minutes, to be compared with 26 minutes when the test suite is run natively on the same laptop).
    api 21: success
    api 24: success
  armv7 platform (duration: about 410 minutes. Without the latest released libffi-3.2.1 that does not build on armv7).
    api 21: success
    api 24: success

Remaining issues:
1) Blocker issues:
    issue #13886: failure when test_readline is run before test_builtin.
      This problem is not specific to Android.
    issue #26858: android: setting SO_REUSEPORT fails
      Failure only on armv7 at api 21.

2) Issues with a patch tested successfully on x86 and armv7 at Android api 21 and 24:
    issue #28833: cross compilation of third-party extension modules.
  PermissionError raised at api 24:
    test_eintr test_genericpath test_pathlib test_posix test_shutil test_stat
      issue #28759: access to mkfifo, mknod and hard links is controled by SELinux MAC on Android
      issue #29180: skip tests that raise PermissionError in test_os (non-root user on Android)
      issue #29181: skip tests that raise PermissionError in test_tarfile (non-root user on Android)
      issue #29184: skip tests of test_socketserver when bind() raises PermissionError (non-root user on Android)
      issue #29185: test_distutils fails on Android api 24
      issue #28684: [asyncio] bind() on a unix socket raises PermissionError on Android for a non-root user.
      issue #28562: test_asyncio fails on Android upon calling getaddrinfo().
      issue #28997: test_readline.test_nonascii fails on Android.
      issue #29176: /tmp does not exist on Android and is used by curses.window.putwin()

3) Enhancement issues:
  issue #26855: android: add platform.android_ver().
  issue #27659: Prohibit implicit C function declarations.
  issue #29040: building Android with android-ndk-r14.

4) Languishing issues:
  issue #22724: byte-compile fails for cross-builds.
  issue #27606: Android cross-built for armv5te with clang and '-mthumb' crashes with SIGSEGV or SIGILL.
  issue #26852: add the '--enable-sourceless-distribution' option to configure.
  issue #27640: add the '--disable-test-suite' option to configure.

[2] Andoid versions:
      Android Version      Released        API Level  Name
      Android 7.1          October 2016    25         Nougat
      Android 7.0          August 2016     24         Nougat
      Android 6.0          August 2015     23         Marshmallow
      Android 5.1          March 2015      22         Lollipop
      Android 5.0          November 2014   21         Lollipop
      Android 4.4W         June 2014       20         Kitkat Watch
      Android 4.4          October 2013    19         Kitkat
      Android 4.3          July 2013       18         Jelly Bean
      Android 4.2-4.2.2    November 2012   17         Jelly Bean
      Android 4.1-4.1.1    June 2012       16         Jelly Bean
      Android 4.0.3-4.0.4  December 2011   15         Ice Cream Sandwich
      Android 4.0-4.0.2    October 2011    14         Ice Cream Sandwich
      Android 3.2          June 2011       13         Honeycomb
      Android 3.1.x        May 2011        12         Honeycomb
      Android 3.0.x        February 2011   11         Honeycomb
      Android 2.3.3-2.3.4  February 2011   10         Gingerbread
      Android 2.3-2.3.2    November 2010   9          Gingerbread
      Android 2.2.x        June 2010       8          Froyo
      Android 2.1.x        January 2010    7          Eclair
      Android 2.0.1        December 2009   6          Eclair
      Android 2.0          November 2009   5          Eclair
      Android 1.6          September 2009  4          Donut
      Android 1.5          May 2009        3          Cupcake
      Android 1.1          February 2009   2          Base
      Android 1.0          October 2008    1          Base
Date User Action Args
2017-01-14 17:21:32xdegayesetrecipients: + xdegaye, ethan.furman, eric.snow, Roman.Evstifeev, zach.ware, Alex.Willmer, yan12125, Ethan Smith
2017-01-14 17:21:32xdegayesetmessageid: <>
2017-01-14 17:21:32xdegayelinkissue26865 messages
2017-01-14 17:21:30xdegayecreate