# Bananarchy Linux ![Bananarchy Banner](artwork/banner-800x240.png) **Bananarchy** is a keypad-first Linux distribution hardforked from postmarketOS (`v26.06` / Alpine `edge` `armv7`), built for **Qualcomm MSM8905 (Snapdragon 205)** and **Qualcomm MSM8909 (Snapdragon 210)** smart feature phones with **240x320 QVGA non-touch displays** and **physical 12-key T9 keypads**. - **Current public release**: `a1125` (codename `ampere`) — see [CHANGELOG.md](./CHANGELOG.md) for release notes and SHA-256 checksums. - **Device builds (`a1125` — codename `ampere`)** — available in the [shared download folder](https://drive.google.com/drive/folders/1jS68CQbKJPrNM7MZgV64qi6penY5g1nM?usp=sharing): - **Nokia 8110 4G (`nokia-argon`)** — `bananarchy-nokia-argon-a1125-ampere.zip` - **Nokia 2720 Flip (`nokia-beatles`)** — `bananarchy-nokia-beatles-a1125-ampere.zip` - **Nokia 800 Tough (`nokia-coconut`)** — `bananarchy-nokia-coconut-a1125-ampere.zip` - **Nokia 8000 4G (`nokia-sparkler`)** — `bananarchy-nokia-sparkler-a1125-ampere.zip` - **Community IRC**: `#bananarchy` on **Abjects** (`irc.abjects.net`, TLS port `6697`). - **Project philosophy**: [The Bananarchy Manifesto](./MANIFESTO.md). - **User and flashing guide**: [MANUAL.md](./MANUAL.md) (complete installation, EFS backup, keypad shortcuts, and configuration reference). - **UI and networking SDK**: [SDK.md](./SDK.md) (`NeoUI` and `NeoNet` reference for C, C++, and Yabasic `240x320` applications). --- ## Supported devices | Device | Codename | SoC | CPU / RAM | Display and panel firmware | Device tree (`.dtb`) | Release status | | :--- | :--- | :--- | :--- | :--- | :--- | :--- | | **Nokia 8110 4G** | `nokia-argon` | Qualcomm MSM8905 (SD205) | 2x Cortex-A7 @ 1.1 GHz, 512 MB | 2.4" 240x320 SPI (`nokia,argon-gc9305-v2-panel.bin`) | `qcom-msm8905-nokia-argon.dtb` | Verified public release (`a1125`) | | **Nokia 2720 Flip** | `nokia-beatles` | Qualcomm MSM8905 (SD205) | 2x Cortex-A7 @ 1.1 GHz, 512 MB | 2.8" 240x320 + 1.3" 240x240 cover SPI (`nokia,beatles-gc9305-panel.bin`, `nokia,beatles-gc9305-ext-panel.bin`) | `qcom-msm8905-nokia-beatles.dtb` | Verified public release (`a1125`) | | **Nokia 800 Tough** | `nokia-coconut` | Qualcomm MSM8905 (SD205) | 2x Cortex-A7 @ 1.1 GHz, 512 MB | 2.4" 240x320 SPI (`nokia,coconut-gc9305-panel.bin`) | `qcom-msm8905-nokia-coconut.dtb` | Verified public release (`a1125`) | | **Nokia 8000 4G** | `nokia-sparkler` | Qualcomm MSM8909 (SD210) | 4x Cortex-A7 @ 1.27 GHz, 512 MB | 2.8" 240x320 SPI (`nokia,sparkler-gc9307-hlt-28-panel.bin`) | `qcom-msm8909-nokia-sparkler.dtb` | Verified public release (`a1125`) | | **Nokia 6300 4G** *(sibling)* | `nokia-leo` | Qualcomm MSM8909 (SD210) | 4x Cortex-A7 @ 1.1 GHz, 512 MB | 2.4" 240x320 SPI (`nokia,leo-gc9305-hlt-24-panel.bin`) | `qcom-msm8909-nokia-leo.dtb` | Source build (`rebuild-image.sh`) | --- ## Key features ### System, kernel, and display stack - **Mainline Linux 6.12 kernel**: custom patches and out-of-tree drivers for Adreno 304 (`FD304`) 3D GPU acceleration, full-bandwidth `48 kHz` QDSP6/WCD HiFi audio with lossless stereo-to-mono speaker downmixing and automatic 3.5mm headphone jack detection, Dual-SIM modem control, 2MP rear V4L2 camera (automatically upright per target), torch/flash LEDs, zero-latency `input_core` keypad chatter debouncing, calibrated `157 Hz` speaker-LRA haptics on Nokia 8000 4G (isolated during loudspeaker media playback), and event-driven standby power management (`< 95 MB` idle RAM on 512 MB devices; see [BATTERY-OPTIMIZATION-ANALYSIS.md](./BATTERY-OPTIMIZATION-ANALYSIS.md)). - **Pure X11 desktop (`Xlibre` + `sxmo-de-dwm`)**: GPU-accelerated X11 via Glamor/DRI3/GLX over `panel-mipi-dbi`, custom `240x320` vertical layouts, native desktop clock and softkey bar without Conky overhead, compiled C idle/autostart daemons, `< 2 ms` key/slider wake latency, and zero Wayland overhead. - **Nokia 2720 Flip external cover display**: kernel-driven `240x240` outer screen while the flip is closed (clock, date, battery/network indicators, caller ID with outer side-button mute/hangup, and Quagr pager alerts) alongside hall-sensor `SW_LID` handling and per-device lid profiles (`slider`, `flip`, `none`). - **Stock radio firmware and time sync**: `msm-firmware-loader` mounts factory `modem` and `persist` partitions directly so Wi-Fi, Bluetooth, and LTE run with factory calibration and zero redistributed proprietary blobs. `chronyd` (plus an optional GPS-only clock mode) keeps system time and live timezone changes synchronized across the status bar, lock screen, and cover display. ### Native keypad applications Instead of spawning slow shell scripts, Bananarchy runs 27 preloaded C/C++ DWM plugins that sleep at `0%` CPU and open in `< 2 ms`: - **Menus and quick drawer (`dmenu`, `xdrawer`)**: instant T9-filtered vertical menus, keypad-cancellable timers, dual-softkey quick drawer (volume, output routing, ringer/vibration intensity, flashlight, mic/sound mute, screen and keypad brightness), and `*` + `#` PNG screenshots to `~/Pictures/`. - **Passcode lock screen and Duress Mode (`xlocker`, `xpasscode`)**: fullscreen numeric PIN lock screen (default **`147147`**) verified against `/etc/shadow`, configurable idle blank/lock timeout, and optional plausible-deniability **Duress Mode** (blank RAM profile, unmounted microSD, hidden terminal and encrypted messaging apps, and a randomized Luhn-valid `*#06#` IMEI until reboot). - **Telephony, Dual-SIM, LTE data, and VoLTE/VoWiFi (`xdialer`, `xcalllog`, `xcallscreen`, `xcontacts`, `xsms`, `xmodem`)**: T9 contact dialer, interactive USSD, Dual-SIM Dual Standby (DSDS) with Primary/Secondary 4G slot swapping, one-key WAV call recording, 5-tab call log and threaded Unicode/concatenated SMS with shared anti-spam blocklist, QMI SIM phonebook import/export, and Qualcomm MCFG `.mbn` IMS profile management with `auto`-mode 4G-only **VoLTE** and **`SWu` VoWiFi** (`112`/`911` cellular-first emergency routing). - **Wi-Fi, cellular APN, and Bluetooth (`xnetworks`, `bananarchy-bt-obex`)**: Wi-Fi client and hotspot, USB tethering, 4G/LTE mobile data (`wwan0`) and APN editor, Bluetooth 5.x/6.x `A2DP`/`HSP`/`HFP` headset audio with AVRCP controls, BLE/Classic HID keyboards, mice, and gamepads, and Android SSP pairing with bidirectional OBEX file transfer. - **Files, media, camera, and theming (`xfiles`, `xmusic`, `xcamera`, `xthemes`, `xwallpapers`, `xringtones`)**: file manager with microSD automount (`/media/sdcard`), GUI multi-tap text editor, image viewer, `.mbn`/`.jar`/`.gb`/`.yab` launchers, `mpv` + `libopenmpt` audio and chiptune tracker player, monophonic RTTTL/eMelody/iMelody ringtone synth and previewer, V4L2 camera app, and **21 live-reloadable `.Xresources` themes**. - **Communication, web, privacy, and navigation suite**: - **SIP VoIP (`xsip`)**: RFC 3261 account-registered and direct P2P URI softphone with **ZRTP/SRTP** voice encryption and wideband/narrowband codecs (`Opus`, `G.722`, `AMR-WB`/`NB`, `G.711`, `GSM`, `G.726`, `DVI4`, `L16`). - **Email (`xemail`)**: multi-account `IMAP4rev1` / `POP3` / `SMTP` client with TLS/`STARTTLS` and offline inbox cache. - **IRC (`xirc`)**: multi-server TLS IRCv3 client with `SASL PLAIN` and background highlight alerts, preconfigured for **Abjects** (`irc.abjects.net:6697`, `#bananarchy`). - **Tox (`xtox`)**: encrypted P2P messenger and `ToxAV` 48 kHz Opus voice calls. - **Quagr (`xquagr`)**: opt-in `<= 30`-byte encrypted `ntfy` pager with 2720 Flip cover alerts. - **Webarchy (`webarchy`) and Kopher (`xkopher`)**: WebKitGTK HTML5/CSS3/JS browser (keypad link-stepping and `*#` cursor modes) alongside a Gopher, Gemini, Spartan, and Nex SmallWeb client. - **Privacy Center (`xprivacy`) and zero-log defaults**: 5-tab tunneling control (**Tor**, **GS-Warp**, **OpenVPN**, **GSocket**, **WireGuard**) for on-device and hotspot/USB-tethered traffic; system and X11 logging are **OFF** by default with optional RAM-only Extended Logging (`Config -> Extended Logging`). - **GPS and Maps (`xgps`, `bananarchy-gps`)**: live GNSS/cell status, offline-cached OpenStreetMap viewer, Nominatim search, and OSRM turn-by-turn routing. ### Input, terminal, gaming, and developer SDK - **6-mode `fcitx5-t9` keypad input**: press `#` to cycle `abc`, `Abc`, `ABC`, `Sym`, `Ctl`, and `123` modes (plus automatic direct QWERTY `[KBD]` pass-through when a USB or Bluetooth keyboard is connected). - **First-class Linux terminal (`st`)**: patched with HarfBuzz `Fira Code` OpenType ligatures, XIM T9 input, and live theme reload. - **Games and emulators**: standalone `Snake`, `Tetris`, and `Scoundrel`, **Gambatte (`gbemu`)** Game Boy / Color emulator, and **ReMEdy (`remedy`)** native `240x320` J2ME (MIDP 2.0 + Adreno 304 JSR-184 M3G 3D) emulator. - **CLI utilities and NeoUI/NeoNet SDK**: preinstalled `curl`, `git`, GNU `coreutils`, `bc`/`dc`, `mandoc`, `nano`, `less`, `ed`, `rlwrap`, `tcl`/`expect`, `frotz`, the [Bantam](https://bantam.luxferre.top/) coding agent, and **Yabasic** paired with `libneoui.so` (`neoui.h` / `neoui.yab`) and `neonet.yab` (see [SDK.md](./SDK.md)). --- ## Flashing via USB EDL (`05c6:9008`) 1. Download your target archive (`bananarchy--a1125-ampere.zip`) from the [shared download folder](https://drive.google.com/drive/folders/1jS68CQbKJPrNM7MZgV64qi6penY5g1nM?usp=sharing) and extract its `.img` files into `images/` (for `nokia-argon`, `bootloader/lk2nd-msm8909.img` is already tracked in the repo). 2. Boot the phone into Qualcomm EDL mode and run the automated flasher (uses the vendored `vendor/edl/` client and automatically backs up EFS/IMEI/modem partitions before writing): ```bash sudo ./flash-edl.sh nokia-argon # Nokia 8110 4G sudo ./flash-edl.sh nokia-beatles # Nokia 2720 Flip sudo ./flash-edl.sh nokia-coconut # Nokia 800 Tough sudo ./flash-edl.sh nokia-sparkler # Nokia 8000 4G ``` 3. On first boot, unlock the screen with the default passcode **`147147`**, connect over USB RNDIS SSH with `ssh user@172.16.42.1` (password `147147`; fallback listener on port `2222`), and use **Menu -> Power -> Reboot to loader** to reach the `lk2nd` Fastboot / EDL menu. See [MANUAL.md](./MANUAL.md) for manual `bkerler/edl`, Fastboot, and microSD installation methods, device button combinations, and complete keypad controls, and [bootloader/lk2nd/README.md](./bootloader/lk2nd/README.md) for source `lk2nd` details. --- ## Building and customizing from source A clean clone builds a complete flashable image autonomously inside rootless Docker: ```bash ./scripts/check-rebuild.sh [target] # offline preflight checks (all targets by default) ./rebuild-image.sh nokia-argon # bootstraps rootfs/ and writes images/bananarchy-.img ./rebuild-image.sh nokia-beatles --mkinitfs ./rebuild-image.sh nokia-coconut --mkinitfs ./rebuild-image.sh nokia-sparkler --mkinitfs ./prepare-release.sh # validates and packages release .zip archives ``` All cross-compiled outputs live under `prebuilt/` (synced automatically into `overlay/rootfs/` via `scripts/sync-prebuilt-overlay.sh`), and `scripts/rootfs-packages.txt` defines the `armv7` package set. Optional helper scripts let you rebuild individual layers or customize `rootfs/`: - **Artwork, X11, plugins, and input**: `./scripts/generate-artwork.py`, `./scripts/build-xlibre.sh`, `./scripts/build-sxmo-x11.sh`, `./scripts/build-dwm-plugins.sh`, `./scripts/build-dmenu.sh`, `./scripts/build-games.sh`, `./scripts/build-fcitx5-t9.sh`, `./scripts/build-bantam.sh` - **Kernel, modules, daemons, and lk2nd**: `./scripts/build-kernel-audio.sh`, `./scripts/build-bananarchy-daemons.sh`, `./scripts/build-lk2nd-beatles.sh`, `./scripts/build-lk2nd-coconut.sh`, `./scripts/build-lk2nd-sparkler.sh` - **Interactive rootfs container shell**: `./chroot-shell.sh` (`pkg-add`, `pkg-del`, `pkg-search`) --- ## Repository structure ```text bananarchy/ ├── README.md # Project overview, supported devices, and build workflow ├── CHANGELOG.md # Public release history and verified archive SHA-256 checksums ├── MANIFESTO.md # The Bananarchy Manifesto ├── MANUAL.md # Flashing, keypad, plugin, T9, camera, and modem manual ├── SDK.md # NeoUI and NeoNet SDK reference for C, C++, and Yabasic ├── flash-edl.sh / .py # Automated Qualcomm Sahara/Firehose USB EDL flasher ├── rebuild-image.sh # Builds boot.img and partitioned MBR system images ├── prepare-release.sh # Validates and packs per-device release .zip archives ├── chroot-shell.sh # Rootless Docker armv7 rootfs customization shell ├── artwork/ # Master emblem, icons, wallpapers, and boot splashes ├── bootloader/ # lk2nd secondary bootloader, source port patches, and Firehose loaders ├── devices/ # Device definitions, DTBs, and MIPI-DBI panel init sequences ├── patches/ # Kernel, EDL, Sxmo, Xlibre, and fcitx5-t9 patch sets ├── src/ # NeoUI SDK, patched dwm/dmenu/st, 27 DWM plugins, daemons, games, and kernel drivers ├── overlay/rootfs/ # System overlay applied over the target rootfs ├── prebuilt/ # Pre-compiled armv7 binaries and kernel modules (single source of truth) ├── vendor/edl/ # Vendored EDL client library (MIT) └── scripts/ # Cross-compilation, bootstrap, verification, version, and overlay scripts ``` --- ## Credits All Bananarchy-specific components were initially created by Luxferre and released into the public domain with no warranties. Alpine Linux, postmarketOS/Nura, and other third-party components are guided by their respective licensing terms.