Skip to content

feat: target arm64-only and adopt proroot backend - #3

Merged
NiDrZero merged 1 commit into
mainfrom
arm64-proroot-baseline
Jul 24, 2026
Merged

feat: target arm64-only and adopt proroot backend#3
NiDrZero merged 1 commit into
mainfrom
arm64-proroot-baseline

Conversation

@NiDrZero

Copy link
Copy Markdown
Owner

Summary

Two coordinated changes, per the approved plan:

  1. Trim to arm64-v8a only (Snapdragon / modern 64-bit ARM) and raise the Android floor.
  2. Replace the proot backend with proroot — a drop-in, proot-compatible launcher with zero ptrace overhead.

ABI trim

  • app/build.gradle.kts: add ndk { abiFilters += "arm64-v8a" }; raise minSdk 21 → 26
  • core + proot-plugin: raise minSdk 21 → 26 (compileSdk/targetSdk stay 36)
  • iTermuxBootstrapResolver.defaultVariants(): reduced to arm64-v8a only
  • Dropped armeabi-v7a and x86_64 — proroot ships an arm64-v8a launcher exclusively. This also drops x86_64 emulator support (intentional).

proroot backend

  • :proot-plugin default launcher is now libproroot.so (was proot)
  • Injects PROROOT_TMP_DIR (app files dir) into the session environment
  • Keeps proot-compatible flags (--link2symlink, -0)
  • New app/src/main/jniLibs/arm64-v8a/ with a README. The five proroot .so files are fetched from proroot Releases, not committed (gitignored) — consistent with the no-committed-payloads policy.

Docs

AUDIT.md (ABI matrix + proroot section), docs/upstream-sync.md (proroot as a binary-dependency upstream), AGENTS.md (proot review section), README.md (module + ABI notes).

Verification (local, JDK 17 + SDK 36)

  • :app:compileDebugKotlin, :proot-plugin:compileDebugKotlinpass
  • :app:assembleDebugAPK produced; badging: com.nidrzero.atomux, label Atomux, SDK 36
  • abiFilters proven: dropped dummy .so into both arm64-v8a and x86_64 — only lib/arm64-v8a/ was packaged
  • Updated tests (resolver arm64, assets arm64, new UNSUPPORTED_ABI case) — pass

Note on local test failures

5 session tests (4 in :core, 1 in :proot-plugin) require preserved file executable bits to reach a RUNNING/started runtime state. They fail only in the ephemeral build sandbox (verified identical on clean main) and pass in remote CI, which preserves exec bits. The CI check on this PR is the authoritative signal.

Constraints honored

No force-push, main untouched. Branched from main; opened as its own PR.

Follow-up (not in this PR)

A real arm64-v8a bootstrap payload and the proroot .so set still need to be supplied before an on-device cold start works.

Trim the app to 64-bit ARM (Snapdragon / arm64-v8a) and replace the proot
launcher with proroot (coderredlab/proroot), a drop-in proot-compatible
launcher with zero ptrace overhead.

ABI trim:
- app: add ndk abiFilters = [arm64-v8a]; raise minSdk 21 -> 26
- core, proot-plugin: raise minSdk 21 -> 26
- BootstrapResolver.defaultVariants() reduced to arm64-v8a only; armeabi-v7a
  and x86_64 intentionally dropped (proroot ships arm64-v8a only)

proroot backend:
- proot-plugin default launcher is now libproroot.so (was proot)
- inject PROROOT_TMP_DIR (app files dir) into the session environment
- keep proot-compatible flags (--link2symlink, -0)
- add app/src/main/jniLibs/arm64-v8a/ with a README; .so files are fetched
  from proroot Releases, not committed (gitignored)

Docs: AUDIT.md ABI matrix + proroot section, upstream-sync.md proroot upstream,
AGENTS.md proot section, README module + ABI notes.

Tests: resolver/assets updated to arm64-only expectations, plus an
UNSUPPORTED_ABI test for dropped ABIs; proot-plugin test updated to proroot
launcher/backend/PROROOT_TMP_DIR.

Verified locally (JDK 17, SDK 36): compile + assembleDebug succeed; abiFilters
proven to package arm64-v8a only. The 5 core/proot session tests that require
preserved executable bits fail only in this sandbox (identical on main) and
pass in remote CI.
@NiDrZero
NiDrZero merged commit a1ef073 into main Jul 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant