Z

Z.AI Chat

GLM Coding Plan · Powered by GLM-5.1

Get your key at z.ai/apikeys · Subscribe

Modes Available

💬 Chat General conversation
💻 Coding Code assistant
💡 Brainstorm Ideation partner
🤖 Agentic Autonomous coding

New Chat

Chat

Project Files

No files yet.
AI-generated files appear here.
file

                
■ Terminal

Terminal

~
$
🛠

Dev Environment

Set up on-device build tools

Downloads and sets up a complete Termux Linux environment inside the app.

No external apps needed — bash, coreutils, package manager all included.

Download size: ~30MB (one-time). Architecture auto-detected.

After install, use pkg install aapt2 ecj dx apksigner to add build tools.

Settings

API Configuration

Model Settings

Terminal & Agent

AI-generated code auto-deploys to device in Coding/Agentic modes
Prevents screen sleep while agent is working
How many times AI will auto-retry after build failures
Auto-continues AI if task is incomplete or response cut off
Max times AI will be asked to continue incomplete work

Appearance

Data

About

Z.AI Chat v2.2.5

Built with Z.AI SDK & GLM-5.1

Compatible with Android 15/16

Changelog

  • v2.2.5 2026-05-19
    • Shebang Patching — all bin/ scripts patched to use #!/system/bin/sh (bypasses interpreter SELinux)
    • Proot from APK nativeLib — uses proot directly from APK (apk_data_file SELinux label, always executable)
    • Termux Integration — detects installed Termux, sends RUN_COMMAND to install tools
    • F-Droid Fallback — opens Termux F-Droid page if not installed
    • 3-Strategy Install — direct → proot → Termux RUN_COMMAND → manual instructions
  • v2.2.4 2026-05-19
    • Bundled PRoot — proot binary included in APK as native library (executable SELinux label)
    • Auto-Proot Install — copies proot + loader from APK to Termux prefix on first shell use
    • Auto-Proot Wrapping — pkg/apt/dpkg commands automatically wrapped with proot
    • PROOT_LOADER env — loader path set correctly for proot execution
    • Supports arm64-v8a, armeabi-v7a, x86_64, x86 architectures
  • v2.2.3 2026-05-19
    • Os.chmod() Fix — uses Android system call (chmod(2)) instead of Runtime.exec for reliable permissions
    • PRoot Fallback — auto-downloads PRoot from Termux repo when SELinux blocks binary execution
    • Shell Always /system/bin/sh — avoids Termux bash permission issues entirely
    • Explicit sh Invocation — runs pkg/apt via "sh script" instead of direct execution
    • installProot Plugin — downloads .deb, extracts proot binary with AR+tar parser
    • Termux Fallback Guide — if all else fails, clear instructions to install Termux from F-Droid
  • v2.2.2 2026-05-19
    • Permission Fix — chmod 755 on all bootstrap binaries after extraction (fixes "Permission denied")
    • Shell Auto-Fallback — if bash permission denied, auto-falls back to system sh
    • fixPermissions Plugin — new BootstrapPlugin.fixPermissions() callable from JS
    • ensureBuildTools uses full paths to pkg/apt with chmod before execution
  • v2.2.1 2026-05-19
    • Auto-Install Build Tools — aapt2/ecj/d8/apksigner auto-installed via pkg with full paths + retry logic
    • Dev Tools Banner — warns on Coding/Agentic mode if tools missing, one-tap install button
    • Bootstrap + Tools in One Tap — Install button auto-installs bootstrap then build tools
    • Checks tool availability before every build, auto-installs if missing
  • v2.2.0 2026-05-19
    • Build Pipeline Rewrite — proven 7-step pipeline: resources, link, compile R.java + sources, DEX, package, sign
    • Auto-Install Build Tools — aapt2/ecj/d8/apksigner auto-installed via pkg on first build
    • APK Signing — generates debug keystore (keytool or openssl), signs with apksigner
    • 5-Minute Build Timeout — 10x longer for on-device compilation; kills stuck processes
    • Fixed 18 Build Bugs — R.java now compiled, d8 uses @file not broken glob, proper error propagation
    • Agentic IDE Loop — full tool→execute→verify→iterate cycle inspired by opencode/AIDE
  • v2.1.0 2026-05-19
    • File Tree — per-session file tree shows all AI-generated files, view/edit/save from sidebar
    • Auto-Continue — if AI stops mid-task, app auto-continues until task is confirmed complete
    • Task Completion Protocol — AI outputs [TASK_COMPLETE] when done; app detects truncated responses
    • File viewer with edit mode — modify and save files back to device
    • Configurable max auto-continues (1–20, default 5) in Settings
  • v2.0.1 2026-05-19
    • APK Verification — build output now verified: confirms APK file exists and shows size
    • Stay Awake Fix — dual wake locks (screen bright + CPU) keep device fully awake during builds
    • Configurable Retries — max auto-fix retries now adjustable (1–30) in Settings, default 10
  • v2.0.0 2026-05-19
    • Built-in Termux — full Linux environment inside the app, no external Termux needed
    • One-time download (~30MB) of Termux bootstrap (bash, coreutils, apt package manager)
    • Auto-detects CPU architecture (ARM64, ARM, x86, x86_64)
    • Path patching — fixes all Termux paths to work from our app prefix
    • BootstrapPlugin — native download, extract, symlink, patch pipeline
    • ShellPlugin upgraded — uses bundled bash instead of limited /system/bin/sh
    • Install build tools via: pkg install aapt2 ecj dx apksigner
    • APK stays tiny (~1MB) — bootstrap downloaded on first use, not embedded
  • v1.4.0 2026-05-19
    • Agentic feedback loop — build errors auto-sent back to AI for fixing (up to 3 retries)
    • Termux integration — auto-detects Termux on device, uses its PATH (aapt2, d8, ecj, tsu)
    • Workspace context — AI sees device info, available tools, and project files
    • AIDE-style tool protocol — upgraded agentic prompt with structured tool use
    • Auto-build pipeline — full aapt2→ecj→d8→sign→install chain
    • Build error detection — captures exit codes, feeds errors back for auto-correction
    • Termux root support — detects tsu/su for elevated privileges
  • v1.3.1 2026-05-19
    • Fixed: AI actions now AUTO-EXECUTE — files deploy, APKs build & install automatically
    • Added Keep Screen On toggle — prevents sleep while agent works
    • Added Auto-Deploy toggle — controls whether AI actions auto-execute
    • Status toasts show deploy/build/install progress
    • New settings section: Terminal & Agent (Auto-Deploy, Keep Screen On)
  • v1.3.0 2026-05-19
    • Full interactive Terminal screen — execute real shell commands on your device
    • Native Shell plugin — run commands, read/write files, create directories
    • APK Installer plugin — install built APKs directly from the app
    • Deploy Files button — AI-generated code saved to device with one tap
    • Build APK button — compiles Android projects on-device (needs Termux tools)
    • Install APK button — triggers Android package installer for built APKs
    • AI action parser — detects [CREATE_FILE], [RUN_COMMAND], [BUILD_APK], [INSTALL_APK]
    • Quick commands toolbar in terminal (ls, pwd, cat, mkdir, tools, sys)
    • Command history with arrow keys
    • Built-in commands: help, sysinfo, create, install, clear, exit, setup
    • Dev environment setup screen — bootstrap build tools
    • Project scaffolding — quick-create Android project structure
    • Enhanced Agentic mode prompt for on-device build awareness
  • v1.2.4 2026-05-19
    • Save button on every code block — downloads code as a real file to your phone
    • Copy & Save buttons on every AI response — one-tap copy or save as .txt
    • File paths in AI responses are now highlighted and tappable (tap to copy)
    • Smart filename detection — auto-names saved files from code content
    • 30+ language-to-extension mappings for proper file saving
  • v1.2.3 2026-05-19
    • Fixed: Connect button not working — missing function declaration caused JS parse error
    • All UI event handlers now correctly initialized on app start
  • v1.2.2 2026-05-19
    • Fixed: network error on app backgrounding — now auto-retries with reconnect
    • Streaming resumes from last saved token after reconnection
    • Exponential backoff retry (3 attempts) for network interruptions
    • Retry button shown for failed requests due to connectivity
    • Offline/online detection with status banner
    • Visibility change handler saves state on app background
    • Partial response preserved and restorable on reconnect
  • v1.2.1 2026-05-19
    • Fixed: messages lost when switching conversations during streaming
    • Streaming responses now auto-save every 20 tokens to prevent data loss
    • Partial responses preserved when switching sessions mid-generation
    • Added in-app terminal panel for Coding and Agentic modes
    • Terminal parses code blocks, file ops, and tool calls from AI responses
    • Terminal toggle button with collapsible panel
    • Terminal state persists across sessions
    • Conversation list now shows message count
    • Improved conversation switch safety with flush-before-switch
  • v1.2.0 2026-05-19
    • Added light mode / dark mode toggle
    • Theme persists across sessions
    • Theme toggle button in chat header
    • Theme setting in Settings screen
    • Added changelog section to Settings
    • Optimized light theme color palette
  • v1.1.0 2026-05-19
    • Z.AI Coding Plan endpoint support
    • Fixed API base URL to use coding plan endpoint
    • Updated model list (GLM-5.1, GLM-5 Turbo, GLM-4.7, GLM-4.5 Air)
  • v1.0.0 2026-05-19
    • Initial release
    • Chat, Coding, Brainstorm, Agentic modes
    • Streaming SSE responses
    • Markdown rendering with syntax highlighting
    • Conversation management with sidebar
    • Settings with model, temperature, tokens controls
    • Web search integration
    • Export conversations to JSON
    • Android 15/16 support (targetSdk 36)