Hi Gaston,

> I try a build a picolisp core apk for android.
> /mk.pilbox work

OK

> But in Android when app run get error " bin/picolisp not found"

Since SDK 29, Android does no longer allow the execution of binaries in the
App's data directories:

   https://github.com/termux/termux-packages/wiki/Termux-and-Android-10

This is a serious limitation. PilBox for example cannot load the executable
dynamically any more.

Instead, all binary executables must be in the signed APK.


'mk.pilBox' takes care of that. The release in PilBox.tgz containes all binary
files in a directory "bin/lib/arm64-v8a/". These files get packed into the APK
and will be accessed in PilBox at runtime with

   getApplicationInfo().nativeLibraryDir

But they cannot be executed from there, and also not copied into "~/bin/" (as
they can no longer be executed), so PilBox builds symbolic links to the files.

At runtime, the PilBox REPL shows something like:

   $ ls -l bin/
   total 16
   lrwxrwxrwx 1 u0_a282 u0_a282 86 2020-10-31 09:59 picolisp -> 
/data/app/de.software_lab.pilbox-Lub27Bh3f4PBSKXgFhyugQ==/lib/arm64/libpicolisp.so
   lrwxrwxrwx 1 u0_a282 u0_a282 82 2020-10-31 09:59 ssl -> 
/data/app/de.software_lab.pilbox-Lub27Bh3f4PBSKXgFhyugQ==/lib/arm64/libssl.so


/mk.pilBox should set up everything correctly.

I'm not sure what went wrong in your case. It may be that for some reason PilBox
cannot delete the old "bin/picolisp" and create the new symbolic link.

Perhaps it helps if you uninstall PilBox and then re-install the new APK?

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to