DEV Community

RadnusD
RadnusD

Posted on

How to Run Google Antigravity AI on Android with a Native Web GUI (No PC or VNC)

Animated demonstration of Google Antigravity setup running in Termux on Android

Google Antigravity Web GUI chat workspace running in mobile browser on Android

Google Antigravity is a powerful autonomous AI coding assistant. While primarily designed for desktop environments, you can actually run it 100% natively on Android inside Termux, complete with Google's official desktop Web GUI accessible directly in your mobile browser at http://localhost:4400.

In this tutorial, we will set up the standalone environment without needing a PC, cloud relays, VNC viewers, or heavy Linux PRoot containers.


Prerequisites

  • An Android device (ARM64 / aarch64).
  • Termux installed (from F-Droid or GitHub, not the outdated Play Store version).
  • An active internet connection.

Step 1: One-Line Automated Installation

Open Termux and run the automated installation script from the open-source repository:

curl -fsSL https://raw.githubusercontent.com/dsundaravadhanan/Antigravity-for-Android/main/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

What this script configures under the hood:

  1. Native Android Bionic Engine: Installs Google's official native ARM64 Android binary with zero glibc overhead.
  2. Termux PATH Linking: Symlinks the binary to $PREFIX/bin/agy so you never encounter command not found.
  3. Browser OAuth Bridge: Bridges xdg-open to termux-open-url so sign-in tabs open seamlessly in Chrome.
  4. Latency Fixes: Sets IPv4 DNS precedence and dual-stack localhost mapping to prevent slow startup on mobile carrier data.
  5. Background Daemon: Installs termux-wake-lock integration to stop Android battery optimizers from killing background sessions.

Step 2: Google Account Authentication

  1. When the script finishes, launch the Web GUI:
   agy-gui
Enter fullscreen mode Exit fullscreen mode
  1. Your mobile browser will automatically open to http://localhost:4400/onboard.
  2. Tap Continue with Google to complete standard Google OAuth sign-in.
  3. Once authenticated, your local session is securely saved in ~/.gemini/antigravity-cli/ with restricted permissions (chmod 600).

Step 3: Install as a Standalone Android App

You can convert the Web GUI into a dedicated full-screen app on your phone:

  1. In Chrome at http://localhost:4400, tap the three dots menu (⋮) in the top right.
  2. Select Install app (or Add to Home screen).
  3. Tap Install.

The official Google Antigravity icon will now be on your Android launcher, opening in full-screen standalone mode without any browser URL bars.


Daily Usage

  • Foreground Mode (live terminal output):
  agy-gui
Enter fullscreen mode Exit fullscreen mode
  • Background Daemon Mode (allows minimizing Termux while coding):
  agy-service start   # Starts server and opens Chrome
  agy-service status  # Checks background status
  agy-service logs    # Views recent server output
  agy-service stop    # Stops background server
Enter fullscreen mode Exit fullscreen mode

Source Code & Project Repository

The complete setup scripts, uninstaller, and source code are open-source under the Apache-2.0 License:

If this project helps your mobile development workflow, feel free to star the repo on GitHub!

Top comments (1)

Collapse
 
baumgaerben profile image
baumgaerben •

Thử nghiệm chạy model cục bộ trên Android thực sự thú vị — đặc biệt là phần bypass VNC bằng WebView native. Mấy năm trước mình từng dựng Termux + proot-distro để chạy inference nhẹ, nhưng bottleneck luôn ở thermal throttling và RAM management khi context window lớn.

Cách bạn handle memory mapping cho Antigravity trên ARM64 có vẻ optimize tốt (không thấy OOM kill trong demo). Một lưu ý nhỏ: nếu dùng mlock() để pin model weights vào RAM thì pin memory pressure lên đáng kể — trên device 8GB trở xuống dễ trigger LMK (Low Memory Killer) khi system cần reclaim. Thử profile với perf hoặc simpleperf xem page fault rate khi streaming output, có thể tune vm.swappiness hoặc dùng zram swap để ổn định hơn.

Còn về Web GUI: dùng WebView + WebSocket bridge thay vì bundle full Node.js runtime là move đúng — giảm binary size và cold start. Mình hay thấy pattern này trong các offline-first PWA. Chỉ lo chỗ lifecycle: Android 14+ restrict background execution khá chặt, service worker có survive được khi app bị kill không? PS: the tool I meant is on labagent .tech