Skip to content

Instantly share code, notes, and snippets.

View Brajesh2022's full-sized avatar

Brajesh Brajesh2022

View GitHub Profile
@Brajesh2022
Brajesh2022 / codex_termux_setup.md
Last active May 22, 2026 21:15
OpenAI Codex CLI Termux Setup & Optimization Guide

Complete Termux Setup & Optimization Guide for OpenAI Codex CLI

This guide details how to install, optimize, and maintain the official OpenAI Codex CLI (@openai/codex) inside the Termux environment on Android.


🛠️ The Architecture & The Challenge

Statically compiled binaries (such as Codex CLI, which is written in Rust) compiled for standard Linux:

  1. Dynamic Linker Differences: Standard Linux binaries depend on glibc, whereas Android/Termux utilizes bionic libc.
@Brajesh2022
Brajesh2022 / Running Antigravity CLI on Termux.md
Last active May 22, 2026 23:14
Working setup for running Antigravity CLI (agy) natively on Android Termux without proot-distro, VMs, or Cloud Shell. Fixes 7 compatibility issues: TCMalloc 39-bit VA, faccessat2 syscall, glibc libc.so shim, LD_PRELOAD pollution, DNS resolver, TLS certificates, and shell hash caching. Includes a reusable pattern-based binary patch script (patch_…

This document describes the working setup for running the native Antigravity CLI (agy) on Android Termux.

The main goal is to run the official Linux ARM64 Antigravity binary directly from Termux without Cloud Shell, without a full VM, and without replacing Android. The setup uses a small binary patch plus a wrapper that adapts the Linux/glibc binary to Termux's Android environment.

The method is designed to be repeatable for future Antigravity releases. The patch script scans instruction patterns instead of relying on fixed offsets. If Antigravity changes its allocator code generation in the future, the script will print warning counts instead of silently claiming success.

What This Fixes

Antigravity's Linux ARM64 binary can fail on Termux for multiple independent reasons.