GRRedWings / python3-android

Python 3 cross-compilation tools for Android.
BSD Zero Clause License
68 stars 17 forks source link

Error on Copying /build Files #31

Closed ZongyuanLu closed 1 year ago

ZongyuanLu commented 1 year ago

Hi, there is an issue while copying all /build files into /data/local/tmp. image As pic shows, the copying operation failed with "Permission denied". To solve this problem, I rooted my phone and found "adb root" works. So I wonder that whether my Android device must be rooted or not. If not, could u tell me how to solve the "Permission denied" problem? thx.

ZongyuanLu commented 1 year ago

Additinally, I cannot even push files in /build to /sdcard, this copying operation is still prohibited with "Permission denied".

GRRedWings commented 1 year ago

The project has an example of how I use it on Android. I build the library and embed it in my application and call it through JNI. I have never used or had to use adb commands to run Python on a device.

ZongyuanLu commented 1 year ago

Thanks for your reply, Brian. I will build the "AndroidApp" directory and try again, have a nice day!

ZongyuanLu commented 1 year ago

Hi, I have used the AndroidApp in this project. What confuses me is only basic Python modules such as os, time and sys work well. Is there any way to use other Python modules (e.g. json, socket and collections) in this project? Thanks.

GRRedWings commented 1 year ago

I'm not sure what you mean by work well. I use all of your examples myself with this build of Python. Can you give more detail about what problems you are having?

ZongyuanLu commented 1 year ago

Sorry for my ambiguous expressions, I have found that I forgot to add android.permission.INTERNET in my Android App, so that the socket module could not work (e.g. Python thread was killed). It is a rookie-like mistake which makes me embarassed. Calling Python library by JNI is awesome and deserves a star, thanks a lot!