-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can .so files be run using Chaquopy? #302
Comments
You can load .so files if they're built for Android (not Linux or Mac). However, if you're receiving that error then it probably isn't a valid .so file at all. Where did it come from? |
i built it using cython:
I tested the .so file in my mac, it works fine. |
Are you doing this because you want to hide your code? If you're not satisfied with merely compiling to pyc format, as we discussed in #295, then you should look into Python obfuscation tools, which will be be much easier than trying to compile for Android using Cython. |
I need to Cythonize because because .pyc bytecode is decompileable and the obfuscation is easily reverse-engineered.
I have put the python script test1.py in /sdcard/Download.
Is it because am not passing args to setup.py? like |
Currently am trying to use os.system:
But
is not even calling the setup.py script. |
You won't be able to compile a Cython module on an actual Android device, because most devices don't come with a compiler. If you need to build your code into .so file, then you can use Cython with our package build tool, which was used to build everything in the native package repository. For more details, see #175 (comment). |
So the licensed package build tool builds the .so files for Android platform? |
Yes: for more details on the tool, see #175 (comment). And for instructions on building your own Cython module, see #800 (comment). |
i am trying to call a .so file but it fails.
MainActivity.java:
temp.py:
I am trying to call test1.so file instead of test1.py but it fails:
But if i call test1.py, it runs succesfully. Here is my test1.py:
Why does it fail? Previously i have been told that Chaquopy doesnt import-and-run .pyc files. Does it not support .so files?
The text was updated successfully, but these errors were encountered: