|
5 | 5 | -green) |
6 | 6 |  |
7 | 7 |
|
8 | | -**Auto-Linux** is a standalone, lightweight Linux installer and manager for **rooted** Android devices. Written entirely in Rust, it provides an intuitive Terminal User Interface (TUI) to install and manage Ubuntu chroot environments without external dependencies like Termux or Busybox. |
| 8 | +**Auto-Linux** is a standalone, advanced Linux installer and manager for **rooted** Android devices. Built with Rust, 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. |
9 | 9 |
|
10 | | -> Focusing on a minimal, dependency-free, and robust chroot experience. |
| 10 | +> **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. |
11 | 11 |
|
12 | 12 | --- |
13 | 13 |
|
14 | 14 | ## Key Features |
15 | 15 |
|
16 | | -* **Truly Standalone:** Compiled as a single, static `musl` binary. It has zero runtime dependencies and does not require Termux to function. |
17 | | -* **Intuitive TUI:** A clean, keyboard-driven dashboard powered by `ratatui` for easy navigation and management. |
18 | | -* **Direct Chroot Management:** Launch directly into a chroot environment, select users (`root` or a standard user), and manage installed distributions from the dashboard. |
19 | | -* **Smart Root Elevation:** The application automatically detects if it's running without root privileges and attempts to elevate itself via `su`. |
20 | | -* **Automated Configuration:** |
21 | | - - **Network:** Seamlessly sets up DNS (`resolv.conf`) to ensure internet connectivity inside the chroot. |
22 | | - - **Users:** Creates a standard user with a password and `sudo` privileges during the initial setup. |
23 | | - - **System Mounts:** Automatically handles bind mounts for `/dev`, `/proc`, `/sys`, and `/sdcard`. |
24 | | -* **Broad Distribution Support:** Installs official Ubuntu base images from 20.04 LTS up to the latest 24.10 release. |
| 16 | +* **Truly Standalone:** Compiled as a single static `musl` binary (~2MB). Zero runtime dependencies. |
| 17 | +* **Intuitive TUI:** Keyboard-driven dashboard (powered by `ratatui`) for distro selection, credential setup, and one-click launching. |
| 18 | +* **Multi-Distro Support:** |
| 19 | + * **Debian/Ubuntu:** Ubuntu (20.04 - 26.04), Debian, Kali Linux. |
| 20 | + * **Rolling Release:** Arch Linux ARM (with automatic Keyring init), Void Linux. |
| 21 | + * **RPM-Based:** Fedora (Automatic OCI blob extraction & attribute cleanup). |
| 22 | + * **Lightweight:** Alpine Linux. |
| 23 | +* **Advanced Extraction Engine:** |
| 24 | + * Auto-detects and handles `.tar.gz`, `.tar.xz`, and **OCI (Docker) Image** formats. |
| 25 | + * Automatically flattens nested rootfs structures (e.g., Kali). |
| 26 | +* **Smart Configuration:** |
| 27 | + * **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. |
| 28 | + * **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. |
| 29 | + * **User Management:** Automatically handles `groupadd`/`useradd` compatibility across `shadow` (standard) and `busybox` (Alpine) backends. |
25 | 30 |
|
26 | 31 | --- |
27 | 32 |
|
28 | | -## Screenshots |
29 | | - |
30 | | -*Dashboard:* |
31 | | - |
| 33 | +## Supported Distributions |
32 | 34 |
|
33 | | -*Distro List & Installation :* |
34 | | - |
| 35 | +Auto-Linux currently supports fetching and installing the following families: |
35 | 36 |
|
36 | | -*User Selection:* |
37 | | - |
| 37 | +| Family | Distributions | Key Features | |
| 38 | +| :--- | :--- | :--- | |
| 39 | +| **Ubuntu** | 20.04, 22.04, 24.04, 26.04 | Standard environment, robust support. | |
| 40 | +| **Debian** | Debian Stable | Pure Debian experience. | |
| 41 | +| **Security** | **Kali Linux** | Includes flat-rootfs handling & network fix. | |
| 42 | +| **Alpine** | Edge, Latest Stable | Extremely lightweight, uses `apk`. | |
| 43 | +| **Arch** | **Arch Linux ARM** | Auto-initializes `pacman-keyring` & fixes mirrorlists. | |
| 44 | +| **Void** | **Void Linux** | Fixes `xbps` networking & enforces SHA512 passwords. | |
| 45 | +| **Fedora** | Fedora 40, 41, 42, 43 Latest | Handles OCI blobs & strips kernel security xattrs. | |
38 | 46 |
|
39 | 47 | --- |
40 | 48 |
|
41 | 49 | ## Installation |
42 | 50 |
|
43 | | -**Requirement:** A rooted Android device with an `su` binary in `PATH`. |
44 | | - |
45 | | -### Recommended: Quick Install Script |
46 | | -Execute this command in a terminal environment like **Termux** or an **ADB Shell**: |
| 51 | +**Requirement:** A rooted Android device with an `su` binary. |
47 | 52 |
|
| 53 | +### Option 1: Quick Install (Termux/ADB) |
48 | 54 | ```bash |
49 | 55 | curl -sL https://raw.githubusercontent.com/HanSoBored/Auto-Linux/main/install.sh | sh |
50 | 56 | ``` |
51 | | -> The script automatically detects your device architecture, downloads the correct binary to `/data/local/tmp`, sets permissions, and creates a convenient `autolinux` alias if you are using Termux. |
52 | 57 |
|
53 | | -### Manual Installation |
54 | | -1. Download the latest `autolinux-aarch64` binary from the [Releases](https://github.com/HanSoBored/Auto-Linux/releases) page. |
55 | | -2. Push the binary to your device: |
| 58 | +### Option 2: Manual Push |
| 59 | +1. Download the latest binary from [Releases](https://github.com/HanSoBored/Auto-Linux/releases). |
| 60 | +2. Push to device: |
56 | 61 | ```sh |
57 | | - adb push autolinux-aarch64 /data/local/tmp/autolinux |
| 62 | + adb push autolinux-aarch64 /data/local/rootfs/autolinux |
| 63 | + adb shell "chmod +x /data/local/rootfs/autolinux" |
58 | 64 | ``` |
59 | | -3. Make it executable: |
| 65 | +3. Run: |
60 | 66 | ```sh |
61 | | - adb shell "chmod +x /data/local/tmp/autolinux" |
62 | | - ``` |
63 | | -4. Run the application: |
64 | | - ```sh |
65 | | - adb shell "/data/local/tmp/autolinux" |
| 67 | + adb shell |
| 68 | + su -c /data/local/rootfs/autolinux |
66 | 69 | ``` |
67 | 70 |
|
68 | 71 | --- |
69 | 72 |
|
| 73 | +## Screenshots |
| 74 | + |
| 75 | +| Dashboard | Family Selection | |
| 76 | +| :---: | :---: | |
| 77 | +|  |  | |
| 78 | + |
| 79 | +| Version List | Installed | |
| 80 | +| :---: | :---: | |
| 81 | +|  |  | |
| 82 | + |
| 83 | +--- |
| 84 | + |
| 85 | +## Screenshots Distro |
| 86 | + |
| 87 | +| Debian | Ubuntu | |
| 88 | +| :---: | :---: | |
| 89 | +|  |  | |
| 90 | + |
| 91 | +| Alpine | Arch | |
| 92 | +| :---: | :---: | |
| 93 | +|  |  | |
| 94 | + |
| 95 | +| Fedora | Kali | Void | |
| 96 | +| :---: | :---: | :---: | |
| 97 | +|  |  |  | |
| 98 | + |
| 99 | +--- |
| 100 | + |
70 | 101 | ## Build from Source |
71 | 102 |
|
| 103 | +To ensure compatibility with Android's libc, we build statically against `musl`. |
| 104 | +
|
72 | 105 | ### Prerequisites |
73 | | -- [Rust](https://www.rust-lang.org/tools/install) toolchain. |
74 | | -- [Cross](https://github.com/cross-rs/cross) for easy cross-compilation. |
75 | | - ```bash |
76 | | - cargo install cross |
77 | | - ``` |
| 106 | +* Rust Toolchain |
| 107 | +* `cross` (Recommended for easy cross-compilation) |
78 | 108 |
|
79 | | -### Build Command |
80 | | -Compile for `aarch64` using the `musl` target to create a fully static binary. This ensures maximum compatibility across different Android versions by not depending on the system's C library (Bionic). |
| 109 | +```bash |
| 110 | +cargo install cross |
| 111 | +``` |
81 | 112 |
|
| 113 | +### Build Command |
82 | 114 | ```bash |
| 115 | +# Build a static binary for Android (AArch64) |
83 | 116 | cross build --target aarch64-unknown-linux-musl --release |
84 | 117 | ``` |
85 | | -
|
86 | | -The final binary will be located at `target/aarch64-unknown-linux-musl/release/autolinux`. |
| 118 | +The binary will be at `target/aarch64-unknown-linux-musl/release/autolinux`. |
87 | 119 |
|
88 | 120 | --- |
89 | 121 |
|
90 | | -## Contributing |
91 | | -
|
92 | | -Contributions are highly welcome! Please follow these steps: |
93 | | -1. Fork the project. |
94 | | -2. Create your feature branch (`git checkout -b feature/AmazingFeature`). |
95 | | -3. Commit your changes (`git commit -m 'Add some AmazingFeature'`). |
96 | | -4. Push to the branch (`git push origin feature/AmazingFeature`). |
97 | | -5. Open a Pull Request. |
98 | | -
|
99 | | ---- |
| 122 | +## Troubleshooting |
100 | 123 |
|
101 | | -## Disclaimer |
| 124 | +Logs are automatically generated for debugging purposes: |
| 125 | +* **Root:** `/data/local/auto-linux/debug.logs` |
| 126 | +* **User:** `~/.local/share/auto-linux/debug.logs` |
102 | 127 |
|
103 | | -This tool requires root and performs system-level operations like mounting filesystems and modifying the `/data` partition. While it is designed to be safe, **the author is not responsible for any data loss or damage to your device.** Always ensure you have a backup of important data. |
| 128 | +**Common Issues:** |
| 129 | +* *Network Error:* If installation fails at downloading, check your internet connection. |
| 130 | +* *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`. |
104 | 131 |
|
105 | 132 | --- |
106 | 133 |
|
|
0 commit comments