') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); GitHub - HanSoBored/Auto-Linux: A TUI application to install and manage Linux (chroot) environments on rooted Android devices. Fast, lightweight, and has zero dependencies (No Termux/Busybox required). · GitHub
Skip to content

Repository files navigation

Auto-Linux

Build StatusLanguagePlatformLicense

Watch Demo

🎬 Click to watch demo (41 seconds)

Auto-Linux is a standalone, advanced Linux installer and manager for rooted Android devices. Rewritten in Go, it provides a feature-rich Terminal User Interface (TUI) to install, configure, and manage various Linux distributions in a Chroot environment without relying on Termux, Busybox, or other external dependencies.

Beyond simple scripts: Auto-Linux handles complex tasks like OCI image extraction, host-side security attribute stripping, and DNS injection to ensure modern distros (like Fedora & Void) run smoothly on Android.


Key Features

  • Truly Standalone: Compiled as a single static binary. Zero runtime dependencies.
  • Intuitive TUI: Keyboard-driven dashboard (powered by bubbletea) for distro selection, credential setup, and one-click launching.
  • Multi-Distro Support:
    • Debian/Ubuntu: Ubuntu (20.04 - 26.04), Debian, Kali Linux.
    • Rolling Release: Arch Linux ARM (with automatic Keyring init), Void Linux.
    • RPM-Based: Fedora (Automatic OCI blob extraction & attribute cleanup).
    • Lightweight: Alpine Linux.
  • Advanced Extraction Engine:
    • Auto-detects and handles .tar.gz, .tar.xz, and OCI (Docker) Image formats.
    • Automatically flattens nested rootfs structures (e.g., Kali).
  • Smart Configuration:
    • Robust Networking: Uses a wrapper strategy and DNS injection (via host ping resolution) to bypass Android's GID permission delays and broken DNS resolvers in Chroot.
    • Security Cleanup: Features a unique Host-Side Hook to strip security.ima and security.selinux attributes, allowing distros like Fedora to run on Android kernels that enforce strict keyring checks.
    • User Management: Automatically handles groupadd/useradd compatibility across shadow (standard) and busybox (Alpine) backends.

Supported Distributions

Auto-Linux currently supports fetching and installing the following families:

FamilyDistributionsKey Features
Ubuntu20.04, 22.04, 24.04, 26.04Standard environment, robust support.
DebianDebian StablePure Debian experience.
SecurityKali LinuxIncludes flat-rootfs handling & network fix.
AlpineEdge, Latest StableExtremely lightweight, uses apk.
ArchArch Linux ARMAuto-initializes pacman-keyring & fixes mirrorlists.
VoidVoid LinuxFixes xbps networking & enforces SHA512 passwords.
FedoraFedora 40, 41, 42, 43 LatestHandles OCI blobs & strips kernel security xattrs.

Installation

Requirement: A rooted Android device with an su binary.

Option 1: Quick Install (Termux/ADB)

curl -sL https://raw.githubusercontent.com/HanSoBored/Auto-Linux/main/installation/install.sh | sh

Option 2: Manual Push

  1. Download the latest binary from Releases.
  2. Push to device:
    adb push autolinux-linux-aarch64 /data/local/tmp/autolinux
    adb shell "chmod +x /data/local/tmp/autolinux"
  3. Run:
    adb shell
    su -c /data/local/tmp/autolinux

Screenshots Distro

DebianUbuntu
DebianUbuntu
AlpineArch
AlpineArch
FedoraKaliVoid
FedoraKaliVoid

Build from Source

Prerequisites

  • Go 1.25+

Build Command

# Build for Android (AArch64)
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o autolinux ./cmd/autolinux

Using build.sh

chmod +x installation/build.sh
./installation/build.sh

The binary will be at build/autolinux.


Troubleshooting

Logs are automatically generated for debugging purposes:

  • Root:/data/local/auto-linux/debug.logs
  • User:~/.local/share/auto-linux/debug.logs

Common Issues:

  • Network Error: If installation fails at downloading, check your internet connection.
  • Required key not available: This is usually a Fedora issue. Auto-Linux attempts to fix this automatically via the host-side cleanup hook. If it persists, ensure your kernel supports setfattr.

License

This project is distributed under the MIT License. See the LICENSE for more information.

About

A TUI application to install and manage Linux (chroot) environments on rooted Android devices. Fast, lightweight, and has zero dependencies (No Termux/Busybox required).

Topics

Resources

Stars

23 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages