Install Windsurf Code Editor on Android Termux, ARM64 Linux, and Proot Environments
Automated Installation Script | Fix dpkg Errors | One-Click Setup
Author: Mahesh Technicals | Version: v1.3 | Last Updated: February 2026
- Overview
- Key Features
- Prerequisites
- Quick Installation
- Detailed Usage Guide
- Common Issues & Solutions
- Technical Details
- FAQ
- Troubleshooting
- Contributing
- Support & Donations
- License
Windsurf Toolkit for ARM64 is a powerful, automated bash script designed exclusively for Linux distributions (such as Ubuntu) installed via Termux on Android devices. This script requires that your Linux environment has a desktop interface accessible via VNC.
Important: This script will not work on stock Android, or on Linux systems that are not installed through Termux. You must have a full Linux desktop (e.g., Ubuntu 24.04) running inside Termux, with VNC access enabled.
If you don't already have a Linux desktop set up on your Android device, follow this guide first:
๐ How to Install Ubuntu 24.04 on Android Without Root (Mahesh Technicals)
Once your Linux desktop is running and accessible via VNC, you can use this toolkit to install the Windsurf Code Editor (AI-powered IDE by Codeium) on your ARM64 device.
This toolkit solves the notorious dpkg memory corruption bug (double free or corruption) that prevents standard installation on ARM-based systems by intelligently repackaging Debian packages with compatible compression formats.
- Fixes ARM64 Installation Errors: Resolves dpkg decompression failures on ARM devices
- Automated Process: One-command installation with zero manual intervention
- Smart Version Management: Auto-detects updates and prevents unnecessary reinstalls
- Performance Optimized: Pre-configures Windsurf settings for optimal ARM64 performance
- Sandbox Fix Included: Automatically patches Electron security issues for containerized environments
- โ Linux distributions (e.g., Ubuntu) installed via Termux on Android (ARM64/AARCH64)
- โ Desktop environment required (XFCE, LXDE, etc.)
- โ VNC server must be running for desktop access
Not supported: Stock Android, native Linux ARM64, Raspberry Pi OS, WSL2, or any system not installed through Termux with a desktop and VNC.
- Automatically detects existing Windsurf installations
- Compares current version with repository version
- Prevents redundant installations and saves bandwidth
- Intelligent reinstallation prompts when already up-to-date
- Uses
7zip+tarcombination to safely unpack.debpackages - Recompresses with
gzipinstead of problematiczstdformat - Completely eliminates ARM64 installation crashes
- Handles dpkg memory errors automatically
- Fetches latest version from official repositories
- Compares versions before downloading
- Smart update prompts to save time and bandwidth
- Seamless upgrade path from older versions
- Sandbox Fix: Patches desktop shortcuts with
--no-sandboxflags for Electron apps - Config Injection: Auto-configures
settings.jsonfor ARM64 optimization - Performance Tuning: Disables unnecessary security features causing slowdowns
- Desktop Integration: Ensures proper application launcher functionality
- Beautiful gradient-colored interface
- Real-time progress indicators
- Descriptive status messages with emojis
- Clean, professional output formatting
- Auto-checks and installs required system packages
- Verifies
p7zip-full,tar, andbinutilsavailability - Silent installation of missing dependencies
- No manual intervention required
Before running the Windsurf Toolkit, you must have:
- A full Linux distribution (e.g., Ubuntu 24.04) installed inside Termux on your Android device.
- Follow this guide if you haven't set it up yet: Install Ubuntu 24.04 on Android Without Root
- A desktop environment (XFCE, LXDE, etc.) installed and running.
- VNC server running and accessible (so you can use graphical apps).
- Shell: Bash 4.0+
- Package Manager: apt/apt-get (Debian-based distributions)
- Network: Active internet connection for downloads
- Storage: At least 500MB free space
- Root/Sudo Access: Required for package installation
- Write Permissions: Needed for
/usr/share/and/usr/local/directories
Note: This script is not intended for use on native Linux ARM64, Raspberry Pi, or WSL2. It is specifically for Linux desktop environments running inside Termux on Android, with VNC access.
wget -qO- https://raw.githubusercontent.com/MaheshTechnicals/Windsurf-Termux/main/windsurf-toolkit.sh | bash# Step 1: Download the script
wget https://raw.githubusercontent.com/MaheshTechnicals/Windsurf-Termux/main/windsurf-toolkit.sh
# Step 2: Make it executable
chmod +x windsurf-toolkit.sh
# Step 3: Run the toolkit
./windsurf-toolkit.shcurl -O https://raw.githubusercontent.com/MaheshTechnicals/Windsurf-Termux/main/windsurf-toolkit.sh
chmod +x windsurf-toolkit.sh
./windsurf-toolkit.shgit clone https://github.com/MaheshTechnicals/Windsurf-Termux.git
cd Windsurf-Termux
chmod +x windsurf-toolkit.sh
./windsurf-toolkit.sh๐ก Tip: If
wgetis not installed, runpkg install wget(Termux) orsudo apt install wget(Linux)
Once executed, the toolkit presents an interactive menu:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ WINDSURF TOOLKIT v1.3
โจ Author: Mahesh Technicals โจ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Current Version: [Displays installed version or "Not installed"]
1. ๐ Install or Update Windsurf
2. ๐๏ธ Uninstall Windsurf
3. โ Exit
๐ Choose an option [1-3]:
This is the primary function that performs:
-
Version Check
- Queries currently installed Windsurf version
- Fetches latest available version from repositories
- Compares versions and displays update availability
-
Smart Installation Logic
- If not installed: Proceeds with fresh installation
- If outdated: Automatically updates to latest version
- If up-to-date: Asks user confirmation before reinstalling
-
Dependency Installation
- Checks for
p7zip-full,tar,binutils - Automatically installs missing packages
- Verifies successful installation
- Checks for
-
Package Download
- Downloads official
.debpackage from repository - Displays download progress
- Validates package integrity
- Downloads official
-
Advanced Repackaging
- Extracts
.debusingararchive tool - Decompresses
data.tar.xzandcontrol.tar.xzwith 7zip - Extracts structural data with tar
- Repackages using stable
gzipcompression - Creates ARM64-compatible Debian package
- Extracts
-
Installation
- Installs repackaged
.debvia dpkg - Handles installation errors gracefully
- Applies automatic fixes post-installation
- Installs repackaged
-
Patching & Optimization
- Desktop Shortcut Fix: Adds
--no-sandboxto.desktopfiles - Settings Injection: Creates/updates
~/.config/Windsurf/User/settings.json - Performance Config: Optimizes extensions and security settings
- Desktop Shortcut Fix: Adds
-
Cleanup & Verification
- Removes temporary files
- Verifies installation success
- Displays version summary
๐ Checking repository for updates...
โ
You already have the latest version (1.3.0) installed.
๐ Do you want to reinstall it anyway? [y/N]: n
Operation cancelled. Have a great day! ๐
Completely removes Windsurf from your system:
- Purges Windsurf package using apt
- Removes all configuration files
- Cleans up unused dependencies
- Frees up disk space
sudo apt remove --purge windsurf -y
sudo apt autoremove -ySafely exits the toolkit without changes.
Error Message:
double free or corruption (out)
dpkg-deb: error: <decompress> subprocess was killed by signal (Aborted)
Root Cause:
ARM64 dpkg struggles with zstd compressed Debian packages due to memory management issues in decompression libraries.
Solution Implemented:
The toolkit extracts the .deb using 7zip and recompresses using gzip compression, which is fully compatible with ARM64 dpkg.
Manual Fix (if not using toolkit):
ar x windsurf.deb
7z x data.tar.xz
7z x control.tar.xz
mkdir -p repack/DEBIAN
tar -xf data.tar -C repack/
tar -xf control.tar -C repack/DEBIAN/
dpkg-deb -Zgzip --build repack windsurf-fixed.deb
sudo dpkg -i windsurf-fixed.debError Message:
[FATAL:setuid_sandbox_host.cc] The SUID sandbox helper binary was found, but is not configured correctly.
Root Cause:
Electron-based applications (including Windsurf) require elevated permissions to create sandboxed processes. In Termux/Proot environments, these permissions are unavailable.
Solution Implemented:
The toolkit automatically patches .desktop files to include --no-sandbox flag, bypassing the sandboxing requirement.
Manual Fix:
# Edit desktop file
sudo nano /usr/share/applications/windsurf.desktop
# Change all Exec lines to include --no-sandbox:
Exec=/usr/share/windsurf/windsurf --no-sandbox %F
Exec=/usr/share/windsurf/windsurf --new-window --no-sandboxProblem:
Extension signature verification and keychain access fail on ARM64/Termux.
Solution Implemented:
Auto-injects optimized settings into ~/.config/Windsurf/User/settings.json:
{
"extensions.verifySignature": false,
"settingsSync.keychain": false,
"security.workspace.trust.enabled": false
}These settings disable problematic features while maintaining functionality.
A .deb file is an ar archive containing:
debian-binary: Package format versioncontrol.tar.xz: Package metadata (name, version, dependencies)data.tar.xz: Actual program files
Standard dpkg on ARM64 uses internal decompression for xz archives compressed with zstd, which triggers memory corruption bugs.
# Extract archive components
ar x windsurf.deb
# Decompress using external 7zip (more stable)
7z x data.tar.xz -y
7z x control.tar.xz -y
# Create new package structure
mkdir -p repack/DEBIAN
tar -xf data.tar -C repack/
tar -xf control.tar -C repack/DEBIAN/
# Repackage with gzip (ARM64-safe compression)
dpkg-deb -Zgzip --root-owner-group --build repack windsurf-fixed.debThis approach:
- Avoids dpkg's internal decompressor
- Uses external tools with better ARM64 support
- Recompresses with universally compatible format
- Maintains package integrity and metadata
File Modified: /usr/share/applications/windsurf.desktop
Changes:
-Exec=/usr/share/windsurf/windsurf %F
+Exec=/usr/share/windsurf/windsurf --no-sandbox %F
-Exec=/usr/share/windsurf/windsurf --new-window
+Exec=/usr/share/windsurf/windsurf --new-window --no-sandboxFile Created/Modified: ~/.config/Windsurf/User/settings.json
Purpose:
- Disable extension signature checks (fails on ARM64)
- Disable keychain integration (unavailable in Termux)
- Disable workspace trust dialogs (interferes with workflow)
A: Yes! The toolkit only performs standard package management operations and uses official Windsurf packages. It's open-source and auditable.
A: Absolutely! Raspberry Pi (3/4/5) runs ARM64 architecture and is fully supported.
A: No. It only repackages the official binary and applies configuration fixes. The application itself remains unchanged.
A: Yes! Just run the toolkit again. It automatically detects and installs updates.
A: No. The repackaging process maintains package management compatibility. You can use apt update && apt upgrade normally.
A: The dpkg bug is in upstream dependencies (libzstd, liblzma) and requires kernel-level fixes. This toolkit provides an immediate workaround.
A: This toolkit is specifically for ARM64. x86/x64 users should use the official installer from Codeium.
A: Yes, package installation requires root/sudo privileges. However, Windsurf itself can run as a regular user after installation.
Solution:
# Termux
pkg install wget
# Linux
sudo apt install wgetSolution:
# Make script executable
chmod +x windsurf-toolkit.sh
# Run with sudo if needed
sudo ./windsurf-toolkit.shSolution:
- This is normal for large packages
- Wait 2-3 minutes for gzip compression to complete
- Check available disk space (
df -h)
Solution:
# Try launching with debug output
/usr/share/windsurf/windsurf --no-sandbox --verbose
# Check logs
cat ~/.config/Windsurf/logs/main.logSolution: Add Codeium repository manually:
wget -qO - https://codeium.com/windsurf/linux/deb/public.key | sudo gpg --dearmor -o /usr/share/keyrings/windsurf-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/windsurf-archive-keyring.gpg arch=arm64] https://codeium.com/windsurf/linux/deb stable main" | sudo tee /etc/apt/sources.list.d/windsurf.list
sudo apt updateContributions are welcome! Here's how you can help:
- ๐ Report Bugs: Open an issue with details
- ๐ก Suggest Features: Share your ideas
- ๐ Improve Documentation: Fix typos, add examples
- ๐ง Submit Code: Create pull requests
git clone https://github.com/MaheshTechnicals/Windsurf-Termux.git
cd Windsurf-Termux
./windsurf-toolkit.sh- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
If you find this tool helpful and want to support continued development, please consider buying me a coffee!
Your support helps maintain and improve this project! โค๏ธ
- Script Developer: Mahesh Technicals
- Toolkit Version: 1.3
- Windsurf IDE: Developed by Codeium
- Community Contributors: Thank you to all who reported issues and suggested improvements!
This tool is provided for educational and convenience purposes to help run Windsurf on non-standard ARM64 environments (Android Termux, Linux ARM, Proot).
Important Notes:
- This toolkit is not officially affiliated with Codeium or Windsurf
- Use at your own risk
- Always backup important data before installation
- The repackaging process maintains official binaries without modification
- Windsurfยฎ is a trademark of Codeium Inc.
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Mahesh Technicals
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.
- GitHub: @MaheshTechnicals
- Issues: Report a Bug
- Discussions: Join Community
windsurf termux, windsurf android, windsurf arm64, windsurf linux, install windsurf termux, windsurf ide, codeium windsurf, windsurf code editor, termux ide, android code editor, dpkg fix arm64, windsurf installer script, termux windsurf setup, proot windsurf, linux arm64 ide, raspberry pi windsurf, windsurf ubuntu arm, termux development tools, android programming environment
ยฉ 2025 Mahesh Technicals. All rights reserved.
If this project helped you, please consider giving it a โญ on GitHub!
Made with โค๏ธ for the ARM64 & Termux community
