Skip to content

Android app sandbox (Termux, run-as): every program mcpp starts fails with ENOENT since 2026.10.26.2 #857

Closed
mcpplibs/mcpp-index
#628

Description

@Sunrisepeak

What fails

ci-fresh-install's Termux app sandbox (Android 14 emulator, x86_64) job has failed on every release since 2026.10.26.2. The Termux userland job (termux-docker, aarch64) passes, and so did the app-sandbox job through 2026.10.26.1.

run release app sandbox x86_64
40261988787 (2026-10-26) 2026.10.26.1 success
40499379345 (2026-10-27) 2026.10.26.2 failure
40687914136 (2026-10-28) 2026.10.27.1 failure
40760863757 (2026-10-28) 2026.10.28.1 failure

In each failed run, mcpp itself starts from the app's home under run-as com.termux (SELinux u:r:runas_app). Every program it then starts fails with ENOENT, even though the file is present in the extracted release (registry/bin/xlings, a static ELF):

mcpp 2026.10.28.1
  Initialize mcpp sandbox layout (one-time)
cannot start '/data/data/com.termux/files/home/dist/mcpp-2026.10.28.1-linux-x86_64/registry/bin/xlings' (error 2): No such file or directory
warning: `xlings self init` failed for sandbox at '…/registry'
…
error: the provider's environment is not initialized
FAIL: the program did not print 'hello from termux'

What changed at 2026.10.26.2

2026.10.26.2 moved mcpp onto mcpplibs.os 0.2.0, which reaches the process API through openkal-linux 0.18.2. openkal-linux starts a program with execveat on a descriptor of its directory. It switches to execve with an absolute name only under a recognised translator (PRoot) or after an ENOSYS (src/process.cpp, "where execveat cannot be used"). Before 2026.10.26.2, mcpp started programs through its own platform layer.

The hypothesis is that in the Android app domain, execveat on the directory descriptor fails with ENOENT where execve of the same absolute name succeeds. It is not yet measured: it needs the emulator job, or a probe that runs both calls under run-as.

To settle

  • A probe in the emulator job: execveat(dirfd, "xlings", …) and execve("/…/registry/bin/xlings", …) from a static test program under run-as com.termux, with errno and the SELinux audit lines (logcat -b events | grep avc).
  • If confirmed, openkal-linux falls back to execve with the absolute name on that errno as it does on ENOSYS, and the fix moves through the openkal family to mcpplibs.os and mcpp.

Activity

  1. added 5 commits that reference this issue on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions