Two issues reported after the recovery image booted: 1. Pressing the power key turned the screen on and immediately back off. Root cause: U1 used sxmo_idle.sh + xprintidle, but dwm consumes keypad events at the evdev level before X sees them, so the X idle counter never reliably reset and the blank/resume commands raced. Replaced it with a dwm-native idle timer (src/sxmo-dwm/dwm.c): last_input_ms is updated from evdev and X key events, poll() is armed with the SXMO_UNLOCK_IDLE_TIME deadline (default 60 s), bananarchy-idle-blank.sh off fires once, and wake_phone() clears idle_blanked and resets the timer on the next real key. sxmo.noidle still disables it; idle_locker was removed from sxmo_hook_unlock.sh. Added a defensive wake-grace guard to bananarchy-idle-blank.sh and a /tmp/bananarchy_last_wake timestamp in sxmo_wm.sh display on so an already-flashed device is fixed too. 2. A PIN on one SIM prevented the other SIM from registering. provision_slot() tried to bind the preferred slot to primary-gw-provisioning even when its app was pin1/puk1 or PIN1 state enabled-not-verified, so no session came up and neither subscription registered. It now detects a locked preferred slot and falls back to the other ready slot for the primary GW; verify-pin/xmodem re-run boot after unlock and provision both slots normally. Verified on the connected phone: all three deployed scripts pass sh -n, all 5 embedded Python heredocs parse, SIM status still reports both slots registered, and off -> on -> immediate off leaves the screen on (grace guard). Rebuilt dwm/plugins and images/bananarchy-nokia-argon.img with --mkinitfs; boot.img still contains the known-good zImage + DTB byte-for-byte. check-rebuild.sh passes and artifact drift is 0. Docs: CHANGELOG.md, MANUAL.md, BATTERY-OPTIMIZATION-ANALYSIS.md (section 12).
Bananarchy Linux
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:
a1105(codenamevendetta) — see the changelog for release notes. - Device builds (
a1105— codenamevendetta):- Nokia 8110 4G (
nokia-argon): https://bananarchy.top/builds/bananarchy-nokia-argon-a1105.zip
- Nokia 8110 4G (
- Project philosophy: read The Bananarchy Manifesto for the background and goals behind the distribution.
- User and flashing guide: see the user manual for installation, keypad navigation, and hardware details.
- UI and networking SDK reference: see the NeoUI and NeoNet SDK guide for building native C, C++, and Yabasic
240x320GUI and networked applications.
Key features
System and hardware support
- Mainline Linux 6.12 kernel: custom patches and out-of-tree drivers for Qualcomm Adreno 304 (
FD304, 96 KB GMEM) 3D GPU acceleration (drm/msm+qcom-iommu), Qualcomm QDSP6/Q6Voice audio routing, Dual-SIM modem control, the rear 2MP GalaxyCoreGC2395/GC2385/GC2365camera (/dev/video0), theSY7807flashlight LED (white:torch), physical keypad/slider events, and clean PM8909 poweroff. The kernel image is built fromconfig-bananarchy-msm8909.armv7with the known-good pmaports module ABI, and ships with idle-blanking power management; seeBATTERY-OPTIMIZATION-ANALYSIS.md. - Alpine Linux Edge base: full access to the Alpine package ecosystem with
< 95 MBidle RAM usage on 512 MB devices and full local root access out of the box. - Pure X11 graphical stack with GPU acceleration: cross-compiled Xlibre (
X11Libre/xserver) display server offloading 2D/3D screen rendering to the Adreno 304 GPU via Glamor, DRI3, GLX, and Mesa Freedreno (FD304, OpenGL 3.1 / OpenGL ES 3.0) overpanel-mipi-dbiKMSRO, paired with a customized Sxmo (sxmo-de-dwm) window manager (240x320vertical stack layout, nativeParentRelativedesktop clock and softkey bar without Conky overhead,< 2 msslider/key wake latency, and zero Wayland overhead).
Keypad-first user experience and native DWM plugins
Instead of spawning slow shell scripts for everyday phone tasks, Bananarchy runs a suite of 26 preloaded C/C++ plugins inside DWM that sleep at 0% CPU and open in < 2 ms:
- System and context menus (
dmenu): instant full-screen 10-line vertical menus with live T9 filtering, built-in submenus, and hardware toggles. - Passcode-based fullscreen phone locker (
xlocker), GUI passcode configurator (xpasscode), and Duress Mode: zero-bypass240x320fullscreen numeric passcode lock screen verified against the current user's system shadow password (/usr/bin/bananarchy-verify-passcode), blocking all desktop, menu, drawer, terminal, and power actions while locked and automatically handing off the display only during incoming calls. Includes a NeoUI Passcode Configurator (xpasscode/passcode.so) inConfig -> Passcodeto change the real Linux user password (user, any numeric length>= 4digits) and configure a separate Duress Passcode. Entering the duress passcode on the lock screen switches the session into Duress Mode (/tmp/duress_homeblank profile with no contacts, SMS, call logs, or personal files, microSD unmounted and disabled,xfilesclamped to the profile directory, Passcode/Privacy Center/Tox/IRC/SIP/stterminal hidden and blocked,*#06#displaying a session-persistent random Luhn-valid IMEI derived from the device's TAC, and theme/wallpaper locked toNordFrost.xthandnordic-peaks.pnguntil poweroff or reboot). - Privacy Center (
xprivacy/privacy/privacy.so) and/usr/bin/bananarchy-privacy-ctl: 5-tab NeoUI privacy and tunneling control center (1:Tor,2:Warp,3:OVPN,4:GS,5:WG, hidden and disabled in Duress Mode) with zero background CPU or battery consumption when services are turned off:- Tor (
1:Tor): start/stop the Tor anonymity daemon (SocksPort 9050,TransPort 9040,DNSPort 9053) and transparently route all native phone traffic and/or Wi-Fi hotspot (10.42.0.0/24) and USB-tethered (usb0) traffic through Tor. - GS-Warp (
2:Warp): start/stop the GSocket-tunneled OpenVPN client (gs-warp/gs-warp-simple.shovertun_gswarp), configure a custom GSocket secret string (defaulting to the MD5 of the selected.ovpnprofile), and route native and/or Wi-Fi/USB-tethered traffic through it. - OpenVPN (
3:OVPN): start/stop OpenVPN (tun_ovpn) with a custom.ovpnconfiguration file selected via the built-in file picker and route native and/or Wi-Fi/USB-tethered traffic through it. - GSocket single TCP port (
4:GS): start/stopgs-netcat(gsocket) for a single configurable TCP port with a custom GSocket secret string (clientorservermode) and transparently redirect native and/or Wi-Fi/USB-tethered traffic for that TCP port through GSocket. - WireGuard (
5:WG): start/stop a kernel WireGuard tunnel (wg0), generate keypairs (wg genkey/wg pubkey) or import.confprofiles, edit customPrivateKey, peerPublicKey, optionalPresharedKey,Endpoint,Address, andDNS, and route native and/or Wi-Fi/USB-tethered traffic through it.
- Tor (
- Zero-log privacy default and Extended Logging toggle (
xengmenu/dmenu config/bananarchy-engmenu-ctl logging): extended system and session logging is disabled by default (OFF) acrosssxmo_log,superdand its managed services,Xorg(-logfile /dev/null -logverbose 0),dwm,fcitx5(--verbose="*=0"),tinydm,NetworkManager(level=OFF),ModemManager(--log-level=ERR --log-file=/dev/null), and kernelprintk, ensuring zero eMMC log writes and zero idle logging activity. Extended RAM-only logging in/tmp(/tmp/sxmo.log,/tmp/superd.log,/tmp/superd_state/superd/logs/*.log) can be toggled at any time in the Engineering Menu (*#0001#/xengmenu->8: Extended Logging),Config -> Extended Logging, or viabananarchy-engmenu-ctl logging [on|off|toggle|status]. - Global controls drawer (
xdrawer) and*+#screenshot combo: press both softkeys together from anywhere to adjust linear (1%–100%) speaker, earpiece, and ringtone volume, audio output routing (Speaker,Earpiece,Headphoneswith automatic 3.5mm jack plug/unplug routing), ringer mode (Ring+Vib/Vibrate/Silent/DND), 3-level vibration intensity (Light/Medium/Strong), flashlight, sound and microphone mute, screen brightness, and keypad backlight; press*and#together from anywhere to capture a240x320PNG screenshot (scrotviabananarchy-screenshot) to~/Pictures/screenshot-YYYYMMDD-HHMMSS.png. - Phone dialer (
xdialer), call log (xcalllog), and call screen (xcallscreen): press any digit on the home screen to start dialing with live T9 contact matching, run interactive carrier USSD codes (*100#, etc.), or type*#06#to inspect both IMEIs. When two SIM cards are active in Dual-SIM Dual Standby (DSDS), placing a call or running a USSD code prompts to choose betweenSIM 1andSIM 2. Incoming and active calls on either SIM (as well as incoming/active VoIP calls fromxsipandxtox) open a dedicated call screen with an active[SIM 1]/[SIM 2]/[SIP]/[TOX]badge, earpiece/speaker switching, microphone mute, DTMF keypad, and one-key normalized WAV call recording (~/Recordings/rec_HHMMSS_<caller>.wav). The call log includes a 5-tab view (All,Miss,In,Out,Spam) with integrated anti-spam number blocking (~/.config/sxmo/block.tsv) that automatically hangs up blocked callers and logs them to theSpamtab without triggering missed-call notifications. - Contacts (
xcontacts) and SMS manager (xsms): full phonebook editor with direct Qualcomm QMI SIM card contact import and export across SIM 1 and SIM 2, paired with a threaded SMS conversation view that renders and scrolls full-length concatenated/Unicode (UCS-2) messages line by line, a multi-tap message composer with an encoding-aware GSM-7/UCS-2 segment counter and outgoingSIM 1/SIM 2selection when two SIMs are active, and built-in anti-spam blocklist / spam folder (~/.local/share/sxmo/block) with one-key thread blocking and restoration. - Modem and Dual-SIM manager (
xmodem): 4-tab cellular control center (SIMs,Radio,AT,Log) supporting Dual-SIM Dual Standby (DSDS) with simultaneous network registration on both SIM slots, instant default SIM switching (Set as Default SIM (Calls/SMS)), full Primary/Secondary GW (4G/Data) slot swapping (Make Primary GW (4G/Data Swap)), SIM PIN unlock and PUK unblock wizards, 2G/3G/4G radio mode selection, interactive USSD sessions, and a live AT command console. - Networks and Bluetooth manager (
xnetworks) with OBEX file transfer (bananarchy-bt-obex): 3-tab connectivity manager for Wi-Fi networks, WPA2 password entry, Wi-Fi hotspot, USB tethering, 4G/LTE mobile data (wwan0) and APN editing, and Bluetooth pairing, with built-in Bluetooth OBEX Object Push file reception (~/Downloadsstatus and receiver toggle in theBluetoothtab) and Send via Bluetooth inxfiles. - File manager (
xfiles) with microSD automount (sxmo_sdcard.sh), Bluetooth file sharing, music and tracker player (xmusic), and camera (xcamera): keypad directory browser with automatic microSD card (/dev/mmcblk1) detection and/media/sdcardmounting/unmounting, Send via Bluetooth OBEX file push to paired/discovered devices, built-in text viewer, integrated GUI multi-tap text editor (Edit in Text Editor, available as an action on any file), image viewer, and dedicated monophonic ringtone viewer (RingtoneViewfor Nokia RTTTL.nrt/.rtttl/.rtx, Ericsson eMelody.emy, and IrDA iMelody.imywith graphical piano-roll pitch contour, note sequence viewer, live audio preview, and one-key assignment as call ringtone or notification/SMS sound — plus one-click actions to launch.jar/.jadMIDlets in the ReMEdy (remedy) J2ME emulator, launch.gb/.gbcROMs in the Game Boy emulator, run.yabscripts in Yabasic inside the terminal, play audio, preview images, set any image as wallpaper, or install any audio, tracker, or monophonic melody file as call ringtone or notification/SMS sound), a 3-tab music and chiptune tracker module player (WAV,MP3,OGG,FLAC,Opus,MOD,XM,IT,S3M,NRT,RTTTL,RTX,EMY,IMY, and more), and a live V4L2 camera viewfinder with digital zoom, flash/torch control, self-timer, and photo gallery. - Native NeoUI communication and internet suite (
xsip,xemail,xirc,xtox,xkopher,webarchy):- SIP VoIP client (
xsip/sip.so): RFC 3261 SIP softphone (Dialer,Accounts,History) supporting both account-registered calling (with Digest MD5 authentication and standbyREGISTERkeepalive) and direct accountless P2P SIP URI calling (user@host[:port]orsip:user@host[:port]), RFC 3263 DNSSRV(_sip._udp.<domain>) proxy discovery and dialog routing, RFC 6189 ZRTP media-path Diffie-Hellman (DH3k/DH2k) key agreement and RFC 3711 SRTP (AES-128-CM+HMAC-SHA1-80) voice encryption with a 4-characterSASverification code, incomingINVITEringing and call handling integrated withxcallscreen([SIP/<codec>]/[SIP/<codec>:<sas>]), multi-codec wideband and narrowband RTP/SRTP audio (Opus16 kHz / 48 kHz RTP clock with in-band FEC,ITU-T G.72216 kHz wideband SB-ADPCM,G.711 PCMU/PCMA8 kHz,GSM 06.10Full Rate 8 kHz,ITU-T G.726-328 kHz ADPCM,IMA ADPCM DVI48/16 kHz, andL16uncompressed 16-bit PCM 8/16 kHz) with per-account and direct-mode codec preference selection, and RFC 2833 / RFC 4733 DTMF. - Email client (
xemail/xmail/email.so): multi-accountIMAP4rev1,POP3, andSMTPclient (Inbox,Compose,Accounts) supporting implicit TLS,STARTTLS, and plain TCP, SASLPLAIN/LOGIN, MIME RFC 2047/Base64/Quoted-Printable decoding, offline inbox cache, full-screen message reader, and composer. - IRCv3 client (
xirc/irc.so): multi-server IRC client (Buffers,Chat,Servers) with OpenSSL TLS, IRCv3 capability negotiation (CAP LS 302:sasl,server-time,message-tags,multi-prefix,away-notify,account-notify,chghost,cap-notify),SASL PLAINauthentication, slash commands, and resident background mode with highlight vibration alerts. - Tox / Trifa P2P messenger and audio call client (
xtox/tox.so): encrypted P2P messenger (Friends,Chat,My Tox ID) built onc-toxcore(libtoxcore.so.2) with DHT + TCP relay bootstrap, friend requests, persistent message history, andToxAV48 kHz Opus voice calls integrated withxcallscreen. - Kopher SmallWeb browser (
xkopher/kopher/xsmallweb/smallweb.so): multi-protocol SmallWeb client for Gopher (gopher://) with optional TLS (gophers://), Gemini (gemini://), Spartan (spartan://), and Nex (nex://), featuring WAP-style default keypad controls from Kopher, user-adjustable keybindings (~/.config/sxmo/smallweb_controls.tsv), 10 bookmarks, and custom homepage support. - Webarchy Web browser (
webarchy/xwebarchy/webarchy.so): full-featured HTML5/CSS3/JS web browser built on WPE / WebKit (webkit2gtk-4.1+libwpe-1.0) with Adreno 304 hardware acceleration (WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS, WebGL, accelerated 2D canvas, and 512 MB RAM pressure tuning), default KaiOS 4.0 User-Agent (Mozilla/5.0 (Mobile; rv:123.0) Gecko/123.0 Firefox/123.0 KAIOS/4.0) with preset and custom User-Agent override (~/.config/sxmo/webarchy_ua.txt),UTF-8default encoding fallback,Noto Sans/Noto Serif(font-noto+font-noto-emoji) as the default non-monospace browser fonts andFira Codewith OpenType ligatures as the monospace font, full GStreamer multimedia (MediaSource/ MSE, WebAudio, inline HTML5<video>/<audio>autoplay without user gesture requirements), unobtrusive bookmarking (*HTTPS/*HTTPheader badge,*+0-9save /#+0-9load chords, and bookmark manager), and dual navigation modes (keypad link-stepping mode with NeoUI multi-tap form input by default, plus an optional*#accelerated mouse cursor emulation mode).
- SIP VoIP client (
- GPS reception test utility (
bananarchy-gps) and OpenStreetMap navigator (xgps/xmaps/xnav/gps.so): CLI GNSS/GPS diagnostic tool (bananarchy-gps status|enable|disable|nmea|watch) and 3-tab NeoUI GPS navigator (1:GPS Status,2:OSM Map,3:Nav/Search) with live NMEA/QMI PDS satellite and 3GPP cell telemetry, interactive240x212OpenStreetMap slippy-map tile viewer with offline PNG tile cache (~/.cache/sxmo/osm_tiles/), Nominatim place search, saved waypoints, and OSRM turn-by-turn route geometry and step navigation. - Themes (
xthemes), wallpapers (xwallpapers), and ringtones (xringtones): installable.Xresourcescolor and font themes (~/.xthemes/*.xth, 21 preinstalled schemes includingLynxLair.xth) with live zero-restart reload across the entire UI,dunstnotification popups (bananarchy-sync-dunst-theme), and terminal, alongside dedicated managers for desktop wallpapers and 3-tab call ringtones & notification/SMS alerts (1:Ringtone,2:Notif/SMS,3:Settings, supporting standard audio, tracker modules, and Nokia RTTTL.nrt/.rtttl/.rtx, Ericsson eMelody.emy, and IrDA iMelody.imymonophonic ringtones via/usr/bin/bananarchy-melody, wired intosxmo_notifs.shandsxmo_hook_notification.sh) with 3-level vibration control.
Input, terminal, and developer tools
- 6-mode
fcitx5-t9keypad input: press#to cycle betweenabc,Abc,ABC,Sym(all 32 ASCII punctuation symbols),Ctl(Ctrlsequences, arrows,PageUp/PageDown,F1–F12), and123numeric modes with a fixed bottom candidate bar. - First-class Linux terminal (
st): patched with HarfBuzz OpenType ligatures (Fira Codeas the default system and terminal font), XIM T9 input, and live theme reloading. - On-device scripting, tools, and gaming: preinstalled
curl,git, GNUcoreutils, GNUbc/dc,mandoc,nano,less,ed,rlwrap,yabasic(with fullyabasic-docmanual and HTML documentation plus theneoui.yab/neonet.yabFFI wrappers),tcl(runtime forexpect), the Bantam coding agent,frotz(interactive fiction), OpenGL / OpenGL ES hardware diagnostics (glxinfo,eglinfo,glxgears), standalone X11 keypad games (Snake,Tetris, andScoundrelroguelike solitaire), a full-featured Gambatte-based Game Boy / Game Boy Color emulator (gambatte/gbemu) with readjustable keypad controls (B=8,Turbo B=5,A=9,Turbo A=6,D-pad,Start=2,Select=3,Palette=*), 10 color palettes, save states, and file manager.gb/.gbcintegration, and ReMEdy (remedy/j2me), a native240x320J2ME (MIDP 2.0 / CLDC 1.1) emulator with Adreno 304 hardware-accelerated JSR-184 M3G 3D graphics, NeoUI-themed high-level LCDUI widgets, socket/HTTP networking (Connector),RecordStore(RMS) persistence, MMAPI audio, readjustable keypad controls, and.jar/.jadfile manager integration. No on-device compiler, Janet, Perl, Lua, orsqlite3CLI is shipped: native code is cross-compiled withscripts/build-*.sh, while on-device programming uses the Yabasic FFI SDK.curl,bc,ed,rlwrap,mandoc,nano,less, andfrotzremain as pinned core tools. - NeoUI
240x320UI SDK (libneoui.so+/usr/include/neoui.h+neoui.yab) and NeoNet (neonet.yab): unified C-compatible FFI and C++20 UI SDK wrapping Xlib, Xft, Pango,libjpeg/libpng,.Xresources/~/.xthemes/*.xthlive theme resolution, offscreenPixmapdouble buffering, standardized OS shell widgets (headers, tabs, softkey bars, list/toggle/slider rows, input boxes, progress bars, scrollbars, modals, popup menus, and toasts), keypad/softkey chord handling, and multi-tap text entry—usable from C, C++, or Yabasic (~/Projects/neoui.yab,~/Projects/neoui_demo.yab, and~/Projects/bulls_cows.yab), paired with NeoNet (~/Projects/neonet.yaband~/Projects/neonet_demo.yab) forlibcurl-based HTTP/HTTPS requests with custom headers and TCP/TLS/UDP socket exchange in Yabasic. See SDK.md for full documentation.
Supported MSM8909 and MSM8905 devices
| Device | Codename | SoC | CPU / RAM | Display and panel firmware | Device tree (.dtb) |
|---|---|---|---|---|---|
| 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 |
| Nokia 2720 Flip | nokia-beatles |
Qualcomm MSM8905 (SD205) | 2x Cortex-A7 @ 1.1 GHz, 512 MB | 2.8" 240x320 SPI (nokia,beatles-gc9305-panel.bin) |
qcom-msm8905-nokia-beatles.dtb |
| Nokia 800 Tough | nokia-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 |
| Nokia 8000 4G | nokia-sparkler |
Qualcomm MSM8909 (SD210) | 4x Cortex-A7 @ 1.1 GHz, 512 MB | 2.8" 240x320 SPI (nokia,sparkler-gc9307-hlt-28-panel.bin) |
qcom-msm8909-nokia-sparkler.dtb |
| 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 |
Repository structure
bananarchy/
├── README.md # Project overview, repository layout, and build workflow
├── CHANGELOG.md # Public release build history
├── MANIFESTO.md # The Bananarchy Manifesto
├── MANUAL.md # Complete flashing, keypad, plugin, T9, camera, and modem manual
├── SDK.md # NeoUI 240x320 UI SDK reference for C, C++, and Yabasic
├── flash-edl.sh # Automated USB EDL flasher wrapper (sudo + ModemManager handling)
├── flash-edl.py # Multi-device Qualcomm Sahara/Firehose EDL flasher
├── rebuild-image.sh # Builds boot.img and partitioned MBR .img
├── chroot-shell.sh # Rootless Docker armv7 package and rootfs customization shell
├── artwork/ # Bananarchy master icon, generated icons, wallpapers, and splashes
├── bootloader/ # lk2nd secondary bootloader and Sahara/Firehose programmer (8110.mbn)
├── devices/ # Device definitions, DTBs, and MIPI-DBI panel init sequences
├── patches/ # Upstream kernel, EDL, Sxmo, Xlibre, and fcitx5-t9 patch sets
├── src/
│ ├── neoui/ # NeoUI 240x320 UI SDK (libneoui.so + /usr/include/neoui.h, C FFI & C++20)
│ ├── sxmo-dwm/ # Patched sxmo-dwm (240x320 bstack, Pango bar, softkey bar, and plugin API)
│ ├── dwm-plugins/ # DWM plugins (locker, passcode, dialer, calllog, callscreen, contacts, sms,
│ │ # files, camera, themes, modem, networks, ringtones, wallpapers, music, sip,
│ │ # email, irc, tox, smallweb, webarchy, gps, privacy, engmenu) and runner
│ ├── xdrawer/ # XDrawer global phone controls DWM plugin (xdrawer.so / xdrawer)
│ ├── sxmo-dmenu/ # Resident DWM menu plugin (dmenu.so) and client (dmenu / xdmenu)
│ ├── sxmo-st/ # Patched sxmo-st terminal with HarfBuzz Fira Code ligatures and XIM
│ ├── xf86-input-libinput/ # Xlibre xf86-input-libinput DDX driver
│ ├── xf86-video-fbdev/ # Xlibre xf86-video-fbdev fallback DDX driver
│ ├── fcitx5-t9/ # 6-mode fcitx5-t9 keypad input method
│ ├── games/ # Standalone keypad X11 games, Gambatte GB/GBC, and ReMEdy J2ME (snake, tetris, scoundrel, gambatte, remedy)
│ ├── leds-msm8905-torch/ # Kernel driver for SY7807 torch LED, WCD codec init, and PON shutdown
│ └── msm8905-cam/ # Kernel V4L2 driver for GC2395/GC2385/GC2365 2MP rear camera (/dev/video0)
├── overlay/rootfs/ # System configuration overlay applied over the target rootfs
├── prebuilt/ # Pre-compiled armv7 binaries and kernel modules (single source of truth)
├── vendor/edl/ # Vendored, patched EDL client library (MIT) used by flash-edl.py
└── scripts/ # Cross-compilation, bootstrap, verification, version, and overlay scripts
# rootfs-packages.txt: single source of truth for the armv7 package set
# bootstrap-rootfs.sh: builds a complete rootfs from a clean clone
# check-rebuild.sh: offline rebuild preflight
# sync-prebuilt-overlay.sh: mirrors prebuilt/ into overlay/rootfs/
Build and customization workflow
0. Rebuild from a clean clone (autonomous)
A fresh git clone contains everything required to produce a flashable image. Docker, Python 3, and network access are the only host requirements:
./scripts/check-rebuild.sh # optional offline preflight
./rebuild-image.sh nokia-argon # bootstraps rootfs/, then builds images/
rebuild-image.sh performs the whole pipeline without manual preparation:
- Runs
scripts/check-rebuild.shto validate shell and Python syntax, the package list, plugin artifacts, overlay sync, and the ignored local agent config. - Mirrors
prebuilt/intooverlay/rootfs/withscripts/sync-prebuilt-overlay.shso the tracked overlay snapshot never drifts. - Creates a complete
armv7rootfs fromscripts/rootfs-packages.txtwhenrootfs/is missing or stale, usingscripts/bootstrap-rootfs.sh(rootless Docker, Alpineedgeand postmarketOSv26.06repositories, and the trusted keys inkeys/). - Applies the overlay and prebuilt artifacts, regenerates the initramfs, and writes
images/bananarchy-<device>.img.
The bootstrap is idempotent and safe to re-run; ./chroot-shell.sh uses it too. Override ROOTFS_DIR, IMAGES_DIR, or BANANARCHY_USER_PASSWORD to change the defaults. Run ./scripts/bootstrap-rootfs.sh --check to report whether a rootfs needs bootstrapping, or --force to rebuild its configuration.
All cross-compilation scripts write to prebuilt/, which is the single source of truth for compiled artifacts. After running any build-*.sh script, rebuild-image.sh automatically refreshes the matching files in overlay/rootfs/.
1. Regenerate artwork assets
Whenever artwork/icon-large.png is updated, regenerate all icons, 240x320 wallpapers, and animated boot splashes:
./scripts/generate-artwork.py
2. Recompile core components (optional — prebuilts included)
All components are pre-compiled in prebuilt/ and overlay/rootfs/, and can be rebuilt from source at any time using rootless Docker (alpine:3.24):
# Rebuild cross-compiled Xlibre (X11Libre/xserver) + Glamor/GLX + libinput/fbdev DDX drivers
./scripts/build-xlibre.sh
# Rebuild patched sxmo-st, sxmo-dmenu, sxmo-dwm, and all 26 DWM plugins
./scripts/build-sxmo-x11.sh
# Rebuild standalone X11 games and emulators (snake, tetris, scoundrel, gambatte, remedy)
./scripts/build-games.sh
# Rebuild multi-mode fcitx5-t9 input engine
./scripts/build-fcitx5-t9.sh
# Fetch latest master from https://code.luxferre.top/luxferre/bantam-cpp and cross-compile Bantam AI agent
./scripts/build-bantam.sh
# Rebuild Linux 6.12.1-msm8916 Adreno 304 DRM/MSM GPU module, QDSP6/Q6Voice audio modules, torch LED module, camera module, and DTBs
./scripts/build-kernel-audio.sh
3. Customize rootfs packages or configs
./chroot-shell.sh
# Inside the container shell:
# pkg-add <pkg>
# pkg-del <pkg>
# pkg-search <pattern>
4. Build flashable device images
# Build for Nokia 8110 4G (default)
./rebuild-image.sh nokia-argon
# Or build for Nokia 2720 Flip, Nokia 800 Tough, or Nokia 8000 4G:
./rebuild-image.sh nokia-beatles --mkinitfs
./rebuild-image.sh nokia-tough --mkinitfs
./rebuild-image.sh nokia-sparkler --mkinitfs
Output images are written to images/:
images/bananarchy-<device>.img: partitioned MBR image withpmOS_boot+pmOS_rootfor EDLuserdata,fastboot flash userdata, or a microSD card.
Flashing via USB EDL (05c6:9008)
sudo ./flash-edl.sh nokia-argon
The patched EDL client library is vendored under vendor/edl/ (MIT), so a clean clone flashes without any manual download. flash-edl.sh also installs pyusb and pyserial into the gitignored .flash-deps/ directory when the host lacks them; set BANANARCHY_EDL_DIR to use a different library checkout.
See MANUAL.md for complete EDL, Fastboot, and microSD installation instructions, keypad navigation shortcuts, and the multi-mode T9 reference.
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.
