Skip to content

About

Run ZCode (GLM-5.3 AI coding IDE) on Android via Termux + proot Debian

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

ย 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ZCode Termux Logo

ZCode for Termux

The full GLM-5.3 AI coding IDE โ€” running natively on your Android phone.

Version ZCode Version GLM-5.3 Platform License

Quick Start ยท Features ยท How It Works ยท Environment Detection ยท Troubleshooting ยท Uninstall


๐Ÿ“ฑ What is this?

ZCode is the official harness for GLM-5.3 โ€” a full-featured AI coding IDE built on Electron (Chromium + Node.js) with multi-agent orchestration, skills, MCP server support, and deep GLM integration.

It ships for desktop only (macOS / Windows / Linux).

This repo turns the official Linux ARM64 .deb into a one-shot install that runs inside Termux on your Android phone via proot-distro + Debian + Termux:X11. No APK, no rooting, no compilation โ€” just clone and run.


๐Ÿš€ Quick Start

# 1. Install Termux from F-Droid (NOT Play Store โ€” that version is dead)
#    โ†’ https://f-droid.org/packages/com.termux/

# 2. Install git
pkg install git -y

# 3. Clone this repo
git clone https://github.com/NaustudentX18/zcode-termux.git
cd zcode-termux

# 4. Run the installer (takes 5-10 min)
bash install.sh

# 5. Launch ZCode
zcode

That's it. The installer auto-detects your device, configures everything, and drops a zcode command in your PATH plus a home-screen widget shortcut.


โœจ Features

Full ZCode IDE

  • GLM-5.3 AI agent with multi-task orchestration
  • Monaco code editor with syntax highlighting
  • Integrated terminal (bash)
  • Git integration (commit, diff, history)
  • File explorer with full project awareness
  • Extension marketplace access
  • Skills system with auto-loading

Mobile-Optimized

  • Touch targets โ€” all buttons enlarged to 44px minimum for finger taps
  • Wider scrollbars โ€” 16px drag handles for touch
  • Pinch-to-zoom enabled on the whole window
  • Scaled fonts โ€” auto-scaled based on your screen DPI
  • Virtual keyboard support in terminal and editor
  • Compact sidebar โ€” 56px activity bar for thumb reach
  • Gesture scrolling โ€” smooth momentum scroll

Environment-Aware

The installer runs a full device probe and writes a persistent config:

Detected Used For
Device model & brand Bug report context
Android version + SDK level Compatibility checks
CPU architecture & core count Process limit tuning
Total RAM Electron memory allocation (1.5GB โ†’ 4GB tiers)
Screen DPI UI scale factor + font size
GPU renderer (Adreno/Mali/PowerVR) GPU acceleration vs software rendering
Available storage Pre-flight check
Root status Diagnostic info

Pre-Installed Dev Stack

The Debian proot comes loaded with:

  • Node.js 20 LTS + npm + TypeScript + ts-node
  • Python 3 + pip + venv
  • Git with auto-fetch enabled
  • ripgrep, fd-find, bat, jq, htop โ€” modern CLI tools
  • clang, make, cmake, pkg-config โ€” build tools
  • MCP servers โ€” filesystem, git, fetch, memory

Pre-Configured Skills

10 skills auto-load on first launch:

Skill Trigger Keywords What It Does
Code Review "review", "code review" Severity-rated automated review
Git Master "commit", "git", "rebase" Atomic commits, rebases, history
TDD Mode "tdd", "test", "red-green" Test-first development loop
Architect "architect", "design", "plan" Architecture analysis (read-only)
Debugger "debug", "fix", "broken" Root-cause diagnosis loop
Refactor "refactor", "rename", "extract" Safe surgical refactoring
Security Scan "security", "vulnerability" OWASP Top 10 detection
Docs Generator "document", "readme", "docs" Auto-generate documentation
Deploy "deploy", "build", "ship" Build & deploy orchestration
Mobile Dev "mobile", "android", "termux" Termux/proot-aware dev context

๐Ÿ— How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Android (aarch64)                                  โ”‚
โ”‚                                                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  Termux (terminal emulator)                   โ”‚  โ”‚
โ”‚  โ”‚                                               โ”‚  โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  proot-distro โ†’ Debian ARM64 (chroot)    โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚                                         โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  ZCode (Electron)                  โ”‚  โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  โ”œโ”€โ”€ Chromium rendering engine     โ”‚  โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  โ”œโ”€โ”€ Node.js runtime               โ”‚  โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  โ”œโ”€โ”€ Monaco editor                 โ”‚  โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  โ”œโ”€โ”€ GLM-5.3 agent                 โ”‚  โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  โ”œโ”€โ”€ Skills (10 pre-loaded)        โ”‚  โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  โ”œโ”€โ”€ MCP servers (4 configured)    โ”‚  โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ”‚  โ””โ”€โ”€ Mobile touch CSS (injected)   โ”‚  โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚  โ”‚  โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚  โ”‚
โ”‚  โ”‚                                               โ”‚  โ”‚
โ”‚  โ”‚  Termux:X11 โ† display server ( Wayland )      โ”‚  โ”‚
โ”‚  โ”‚  PulseAudio โ† audio server                     โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

ZCode is an Electron app. Android can't run Electron natively (no desktop Chromium, no Node.js). This project bridges that gap by running a Debian ARM64 chroot inside Termux via proot-distro, installing the official Linux ARM64 .deb there, and launching it with Termux:X11 providing the display server.

No root required. proot uses ptrace to fake chroot without kernel privileges.


๐Ÿ” Environment Detection

When you run install.sh, it probes your device and generates a persistent config:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚        ENVIRONMENT DETECTION REPORT         โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ Device:        Samsung SM-S928B             โ”‚
โ”‚ Manufacturer:  samsung                       โ”‚
โ”‚ Android:       v14 (SDK 34)                 โ”‚
โ”‚ CPU:           aarch64 (8 cores)             โ”‚
โ”‚ RAM:           12288 MB                     โ”‚
โ”‚ Storage free:  84521 MB                     โ”‚
โ”‚ Screen DPI:    480                           โ”‚
โ”‚ Rooted:        false                        โ”‚
โ”‚ Termux prefix: /data/data/com.termux/...    โ”‚
โ”‚ proot-distro:  true                          โ”‚
โ”‚ Debian proot:  false                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

This config drives:

  • Memory tiers โ€” 4GB / 6GB / 8GB+ RAM each get different Electron heap limits and renderer process counts
  • GPU flags โ€” Adreno/Mali/PowerVR get hardware acceleration; unknown GPUs fall back to SwiftShader
  • UI scaling โ€” DPI โ†’ scale factor (160dpi=1.0, 480dpi=3.0), clamped to [1.0, 3.0]
  • Font size โ€” 13px / 14px / 16px based on DPI tier

The config is written to ~/.config/zcode-termux/mobile-env.sh and sourced by the launcher on every zcode invocation.


๐Ÿ“‹ Requirements

Requirement Minimum Recommended
Architecture aarch64 (ARM64) โ€”
Android 10 (SDK 29) 13+
RAM 4 GB 8 GB+
Storage 2 GB free 4 GB free
Termux From F-Droid + Termux:Widget add-on
Display Termux:X11 (auto-installed) โ€”
GLM API key โ€” z.ai/subscribe

โš ๏ธ Do not install Termux from the Play Store โ€” Google's version is deprecated and broken. Use F-Droid or the direct APK from Termux's GitHub releases.


๐ŸŽฎ Launching

From terminal

zcode

From home screen

  1. Install Termux:Widget from F-Droid
  2. Long-press your home screen โ†’ Add Widget โ†’ Termux:Widget
  3. Select the ZCode shortcut
  4. Tap to launch anytime

First launch

First launch takes 10-20 seconds โ€” proot spins up Debian, Termux:X11 initializes the display, and Electron loads. Subsequent launches are faster (Debian proot caches).


๐Ÿ”ง Troubleshooting

๐Ÿ“ฆ ZCode won't launch / blank screen
# Check if Termux:X11 is running
ps aux | grep termux-x11

# Kill stale processes and retry
pkill -f termux-x11
zcode

# Launch manually to see error output
proot-distro login debian --shared-tmp -- \
  bash -c "DISPLAY=:0 /usr/bin/zcode --no-sandbox --enable-logging"
๐Ÿ”ง dpkg dependency errors during install
proot-distro login debian -- bash -c \
  "apt-get update && apt-get install -f -y && dpkg --configure -a"

Then re-run bash install.sh.

๐Ÿ’พ Out of memory / crashes / OOM-killed

Electron is memory-heavy. The installer auto-tunes based on your RAM, but if you're still crashing:

# Reduce Electron memory in the launcher
sed -i 's/--max-old-space-size=[0-9]*/--max-old-space-size=512/' $PREFIX/bin/zcode

Also: close other apps, disable other proot distros (proot-distro remove ubuntu etc).

๐Ÿ”‘ GLM API key not set / AI features not working

Get a key from z.ai/subscribe, then:

# Set it in ZCode's config
proot-distro login debian -- bash -c \
  "echo 'export ZAI_API_KEY=your-key-here' >> /root/.bashrc"

# Or set it in ZCode Settings โ†’ AI โ†’ API Key

The GLM Coding Lite plan is $12.6/month and includes 10,000 credits/week.

๐Ÿ–ฅ GPU rendering issues / flickering

The installer auto-detects your GPU. If you get artifacts:

# Force software rendering
sed -i 's/--enable-gpu-rasterization/--disable-gpu/' $PREFIX/bin/zcode
๐Ÿ“ฑ Touch input not working properly

Make sure Termux:X11 is the latest nightly:

pkg uninstall termux-x11
pkg install termux-x11-nightly

The mobile touch CSS is injected automatically. If it's not loading, verify:

cat ~/.config/zcode-termux/mobile-env.sh | grep GPU_FLAGS

๐Ÿ—‘ Uninstall

# Quick uninstall (removes ZCode, launcher, shortcuts)
bash uninstall.sh

# Full removal (also deletes Debian proot โ€” reclaims ~1.5GB)
bash uninstall.sh --full

Or manually:

rm $PREFIX/bin/zcode
rm ~/.shortcuts/ZCode
proot-distro remove debian

๐Ÿ“ Repo Structure

zcode-termux/
โ”œโ”€โ”€ assets/
โ”‚   โ”œโ”€โ”€ logo.svg              # Main logo (512ร—512, animated)
โ”‚   โ””โ”€โ”€ logo-128.svg          # Favicon size (128ร—128)
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ env-detect.sh         # Device probe + mobile config generator
โ”‚   โ”œโ”€โ”€ bootstrap-skills.sh   # Pre-load skills, MCP, settings, dev tools
โ”‚   โ””โ”€โ”€ mobile-touch.css      # Touch-optimized CSS injected into Electron
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ workflows/
โ”‚       โ””โ”€โ”€ release.yml       # Auto-release on tag push
โ”œโ”€โ”€ install.sh                # โ† You run this
โ”œโ”€โ”€ uninstall.sh              # โ† Or this to remove
โ”œโ”€โ”€ README.md                 # You are here
โ”œโ”€โ”€ LICENSE                   # MIT
โ”œโ”€โ”€ CHANGELOG.md              # Version history
โ””โ”€โ”€ .gitignore

๐Ÿ”— Links

Resource URL
ZCode official site zcode.z.ai
GLM API subscription z.ai/subscribe
Termux (F-Droid) f-droid.org/packages/com.termux
Termux:Widget f-droid.org/packages/com.termux.widget
ZCode downloads zcode.z.ai/en#all-downloads
Report issues GitHub Issues

โš–๏ธ Disclaimer

This is an unofficial community project. ZCode is built by z.ai. This repo automates installing the official Linux ARM64 .deb inside a Termux proot environment โ€” it does not modify, crack, or redistribute ZCode itself. Not affiliated with or endorsed by z.ai.

Use at your own risk. The proot approach has ~10-15% CPU overhead vs native Linux.


๐Ÿ“„ License

MIT ยฉ 2026 NaustudentX18

About

Run ZCode (GLM-5.3 AI coding IDE) on Android via Termux + proot Debian

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages