Repository navigation
Releases: ssfuisu/cortex
Release list
Cortex Release v1.26.34
Cortex Release v1.26.34
New
- Root mode. On a rooted phone (Magisk, KernelSU or APatch), Settings > Root mode runs new
sessions as real root in a chroot of the same Ubuntu files that normal sessions use, with nothing
translated or emulated: statically linked Go programs,mount, realchown, hard links,
set-user-ID programs such assudofor other users, services that switch users and ports below
1024 work as on a Linux PC. The switch first checks
that su gives root and that the chroot can be set up (with an animation), and stays on across
restarts until it is turned off. Each root session gets its own/proc,/sys,/devand
/sdcardmounts, which nothing outside the session sees. In root modesuis Ubuntu's own su
andsudoruns the command directly. Root sessions are marked ROOT in the session list.
Turning root mode off closes them and gives the files created as root back to the app, so that
normal sessions can change them again.
Good to know
- While root mode is on, normal sessions that are still open cannot change files created as root.
- When root mode is turned off, every file belongs to the app again: owners set in root mode (for
example a database directory owned bypostgres) have to be set again in the next root session. - systemd still cannot run as the init system, and Android commands such as
amare not inside the
chroot.
For developers
app/src/main/cpp/root/cortex-chroot.cis root mode's helper (a static executable run through
su);tests/root/test_cortex_chroot.shtests it with real mounts in CI.
Downloads
Cortex-arm64-v8a-signed.apk: 64-bit ARM (almost all current phones)Cortex-armeabi-v7a-signed.apk: 32-bit ARM
How to verify a download: signing/README.md. All versions: CHANGELOG.md.
Cortex Release v1.26.33
Cortex Release v1.26.33
New
- Statically linked programs run. Programs built with
gcc -static(and other static glibc
programs) used to be killed at start by Android's seccomp filter, because their own copy of the C
library makes system calls Android forbids for apps (set_robust_listat start-up,clone3for
every thread,rseq, theset*idfamily and calls newer than the filter). Before such a program
starts for the first time, Cortex now patches those calls in its file to the answers it already
gives dynamically linked programs (success, or "not supported", from which the C library falls
back). The file keeps its times and mode, and is not touched again. Go programs are left alone:
they never make these calls, but since they bypass the C library they still do not see Ubuntu's
files such as/etc/resolv.conf. - Lines rewrap when the width changes. Turning the phone or changing the font size used to leave
long lines broken in the middle (wider screen) or cut off (narrower screen). The scrollback and the
screen are now rewrapped for the new width, with their colours and links. The cursor keeps its
place, the top of the screen stays where it was (a cleared screen is not refilled), and full-screen
programs redraw themselves as before. Showing or hiding the keyboard works as it did. - IPv6-only networks. On networks that give only IPv6 DNS servers (some mobile networks), those
servers are now used for name resolution. Cortex's fallback resolver also asks for IPv6 addresses
when a program wants one, uses IPv6 DNS servers, and DNS queries sent to::1are redirected like
those sent to127.0.0.1.
Improved
- Faster drawing. The terminal draws a row in runs of characters with the same colour and style
instead of one character at a time (about 5000 drawing calls per frame on a full phone screen
before). Other characters than plain ASCII are still drawn one by one, so they stay in their cells. - Hard links. Android does not let apps create hard links, so Cortex copies the file instead and
makes the copies look linked. All names of one file now report the same inode number and the real
number of names as their link count (it was always 2), a relative name and an absolute name of a
file are recognised as the same file, a copy keeps the times of the original, and a process can
make any number of links (after 128, earlier ones were lost). - Name resolution. When glibc finds no address, Cortex's own lookup now returns both IPv4 and
IPv6 addresses to programs that accept either, stops at the first server that says a name does not
exist (it used to send the name on to the other servers and the public resolvers), no longer turns
a numeric-only lookup (AI_NUMERICHOST) into a DNS query, looks service names such assshup in
/etc/services, and keeps glibc's error ("try again later" or "no such name") when it finds
nothing either. It also reads compressed names in replies correctly (lookups behind a CNAME could
fail) and only accepts replies from the server it asked.
Fixed
- Security: where the kernel or Android's filter has no
openat2(), opening a file with
RESOLVE_BENEATHorRESOLVE_NO_SYMLINKSignored those limits for symbolic links inside the path.
Such calls now report "not supported", so programs such as GNU tar check the path themselves. mknod()of a regular file emptied an existing file instead of failing, and a mode without a file
type created nothing.getgrouplist()reported success when the caller's buffer was too small.- Binding a Unix socket with only the address family (autobind) could bind to a random path.
- Spaces in underlined text were drawn without their underline.
res_init()replaced a resolver configuration that only lists IPv6 servers with IPv4 servers.rename()over an emulated hard link left the replaced file counted as a link.
For developers
app/src/main/cpp/cortex-hook.cis split into parts by topic inapp/src/main/cpp/hook/
(paths, files, exec, static programs, net, ...). It is still built as one file with the same
commands; the compiled code was checked to be identical for arm64, armhf and x86-64.BootstrapManagerlogs every failure it used to swallow silently (60 places).- The notes of a GitHub release now come from this file.
Downloads
Cortex-arm64-v8a-signed.apk: 64-bit ARM (almost all current phones)Cortex-armeabi-v7a-signed.apk: 32-bit ARM
How to verify a download: signing/README.md. All versions: CHANGELOG.md.
Cortex Release v1.26.32
Cortex Release v1.26.32
Cortex turns your Android device into a complete, native development powerhouse powered by Ubuntu 24.04 LTS (Noble Numbat) and Glibc 2.39 — with ZERO virtualization, ZERO PRoot, and ZERO containers.
Features & Assets:
- Ultra-compact APK size with genuine Glibc 2.39 & Ubuntu 24.04 runtime.
- Native OpenCode, Meta Muse Code, and OpenJDK 17 support.
- High-speed native terminal emulator with hardware acceleration.
Included Packages & Assets:
Cortex-arm64-v8a-signed.apk(64-bit ARM)Cortex-armeabi-v7a-signed.apk(32-bit ARM)
Cortex Release v1.26.31
What's new in v1.26.31
Compiling works
apt install build-essential(andg++,libtool,python3-dev,zlib1g-dev,libsqlite3-dev,clang,gfortran,rustcand every other-devpackage) failed with "held broken packages", andgcccould not compile anything because the C library headers were missing. The patched glibc that Cortex pins keeps Ubuntu'slibc6-devout, so the app now bringslibc6-dev,libc-dev-bin,libcrypt-dev,linux-libc-devandrpcsvc-protoitself (stock Ubuntu packages, recorded in dpkg's database). They are unpacked at the first start, on a fresh install and on an existing one (about 17 MB; the APK grows by about 4 MB).makecrashed with "Bad system call" as soon as it ran a recipe (it asksposix_spawn()to reset the user ids, which Android's seccomp filter kills). Fixed in the preloaded library.make -j4builds Lua 5.4.7 in 8 s.- The
libc6*pin also blocked about 200libc6-*-crosspackages; it now nameslibc6,libc6-devandlibc6-dbgonly, socrossbuild-essential-armhfinstalls too.libc6andlibc-binstay at the version Cortex ships, andapt upgradeleaves them alone. - Checked on a phone:
apt install build-essentialworks; C, C++17 (threads, regex),make, shared libraries withdlopen, cmake + ninja, autotools, OpenSSL/zlib via pkg-config, Python C extensions. Of 50 common packages 35 could be installed before and 45 can now, none got worse. - Limits: statically linked programs (
gcc -static) are killed at start by Android's seccomp filter, so link dynamically.localesstill cannot be installed (its locale archive is not readable through the preloaded library) andvalgrindneedslibc6-dbg. The 32-bit (armeabi-v7a) build is compiled and its packages are checked in CI but not run on a device.
Also in this release, from v1.26.30 (a pre-release as well): cheaper file-path calls and program starts (stat() +18% -> +3% over a call without Cortex, fopen +12% -> +3%, a missing command in PATH +140% -> +8%), terminal output that scrolls about 3x faster in a test of the emulator, scripts and Android programs started with posix_spawn no longer crash, ls -l prints no stray errors, xz -T2 and up honours the compression level, #! loops fail with ELOOP instead of crashing. Details in the README's Performance section.
Signing and updating: the first releases signed with the rotated key (see signing/README.md). Android 13 and newer take the new key, Android 12 and older keep seeing the original one. Checked: both APKs verify (v2, v3, v3.1); clean installs on an Android 12 phone start, unpack the runtime and the C development packages. Not yet tried on a device: updating an installed copy in place, and any update on Android 13 or newer. That is why this is a pre-release for now; the in-app updater does not offer it.
Cortex Release v1.26.31
Cortex turns your Android device into a complete, native development powerhouse powered by Ubuntu 24.04 LTS (Noble Numbat) and Glibc 2.39 — with ZERO virtualization, ZERO PRoot, and ZERO containers.
Features & Assets:
- Ultra-compact APK size with genuine Glibc 2.39 & Ubuntu 24.04 runtime.
- Native OpenCode, Meta Muse Code, and OpenJDK 17 support.
- High-speed native terminal emulator with hardware acceleration.
Included Packages & Assets:
Cortex-arm64-v8a-signed.apk(64-bit ARM)Cortex-armeabi-v7a-signed.apk(32-bit ARM)
Cortex Release v1.26.29
What's new in v1.26.29
Terminal integration (plain escape sequences, no extra permissions)
- Clipboard (OSC 52):
tmux,vimandsshsessions can copy text to the Android clipboard. Write-only; programs can never read your clipboard. Switchable in Settings. - Long command notifications: a command that runs longer than 15 s / 30 s / 1 min / 5 min and finishes while Cortex is in the background posts a notification with its duration and exit status.
- Hyperlinks (OSC 8): links printed by tools such as
ls --hyperlink=autoare underlined; tap to copy.
cortex-backup – back up and restore your home directory (cortex-backup, cortex-backup restore FILE, cortex-backup list).
Files app – the Cortex home directory appears as "Cortex" in Android's Files app and file pickers (home only; switchable in Settings).
50 languages – the interface follows the system language; Settings > Language lets you pick one of 50. The translations were produced with machine assistance and are not yet reviewed by native speakers; corrections are welcome (app/src/main/res/values-<code>/strings.xml).
Also includes v1.26.28 (relative-path scripts fix, simpler sessions drawer) and v1.26.27 (Ubuntu-standard ~/.bashrc, automatic reload, fixes for #10).
Cortex Release v1.26.29
Cortex turns your Android device into a complete, native development powerhouse powered by Ubuntu 24.04 LTS (Noble Numbat) and Glibc 2.39 — with ZERO virtualization, ZERO PRoot, and ZERO containers.
Features & Assets:
- Ultra-compact APK size with genuine Glibc 2.39 & Ubuntu 24.04 runtime.
- Native OpenCode, Meta Muse Code, and OpenJDK 17 support.
- High-speed native terminal emulator with hardware acceleration.
Included Packages & Assets:
Cortex-arm64-v8a-signed.apk(64-bit ARM)Cortex-armeabi-v7a-signed.apk(32-bit ARM)
Cortex Release v1.26.28
What's new in v1.26.28
Fix: scripts started by relative path failed with bad interpreter
./script.sh(#!/bin/bashor#!/usr/bin/env bash) failed withbad interpreter: No such file or directory, whilebash script.shor an absolute path worked; scripts that call other scripts the same way broke too (seen with Bazel builds). Relative paths are now routed like absolute ones, so notermux-fix-shebang-style rewriting is needed.$0stays./script.sh.
Sessions drawer
- The title is just "Sessions" (no
[1/1]counter). - Session rows no longer show the "Active session" / "Background" line; the active session keeps its highlighted background.
- KEYBOARD and + NEW SESSION are the same size and use the same style.
v1.26.27 changes (Ubuntu-standard ~/.bashrc / ~/.profile, automatic reload after installers, fixes for #10) are included.
Cortex Release v1.26.28
Cortex turns your Android device into a complete, native development powerhouse powered by Ubuntu 24.04 LTS (Noble Numbat) and Glibc 2.39 — with ZERO virtualization, ZERO PRoot, and ZERO containers.
Features & Assets:
- Ultra-compact APK size with genuine Glibc 2.39 & Ubuntu 24.04 runtime.
- Native OpenCode, Meta Muse Code, and OpenJDK 17 support.
- High-speed native terminal emulator with hardware acceleration.
Included Packages & Assets:
Cortex-arm64-v8a-signed.apk(64-bit ARM)Cortex-armeabi-v7a-signed.apk(32-bit ARM)
Cortex Release v1.26.27
What's new in v1.26.27
Shell startup now works like stock Ubuntu 24.04
~/.profileand~/.bashrcare your own files again: created once from/etc/skel, never rewritten by the app. Older releases rewrote them on every start, which raced with installers (nvm, bun, rustup, opencode, ...) and removed theirPATHlines. Existing files are migrated automatically; only what the app itself had injected is removed, everything you or an installer added is kept.- Cortex's own environment moved to
/etc/profile.d(00-env.sh,01cortex.sh,02-cortex-shell.sh) with a de-duplicatedPATH;SHELL=/bin/bashis exported like on a real login. - Automatic reload: when an installer changes
~/.bashrc,~/.profileor~/.bash_profile, the running shell re-sources it at the next prompt -nvm,opencode& co. work right after installing, no terminal restart.reloadstill works;export CORTEX_AUTO_RELOAD=0turns it off.
Fixes for #10
- opencode worked after one restart and not after the second: a startup step stripped
/home/.opencode/bin:out of~/.bashrc, which also matched the installer's absolute path and corrupted the line. Fixed, and already-corrupted lines are repaired. - The cleanup of old auto-installer wrappers could delete the real
opencodebinary (it contains the textopencode.ai). It now only removes small wrapper scripts. - "Extracting base system..." could stay on screen forever (error in the extraction thread, or a second extraction started after the activity was re-created). Extraction is now single-flight and always dismisses the dialog.
Cortex Release v1.26.27
Cortex turns your Android device into a complete, native development powerhouse powered by Ubuntu 24.04 LTS (Noble Numbat) and Glibc 2.39 — with ZERO virtualization, ZERO PRoot, and ZERO containers.
Features & Assets:
- Ultra-compact APK size with genuine Glibc 2.39 & Ubuntu 24.04 runtime.
- Native OpenCode, Meta Muse Code, and OpenJDK 17 support.
- High-speed native terminal emulator with hardware acceleration.
Included Packages & Assets:
Cortex-arm64-v8a-signed.apk(64-bit ARM)Cortex-armeabi-v7a-signed.apk(32-bit ARM)
Cortex Release v1.25.26
Cortex Release v1.25.26
Cortex turns your Android device into a complete, native development powerhouse powered by Ubuntu 24.04 LTS (Noble Numbat) and Glibc 2.39 — with ZERO virtualization, ZERO PRoot, and ZERO containers.
Features & Assets:
- Ultra-compact APK size with genuine Glibc 2.39 & Ubuntu 24.04 runtime.
- Native OpenCode, Meta Muse Code, and OpenJDK 17 support.
- High-speed native terminal emulator with hardware acceleration.
Included Packages & Assets:
Cortex-arm64-v8a-signed.apk(64-bit ARM)Cortex-armeabi-v7a-signed.apk(32-bit ARM)
Cortex Release v1.25.24
Cortex Release v1.25.24 — 100% Zero-Warning APT Update & Clean Session Drawer UI
Cortex turns your Android device into a complete, native development powerhouse powered by Ubuntu 24.04 LTS (Noble Numbat) and Glibc 2.39 — with ZERO virtualization, ZERO PRoot, and ZERO containers.
What's New in v1.25.24:
- 100% Elimination of APT Signature Verification Warnings & Notices:
- Fully resolved
NO_PUBKEY 871920D1991BC93Cby fixingfaccessatandaccesslibc hooks to ensuregpgvexecution and/usr/share/keyrings/ubuntu-archive-keyring.gpgreadability. - Restored standard deb822
Signed-Bydirective inubuntu.sourcesto permanently eradicateN: Missing Signed-Bynotices. apt updatenow completes with 0 warnings, 0 notices, and 0 errors across all Ubuntu noble repositories.
- Fully resolved
- Critical Fix for File Deletion / Temporary Directory Cleanup:
- Eliminated infinite recursion in
unlink_mapped_unix_socketwhen unlinking long-path temporary directories in unprivileged Android storage.
- Eliminated infinite recursion in
- Navigation Drawer UI Polish:
- Removed the blue vertical indicator bar to the left of the active session in the drawer menu for a cleaner, unified layout.
- Preserved All Features & Compact Footprint:
- Ultra-compact ~75 MB APK size with genuine Glibc 2.39 & Ubuntu 24.04 runtime.
- Native OpenCode, Meta Muse Code, and OpenJDK 17 support.
Included Packages & Assets:
Cortex-arm64-v8a-signed.apk(64-bit ARM, ~75 MB)Cortex-armeabi-v7a-signed.apk(32-bit ARM, ~64 MB)