mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-04-21 02:35:46 +00:00
3.3 KiB
3.3 KiB
MeshChatX Android App
This directory contains the Android app build configuration using Chaquopy to embed the Python MeshChatX server.
Architecture
The app uses a WebView to display the existing Vue.js frontend. The Python server runs in the background via Chaquopy and serves the web interface on https://127.0.0.1:8000.
Updating Android Python ABI Wheels (Python 3.11)
Use this workflow when a dependency (for example cryptography) requires custom Android wheels for arm64-v8a and x86_64.
- Build wheels in a Podman Python 3.11 container to avoid host Python mismatches:
- Use
docker.io/library/python:3.11-bookworm. - Mount project root to
/workand Android SDK to/opt/android-sdk. - Export
ANDROID_HOMEandANDROID_SDK_ROOTto/opt/android-sdk. - Example container entry:
podman run --rm --network host -e ANDROID_HOME=/opt/android-sdk -e ANDROID_SDK_ROOT=/opt/android-sdk -v "/opt/android-sdk:/opt/android-sdk" -v "<repo>:/work" -w /work docker.io/library/python:3.11-bookworm bash
- Use
- Keep custom Chaquopy recipes in
android/chaquopy-recipes/<package>-<major>/:- Define package/version in
meta.yaml. - Store source patches in
patches/.
- Define package/version in
- Build both ABIs with Chaquopy
build-wheel.pyand place final wheels inandroid/vendor/. - Update
android/app/build.gradlepipinstalls to the new pinned version. - Rebuild with
./gradlew assembleDebugand verify split outputs:app-arm64-v8a-debug.apkapp-x86_64-debug.apkapp-universal-debug.apk
Notes:
- For Rust-backed wheels (such as modern
cryptography), build inside the container with Rust toolchain available. - Keep recipe files and patches versioned; keep generated build artifacts untracked.
Custom Recipes and Patches
This project keeps Android-specific Chaquopy recipes in android/chaquopy-recipes/ to bridge gaps between desktop Python dependencies and Android wheel availability.
-
cryptography-46- Purpose: provide Android ABI wheels for
cryptography 46.0.7(arm64-v8a,x86_64) because upstream Chaquopy index only provided older builds. patches/openssl_no_legacy.patch: disables OpenSSL legacy provider loading, which is unavailable in the bundled Android OpenSSL runtime.patches/pyo3_no_interpreter.patch: enables compatiblepyo3ABI settings for Chaquopy Python 3.11 Android builds.
- Purpose: provide Android ABI wheels for
-
aiohttp-3.13- Purpose: align Android with desktop dependency line (
aiohttp 3.13.3) by building fresh ABI wheels with Chaquopy. - No source patch is required; recipe pins the newer upstream version for Android wheel generation.
- Purpose: align Android with desktop dependency line (
-
psutil-7.2- Purpose: align Android with desktop dependency line (
psutil 7.2.2) while preserving Android runtime behavior. patches/chaquopy.patch: treatsandroidplatform as Linux in psutil internals and forces a safe partition enumeration path because/proc/filesystemscan be restricted by SELinux on some Android API levels.
- Purpose: align Android with desktop dependency line (
-
bcrypt-5- Purpose: tracks attempted upgrade path to desktop-equivalent bcrypt.
- Status: currently not enabled in Android app dependencies;
bcrypt==3.1.7remains pinned for stable APK builds.
License
This directory is part of the main project licensing split:
- project-owned portions: 0BSD
- original upstream MeshChat portions: MIT
See ../LICENSE for full text and notices.