Cortex Release v1.29.4
Fixed
- Installing python3 (and so the desktop) failed before Android 12 with "Bad system call" in
python3-minimal's set-up (py3compile). Python 3.13 and newer start a subprocess with
posix_spawn()and a "close the other descriptors" action, which glibc's spawn child carries out
with theclose_rangesystem call after it has set every signal handler back to the default:
Android's seccomp filter lets apps make that call only from Android 12 on, so the child was
killed. Where the call is refused, the hook now gives the child one close action for each
descriptor that is open instead. - A long path could delete or overwrite another file. Every Ubuntu path is made an Android
path by putting the rootfs directory in front of it. When that no longer fit in PATH_MAX, the
result was cut short, and a shorter name was used:rmof a long name that did not exist removed
a file whose name began the same way, and a write went into that file. Such a path is now refused
with "File name too long" (ENAMETOOLONG), as Linux refuses one that is too long. - Python's multiprocessing failed (
Lock(),Queue(),Pool,ProcessPoolExecutor,
shared_memory) with "FileNotFoundError" at its first lock. glibc keeps POSIX shared memory and
named semaphores (shm_open,sem_open) in /dev/shm, which it opens from inside itself, and
Android has none. They are now files of the rootfs's /dev/shm. - Every service name was port 80 without /etc/services (it comes with netbase, which the
bootstrap does not have):getaddrinfo(host, "ssh")connected to port 80, and a name that does
not exist did as well. Cortex now knows the common services (ssh, smtp, imaps, postgresql, mysql,
redis…) without the file, answers an unknown one with an error as glibc does, and
getnameinfo()gives a port's name ("ssh", not "22"). ps,topandpgrepshowed every process as root's:ps -u USERandpgrep -u USER
found nothing. A process's /proc directory and the Uid/Gid lines of its status file now give the
user it runs as.vmstat 1andtoprepeated their first sample: they keep /proc/stat and /proc/vmstat open
and read them again from the start, and the files Cortex makes for them (Android hides them) did
not change. They are made again when read from the start.locale-gensaid "done", yet the locale was missing ("setlocale: cannot change locale"):
it stores locales in /usr/lib/locale/locale-archive, which glibc never reads in Cortex (it finds
them through LOCPATH). Cortex'slocaledefnow makes each locale a directory of its own. Run
sudo locale-genonce more for a locale made before.- No man pages: Ubuntu's minimal image drops /usr/share/man when packages are installed. They
are kept now for the packages installed from here on (sudo apt install --reinstall PACKAGE
brings the pages of one installed before). - The NDK's own linux-arm64 tools (clang, lld, llvm-*) did not start with "relinterp: unable to
find loader libc_musl.so in rpath $ORIGIN…" (#90). They are musl programs that find their loader
next to themselves, through /proc/self/exe, which names Cortex's program starter. They are now
given their library directories, and no longer Cortex's glibc hook (which their loader failed
on). Cortex's hook cannot be loaded into a musl program, so in these tools Ubuntu's paths are not
translated and the programs they start themselves (clang starting the linker) cannot be started;
Ubuntu's clang and lld with the NDK's sysroot do the whole build.
Known limitations
ssandipstill cannot list sockets, addresses or routes: they ask the kernel through
netlink, which Android does not let apps use.hostname -I,ifconfig-style programs that use
getifaddrs()and Python'ssocket.if_nameindex()work.
Downloads
Cortex-arm64-v8a-signed.apk: 64-bit ARM (almost all current phones)Cortex-armeabi-v7a-signed.apk: 32-bit ARM
SHA256SUMS.txt has the checksums. Each APK also has a build attestation: gh attestation verify Cortex-arm64-v8a-signed.apk --repo ssfuisu/cortex shows it was built by this repository's workflow from the tagged source.
How to verify a download: signing/README.md. All versions: CHANGELOG.md.