Python Forum
Can Embedded Python run any shared library on Android ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can Embedded Python run any shared library on Android ?
As I have experienced, porting Python to Android is savagely difficult. However, there is a ready made Python interpreter on Android, along with its standard libraries, but porting a third party library as a Python module to Android is a nightmare. That's why I prefer the easier way as I've done on Windows, loading a precompiled library and using it like so:
from ctypes import *
lib = cdll.LoadLibrary("")
So my question is, can a Python interpreter running on Android load any shared library using this method and access its functions? Does the library have to be compiled with the 'extern C' method to be accessible? Does the library have had to be compiled with a JNI interface or is it not needed?
In summary, can Python embedded in Android use a shared library that is not compiled as a module ?

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python bot for ADB Android SCRCPY Bizzy_ 3 507 May-01-2021, 10:41 AM
Last Post: Larz60+
  Embedded python fails to compile on Raspberry Pi tryfon 2 621 Dec-22-2020, 02:06 PM
Last Post: tryfon
  ImportError: Can not find the shared library: aupres 1 863 Oct-18-2020, 06:57 AM
Last Post: bowlofred
  memory leak on embedded python in c++ asdf3721 3 993 Jul-16-2020, 06:33 AM
Last Post: Gribouillis
  Embedded Python PyObject_CallObject function JRHeisey 1 905 Nov-27-2019, 01:50 AM
Last Post: casevh
  Developing Python with OpenCV into an Android App AviationFreak 1 3,546 Sep-29-2019, 08:55 AM
Last Post: wavic
  Calling Extended Embedding Python as shared library jibarra 0 922 Jul-19-2019, 05:22 PM
Last Post: jibarra
  Where is usually located the python interpreter on android devices? anddontyoucomebacknomore 1 1,017 Jul-03-2019, 06:32 PM
Last Post: metulburr
  Trying to implement Python into embedded OS thesurya7 2 1,034 Apr-02-2019, 06:38 PM
Last Post: ebolisa
  Multiple calls to Python interpreter embedded in C++ application yield segmentation f mmoelle1 0 1,257 Mar-21-2019, 08:54 PM
Last Post: mmoelle1

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020