Skip to content

Releases: ssfuisu/cortex

Cortex Release v1.26.34

Choose a tag to compare

@github-actions github-actions released this 20 Oct 16:12
8234258

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, real chown, hard links,
    set-user-ID programs such as sudo for 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, /dev and
    /sdcard mounts, which nothing outside the session sees. In root mode su is Ubuntu's own su
    and sudo runs 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 by postgres) have to be set again in the next root session.
  • systemd still cannot run as the init system, and Android commands such as am are not inside the
    chroot.

For developers

  • app/src/main/cpp/root/cortex-chroot.c is root mode's helper (a static executable run through
    su); tests/root/test_cortex_chroot.sh tests 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

Choose a tag to compare

@github-actions github-actions released this 19 Oct 16:49
31560e1

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_list at start-up, clone3 for
    every thread, rseq, the set*id family 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 ::1 are redirected like
    those sent to 127.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 as ssh up 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_BENEATH or RESOLVE_NO_SYMLINKS ignored 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.c is split into parts by topic in app/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.
  • BootstrapManager logs 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

Choose a tag to compare

@github-actions github-actions released this 19 Oct 15:18
ee8ef37

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

Choose a tag to compare

@github-actions github-actions released this 17 Oct 15:29
70acef9

What's new in v1.26.31

Compiling works

  • apt install build-essential (and g++, libtool, python3-dev, zlib1g-dev, libsqlite3-dev, clang, gfortran, rustc and every other -dev package) failed with "held broken packages", and gcc could not compile anything because the C library headers were missing. The patched glibc that Cortex pins keeps Ubuntu's libc6-dev out, so the app now brings libc6-dev, libc-dev-bin, libcrypt-dev, linux-libc-dev and rpcsvc-proto itself (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).
  • make crashed with "Bad system call" as soon as it ran a recipe (it asks posix_spawn() to reset the user ids, which Android's seccomp filter kills). Fixed in the preloaded library. make -j4 builds Lua 5.4.7 in 8 s.
  • The libc6* pin also blocked about 200 libc6-*-cross packages; it now names libc6, libc6-dev and libc6-dbg only, so crossbuild-essential-armhf installs too. libc6 and libc-bin stay at the version Cortex ships, and apt upgrade leaves them alone.
  • Checked on a phone: apt install build-essential works; C, C++17 (threads, regex), make, shared libraries with dlopen, 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. locales still cannot be installed (its locale archive is not readable through the preloaded library) and valgrind needs libc6-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

Choose a tag to compare

@github-actions github-actions released this 16 Oct 21:32

What's new in v1.26.29

Terminal integration (plain escape sequences, no extra permissions)

  • Clipboard (OSC 52): tmux, vim and ssh sessions 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=auto are 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

Choose a tag to compare

@github-actions github-actions released this 16 Oct 20:17

What's new in v1.26.28

Fix: scripts started by relative path failed with bad interpreter

  • ./script.sh (#!/bin/bash or #!/usr/bin/env bash) failed with bad interpreter: No such file or directory, while bash script.sh or 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 no termux-fix-shebang-style rewriting is needed. $0 stays ./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

Choose a tag to compare

@github-actions github-actions released this 16 Oct 19:41

What's new in v1.26.27

Shell startup now works like stock Ubuntu 24.04

  • ~/.profile and ~/.bashrc are 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 their PATH lines. 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-duplicated PATH; SHELL=/bin/bash is exported like on a real login.
  • Automatic reload: when an installer changes ~/.bashrc, ~/.profile or ~/.bash_profile, the running shell re-sources it at the next prompt - nvm, opencode & co. work right after installing, no terminal restart. reload still works; export CORTEX_AUTO_RELOAD=0 turns 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 opencode binary (it contains the text opencode.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

Choose a tag to compare

@github-actions github-actions released this 10 Oct 08:41

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

Choose a tag to compare

@github-actions github-actions released this 05 Oct 06: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 871920D1991BC93C by fixing faccessat and access libc hooks to ensure gpgv execution and /usr/share/keyrings/ubuntu-archive-keyring.gpg readability.
    • Restored standard deb822 Signed-By directive in ubuntu.sources to permanently eradicate N: Missing Signed-By notices.
    • apt update now completes with 0 warnings, 0 notices, and 0 errors across all Ubuntu noble repositories.
  • Critical Fix for File Deletion / Temporary Directory Cleanup:
    • Eliminated infinite recursion in unlink_mapped_unix_socket when unlinking long-path temporary directories in unprivileged Android storage.
  • 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)