Repository navigation
Replies: 1 comment
|
Status update from the requester: I couldn't leave the app blocked on this, so the fallback is now shipped and verified. My CI builds platform-tagged Still very happy to contribute a mobile-forge recipe — I have a ready bundle ( |
Uh oh!
There was an error while loading. Please reload this page.
What I'm building: a Flet Android app that wraps upstream proot-distro v5.x to run Debian/Ubuntu/Alpine — any Docker/OCI image — on phones, with an interactive shell via my
flet-terminalcontrol, and no Termux layer. proot-distro is now pure Python (proot-distroon PyPI,py3-none-any, zero runtime dependencies), so the app's only dependency outside the usual flet set is theprootbinary itself. Today that binary only ships through Termux — which is exactly the layer this app removes.Why it can't ride in as a normal data file: since Android 10, apps targeting API ≥ 29 cannot
execve()binaries in app-data dirs (W^X / SELinuxapp_data_filerule). The only sanctioned exec path for non-Play-update code is the APK native library directory, so the binary must land inlib/arm64-v8a/at build time. This is exactly what Play Store Termux and UserLAnd do in production today.The request: a mobile-forge recipe (e.g.
flet-proot) cross-building the Termux proot fork for Android:opt/lib/libproot.so,opt/lib/libproot-loader.so(the unbundled loader,PROOT_UNBUNDLE_LOADER),opt/lib/libtalloc.so,opt/lib/libandroid-shmem.so— the existingcopyOpt_<abi>step (opt/**/*.so→ jniLibs) then does the rest, exactly likeflet-libmagic/flet-libffmpegdo for their shared libs.arm64-v8a+x86_64primary (armeabi-v7a welcome; ARMv9 cores dropped 32-bit EL0).termux/prootv5.1.107.96 (GPL-2.0); build flags verified fromtermux-packages/packages/proot/build.sh:PROOT_WITH_LIBANDROID_SHMEM=true,PROOT_UNBUNDLE_LOADER=.../libexec/proot, depslibtalloc(GPL-3.0) +libandroid-shmem. Prebuilt ARM.debs exist atpackages.termux.dev/apt/termux-main/pool/main/p/proot/.I've verified the app side already works with
[tool.flet.android].legacy_packaging = true(extracts.sofiles tonativeLibraryDir, exposed to Python asANDROID_NATIVE_LIBRARY_DIR), and proot's own loader mmaps guest binaries (mmapPROT_EXECof app-data files remains allowed), soapt installinside the container should work at targetSdk 36 — pending on-device verification, which I can do and report back.Is this acceptable for pypi.flet.dev / mobile-forge? Happy to open the recipe issue there and/or contribute the
build.shplus test builds. The fallback if it's out of scope: I publish platform-tagged wheels from my own CI — but the official forge makes it a clean one-line dependency for every Flet app that wants a real Linux userspace on Android.All reactions