This manual covers flashing, operating, and customizing **Bananarchy Linux** (`240x320` native edition) on **Qualcomm MSM8905 and MSM8909** Nokia feature phones. Current release: `a1108` (codename `dejavu`); see the [changelog](./CHANGELOG.md) for release notes.
-`images/bananarchy-nokia-argon.img`: partitioned MBR image (`256 MiB``ext2``pmOS_boot` + `ext4``pmOS_root`) ready for EDL flashing to `userdata`, `fastboot flash userdata`, or raw `dd` to a microSD card.
- Additional device images (`bananarchy-nokia-beatles.img`, `bananarchy-nokia-tough.img`, `bananarchy-nokia-sparkler.img`) can be generated at any time via `./rebuild-image.sh <device> --mkinitfs`.
-`bootloader/lk2nd-msm8909.img`: secondary bootloader (`lk2nd`) providing Fastboot and `extlinux` boot discovery for MSM8905 and MSM8909 devices. `images/boot-lk2nd-nokia-beatles-display.img` is the source-built 2720 Flip port (see `bootloader/lk2nd/README.md`).
-`bootloader/loaders/`: signed Qualcomm Sahara/Firehose programmers (`05c6:9008`), one per target. The flasher picks the right one from `--device` / the positional target; run `./flash-edl.sh --list-loaders` to see each file's embedded attestation identity and mapping. Pass `--variant us` for a 2720 Flip US variant or `--loader PATH` to override the programmer entirely.
- **Patched `dwm`** provides a `240x320` vertical bottom-stack (`bstack`) layout, a 24px top status bar, a transparent `"Menu"` / `"Names"` desktop softkey bar, a native `ParentRelative` desktop datetime overlay (`Fira Code` 32pt `%H:%M` and 14pt `%a %d %b %Y` with 1px drop shadow, rendered directly by `dwm` with zero external Conky process overhead and automatic live timezone/wallpaper refresh), and `< 2 ms` handling of physical slider (`SW_LID`) and wake keys. The status bar clock is refreshed synchronously on unlock, whenever dmenu updates its input-method indicator, and every minute by a lightweight aligned job (the heavier status bar periodics stay at 300 s). Its status file is kept current even while the panel is blanked, so it cannot keep showing a pre-lock time after the panel wakes. Network state changes are handled by the NetworkManager dispatcher instead of a long-lived `nmcli device monitor`, so connectivity stays immediate without an idle poller.
- All UI elements — including the `dunst` notification daemon (`bananarchy-sync-dunst-theme`) — share the **NeoUI SDK (`libneoui.so` + `/usr/include/neoui.h`)** and a single **XRDB theming engine** (`~/.xthemes/*.xth` -> `~/.Xresources`) with 21 preinstalled color schemes, proportional font sizing (`theme.baseFontSize`), and live reload without restarting X11. NeoUI exposes both C++20 classes and a C-compatible FFI (`neoui_*`) for building custom native or scripted (`yabasic` via `~/Projects/neoui.yab`, `~/Projects/neoui_demo.yab`, and `~/Projects/bulls_cows.yab`, paired with **NeoNet** in `~/Projects/neonet.yab` and `~/Projects/neonet_demo.yab` for `libcurl` HTTP/HTTPS and TCP/TLS/UDP socket networking) `240x320` GUI applications — see [SDK.md](./SDK.md) for the complete API reference and examples.
-`curl`, `git`, GNU `coreutils`, GNU `bc`/`dc`, `nano`, `ed`, `less`, `rlwrap`, `mandoc`, `yabasic` (with the `neoui.yab` / `neonet.yab` FFI wrappers), `bantam` coding agent, `tcl` (runtime for `expect`), `frotz`, `ffmpeg`, `mpv`, `imv`, standalone `snake`, `tetris`, and `scoundrel` X11 games, the `gambatte` Game Boy / Game Boy Color emulator, and the **ReMEdy (`remedy` / `j2me`)**`240x320` J2ME (MIDP 2.0 / CLDC 1.1) emulator. No on-device compiler, Janet, Perl, Lua, or `sqlite3` CLI is shipped; native code is cross-compiled with `scripts/build-*.sh`. `curl`, `bc`, `ed`, `rlwrap`, `mandoc`, `nano`, `less`, and `frotz` are the pinned core tools.
*(To flash another target device image, pass its codename, e.g. `sudo ./flash-edl.sh nokia-sparkler`.)* The programmer is selected automatically: `8110.mbn` (8110 4G), `2720.mbn` (2720 Flip), `800t.mbn` (800 Tough), and `8k.mbn` for **both** 8000 4G and 6300 4G. The 2720 Flip US variant (`Nokia_bts_us`) uses `2720v.mbn`: pass `--variant us` (or `--loader ./bootloader/loaders/2720v.mbn`). Verify with `./flash-edl.sh --list-loaders`.
- **From Bananarchy Linux**: open the **Power** menu (`End / Power` key or `System menu -> Power`), select **Reboot to bootloader** (`sxmo_power.sh bootloader`) to enter the visible `lk2nd` Fastboot menu, then select **EDL** (or let `flash-edl.sh` automatically send `fastboot oem reboot-edl`). The low-bit reboot cookie now survives the stock boot chain and keeps the menu available.
5. Flashes `images/bananarchy-<device>.img` to `userdata`, clears the stock `system` superblock (first 64 sectors / 32 KiB), and reboots. This wipe is the default for every method; pass `--no-wipe-system` only if you deliberately want a dual-boot phone with KaiOS intact. **The default `--method lk2nd` writes the source-built `images/boot-lk2nd-nokia-beatles-display.img` into `boot`, and the standalone `images/boot-bananarchy-nokia-beatles.img` into `recovery` on the 2720 Flip (Argon-shaped hybrid).** That lk2nd image is built from upstream lk2nd plus `bootloader/lk2nd/nokia-beatles.patch`: it carries cmdline `lk2nd lk2nd.compatible=nokia,beatles`, keeps the upstream QCDT layout (both `0x14b` entries sharing one DTB), injects a compact `/lk2nd/nokia-beatles` node with the downstream GC9305 v2 panel init stream, and adds `/cpus` with `cpu@0`..`cpu@3` to every QCDT DTB. The 2720's MSM8905 is a partial-goods 2-core part; aboot `ASSERT FAILED at (platform/msm_shared/partial_goods.c:80)` and rebooted into Sahara memory-debug EDL because upstream lk2nd DTBs had no `/cpus` — that was the black-screen/no-fastboot crash. aboot hands off to lk2nd, which keeps aboot's 240x320 RGB565 panel init (or replays the downstream stream when cont-splash is off), then scans `userdata` for `extlinux.conf` and boots `vmlinuz` + `initramfs` with the explicit `fdt /qcom-msm8905-nokia-beatles.dtb`. Rebuild it with `scripts/build-lk2nd-beatles.sh`; see `bootloader/lk2nd/README.md`. The port paints the Bananarchy RGB565 boot splash instead of the near-black upstream splash; the branded screen confirms lk2nd owns the framebuffer. Live `oem display-init` proved the GC9305 v2 stream and frame flush, chain-loaded diagnostics now fall back to the QCDT panel stream, and `oem scan-dtb` captures the final post-update kernel DTB. The release image is display-enabled (`lk2nd.display=on`) so the branded splash and Fastboot menu are visible; the normal no-display image remains available for diagnostics. All QUP/clock polls are bounded, so a dead SPI bus reports a failure instead of hanging. If the phone never shows anything, run `lsusb`: `05c6:900e` means aboot crashed into EDL (Sahara MEMORY_DEBUG), not that lk2nd failed to display; the `/cpus` fix above addresses the confirmed ASSERT. Flash `images/boot-lk2nd-nokia-beatles-diagnostic.img` with `--lk2nd-image --verify --dump-diagnostics` (forced fastboot + runtime `oem display-init` probe), then `fastboot oem log && fastboot get_staged lk2nd.log`; if it returns to `900e`, re-read aboot's RLOG crash buffer (the untouched `bootloader/lk2nd-msm8909.img` lacks `/cpus` as well and crashes identically). See `bootloader/lk2nd/README.md`. If the KaiOS splash persists on a normal power-on, **hold Volume Up** to boot the mainline boot.img in `recovery`. `--method both` is the fallback that writes the standalone `images/boot-bananarchy-nokia-beatles.img` (appended beatles DTB, exact qcom IDs and 512 MiB `/memory` fallback) into both slots; `--method recovery` writes it only to `recovery`. Use `--boot-image PATH` to override the standalone image. Add `--verify` to read back every flashed `boot`/`recovery` partition and confirm the write really committed; a mismatch aborts before `userdata` is touched. Add `--dump-diagnostics` to save small `devinfo`/`aboot`/`tz`/`config` partitions into `backup/diag-*.img` for offline secure-boot analysis. The captured `diag-devinfo.img` proved this 2720 is locked (`is_unlocked=0`, `is_tampered=0`) while `diag-aboot.img` contains `Nokia_beatles ROOT CA0` and `Device is unlocked! Skipping verification...`; aboot therefore rejects every unsigned boot.img. The flasher defaults to unlocking `devinfo` on `nokia-beatles` before writing lk2nd, saves the original as `backup/devinfo-locked-<device>.img`, and accepts `--unlock-bootloader` / `--no-unlock-bootloader`. `scripts/make-unlocked-devinfo.py` can produce the patched image offline. Correction: `target_get_vb_version()` returns `VB_L` on this GPT (no `keymaster`), so aboot reads eMMC `devinfo`, not RPMB. The captured `diag-devinfo.img` afte
1. Enter the `lk2nd` Fastboot menu either by selecting **Reboot to bootloader** from the **Power** menu (`sxmo_power.sh bootloader`) or by holding **D-Pad down** while powering on the phone.
| **Left softkey (`Menu`)** | `XF86KbdLcdMenu1` (`KEY_MENU`) | Open **System menu**, close open menu, or wake screen (if locked, opens **Passcode Locker** `xlocker`) |
| **Right softkey (`Names` / `Back`)** | `XF86KbdLcdMenu2` / `BackSpace` (`KEY_BACK`) | On empty desktop: open **Contacts (`Names`)**; inside apps: open **App context menu** (or close menu if open); in T9 preedit: `BackSpace` |
| **Call (green)** | `XF86PickupPhone` / `XF86Phone` (`KEY_SEND`) | Answer incoming call when ringing; on empty desktop: open **Call Log** (`xcalllog`); in menus: confirm (`Return`); in apps: **2x** focus next window, **3x** cycle tiling layout |
| **End / Power (red)** | `XF86PowerOff` | Wake or blank screen while passcode-locked, close open plugin/menu, or: **1x** open **Power menu**, **2x** lock phone with passcode (`xlocker`), **3x** (or hold `400ms`) launch a new terminal |
| **Slider close / open** | `SW_LID` (`lid:on` / `lid:off`) | **Close**: close open menu, turn off keypad backlight, and lock phone with passcode (`xlocker`); **Open**: restore screen and keypad backlight and show passcode lock screen |
> While unlocked (and with the lid open), the display blanks automatically after the configured **Screen blank** timeout — **5 minutes by default** — via `dwm`'s own evdev input timer and `bananarchy-idle-blank.sh`. Change it in **Config -> Screen blank** (`Off`, 30 s, 1/5/10/30 min), which writes `~/.config/sxmo/idle_blank_timeout`; `bananarchy-idle-timeout.sh get|label|set <seconds>` does the same from the shell, and `SXMO_UNLOCK_IDLE_TIME` or `~/.cache/sxmo/sxmo.noidle` still override/disable it. Closing the slider/lid or locking from the **Power** menu blanks the panel **immediately** (both `Lock` and `Lock (Screen off)` now use `xlocker screenoff`), and an incoming call or SMS/notification turns it back on **immediately** via `bananarchy-screen-wake.sh`, which also resets `dwm`'s idle timer so it cannot blank again right away. Any keypad, lid or power key also restores the display; if it arrives before the idle-lock delay elapses, the desktop stays unlocked. Blanking now arms the screenlock daemon: `bananarchy-idle-blank.sh` calls `bananarchy-idle-lock.sh arm`, which starts the trusted `sxmo_state.sh set screenoff` transition (`xlocker screenoff` -> `LOCK_BLANK` on `locker.so`) after **30 seconds** of dark panel by default. Set `~/.config/sxmo/idle_lock_delay` with `bananarchy-idle-lock.sh set 0` to lock immediately on blank, any other number of seconds to change the grace period, or `set off` to keep the old blank-without-passcode behaviour. `bananarchy-idle-lock.sh get|label|cancel` reports and cancels the pending lock; `bananarchy-screen-wake.sh`, `bananarchy-idle-blank.sh on` and `sxmo_hook_unlock.sh` cancel it on every wake, and the transition only fires while the panel is still dark. X11 screensaver timeouts stay at `0 0 0`; DPMS is driven by the backlight state. Optional **deep standby** is currently **unavailable**: the shipped kernel keeps the pmaports module ABI and has no sleep states in `/sys/power/state`. It stays disabled via `/etc/bananarchy-no-deep-standby`. Even a full custom kernel module tree would not help here: this firmware has no PSCI `SYSTEM_SUSPEND`, so only s2idle (`freeze`) would be possible, without DDR self-refresh, and the saving would be under 1 mA (see `BATTERY-OPTIMIZATION-ANALYSIS.md`). Active calls, SSH sessions and VPN/tether connections would block suspension. Locking the phone (`Power -> Lock`, `Power -> Lock (Screen off)`, `2x End / Power`, or closing the physical slider) activates the fullscreen `240x320` **Passcode Locker (`xlocker` / `locker.so`)**, which verifies your numeric system password (`147147` by default, checked against `/etc/shadow` via `/usr/bin/bananarchy-verify-passcode`). While locked, there is no keypad, softkey, slider, or power-button bypass (`dmenu`, `xdrawer`, terminal spawning, and desktop shortcuts are blocked, and only incoming calls can temporarily overlay `xcallscreen`). Screen and keypad brightness levels configured in **XDrawer** or **Config -> Brightness** are persisted in `~/.config/sxmo/brightness` and `/tmp/sxmo_saved_brightness` and restored on every wake.
> **Runtime power policy (`/etc/bananarchy-power-policy.conf`)**:
> `WIFI_LISTEN_INTERVAL` (1-10, default 5) sets the `wcn36xx` beacon listen interval via `/etc/modprobe.d/10-bananarchy-power.conf`; higher values cut idle Wi-Fi RX wakeups but delay inbound packets, and the change applies at module load (reboot or reload `wcn36xx`). `MODEM_DRX_MODE` (default `0`) applies the Qualcomm `AT$QCDRX` DRX mode at boot and on every wake; `6-9` are progressively longer paging cycles that lower modem idle current at the cost of call/SMS setup latency, while `0` is the firmware default. The standard `AT+CPSMS` / `AT+CEDRXS` PSM/eDRX commands are not supported by this modem firmware. `DSDS_SECONDARY_MODE=eco` (default `active`) deactivates the secondary SIM's GW provisioning session after `DSDS_PARK_DELAY` seconds (default 300) of a dark panel and restores it on wake; **SIM2 is unreachable while parked**. This uses QMI provisioning sessions, not SIM power-off, so a PIN-locked SIM stays locked. Edit the file as root and run `doas /usr/bin/bananarchy-power-policy.sh apply`, or reboot; `doas /usr/bin/bananarchy-power-policy.sh status` reports the effective values. DDR self-refresh / `mem` suspend is unavailable on this firmware (no PSCI `SYSTEM_SUSPEND`); see `BATTERY-OPTIMIZATION-ANALYSIS.md` §15.
#### 3.1.1 Window tiling modes and switching combos
By default, `dwm` uses the **vertical bottom-stack (`bstack`, `TTT`)** layout so multiple `st` terminals stack **vertically (one under another)** to preserve full line width on the `240x320` portrait screen.
You can switch layouts, focus, and workspaces using the **Window management menu (`Windows`)** (accessible via `Left softkey -> Windows`, or by pressing **Right softkey** inside non-terminal applications, or selecting `Windows` from the `st` terminal context menu), physical keypad multi-presses, or an external keyboard (`Mod4` / `Super`):
- **Window management menu (`WM Menu`)**: provides instant C-level window actions (`Move to WS 1`..`4`, `Shift stack`, `Swap stack`, `Toggle Layout`, `Kill window`, and `Go to WS 1`..`4`), plus `Close Terminal` in the `st` context menu.
All twenty-five phone applications are compiled as shared-object plugins (`/usr/lib/dwm/plugins/*.so`), preloaded at `dwm` startup, and awakened over `/tmp/dwm_plugin_<name>.fifo` in `< 2 ms`:
1. **System and context menus (`dmenu.so` / `dmenu` / `xdmenu`)**:
- **Open / close**: press **Left softkey (`Menu`)** for the **System menu** or **Right softkey (`Back`)** inside an application for its **Context menu**; press the same softkey or `Escape` to close.
- **Built-in submenus and instant toggles**: renders `sys`, `applications`, `scripts`, `modem`, `config`, `sdcard`, `power` (including **Lock**, **Lock (Screen off)**, **Logout**, **Reboot**, **Reboot to bootloader**, and **Poweroff**; use the lk2nd Fastboot menu for **EDL**), `audio` (with linear volume steps and **Output: Speaker**, **Output: Earpiece**, and **Output: Headphones** routing), `notifications`, `wm`, `timezone`, `games`, `st`, and `nano` menus in place in `< 0.5 ms` without spawning external processes.
- **Script compatibility**: any script piping items into `/usr/bin/dmenu` or `sxmo_dmenu.sh` communicates with the resident daemon over `/tmp/dwm_plugin_dmenu.sock`.
- **Open**: press any **`0`–`9`, `*`, or `#` key** on the empty desktop, or open **Dialer** from the System menu or Call Log.
- **Dialing and T9 search**: typing digits filters saved contacts and recent numbers by phone number and T9 name in real time. Hold **`0`** (`>= 420 ms`) or press `Right` / **Left softkey (`+Sign`)** to insert `+`.
- **USSD codes and `*#06#` Dual-SIM IMEI display**:
- Typing **`*#06#`** immediately opens the **Device IMEI (`*#06#`)** dialog showing `IMEI 1`, `IMEI 2`, and `IMEI SV`.
- Typing any USSD code (`*...#` or `#...#`, such as `*100#`) switches the center softkey to **`SEND`**. Pressing **Call (green)** or **Center `OK`** runs the USSD session inside an interactive in-dialer modal with scrollable carrier output and multi-step reply support (prompting for **SIM 1** or **SIM 2** first when two SIM cards are active in DSDS).
- **Controls**: `Left`/`Right` switches between **`All`**, **`Miss`**, **`In`**, **`Out`**, and **`Spam`** tabs; `Up`/`Down` scrolls; **Call (green)** or **Center `OK`** dials the selected entry.
- **Anti-spam blocklist (`~/.config/sxmo/block.tsv`)**: press **Left softkey (`Options`)** to **Block Number (Spam)** or **Unblock Number**, open **Blocklist (N)** to manage blocked numbers, **Block a Number...** (supports exact numbers, 9-digit suffix matching, or prefix wildcards ending with `*`), or **Clear Spam Log** (`~/.local/share/sxmo/block/modemlog.tsv`). Incoming calls from blocked numbers are automatically hung up and recorded in the `Spam` tab without triggering missed-call notifications.
- **Automatic activation and Dual-SIM selection**: wakes the screen and opens automatically on incoming and outgoing calls across both SIM slots (displaying a `[SIM 1]` or `[SIM 2]` badge in the header when Dual-SIM Dual Standby is active). When initiating an outgoing call with two SIMs inserted, `xcallscreen` prompts to choose **`[1] SIM 1`** or **`[2] SIM 2`** (`1`/`2` keys or `Up`/`Down` + `Call`/`Enter`). Pressing **Call (green)** during an active call reopens `xcallscreen` from anywhere.
- **Incoming call actions**: press **Call (green)**, **Left softkey (`Accept`)**, **`1`**, or **Center `OK`** to answer; press **`*`** or **`0`** to silence the ringer; press **End (red)**, **Right softkey (`Reject`)**, or **`#`** to decline.
- **`[2]` / `#` — call recording**: starts or stops recording call audio (`8 kHz` mono S16_LE WAV via `MultiMedia2` `hw:0,1` with automatic peak normalization) to `~/Recordings/rec_HHMMSS_<caller>.wav`, displaying a live `REC MM:SS` timer while recording and a persistent green `SAVED MM:SS` badge once saved.
- **`[3]` — audio route**: cycles between **`BLUETOOTH`** (when a Bluetooth headset is connected, routing call audio over QDSP6 `INT_BT_SCO_RX` / `INT_BT_SCO_TX`), **`SPEAKER`**, and **`EARPIECE`** (or **`HEADPHONES`** when wired headphones are plugged in).
- **Open**: press the **Right softkey (`Names`)** on the empty desktop, or select **Contacts** from the System menu.
- **Search and actions**: type `0`–`9` for live T9/number filtering; press **Call (green)** to dial immediately; press **Center `OK`** for the contact details card (**Call Contact**, **Send SMS**, **Read Messages**, **Open in Dialer**, **Copy to SIM**, **Edit Contact**, **Delete Contact**); or press **Left softkey (`Options`)** for phonebook-wide actions.
- **Direct Dual-SIM QMI phonebook import and export**: select **Import from SIM** or **Export to SIM** in the **Options** menu (or **Copy to SIM** on an individual contact) to read or write `EF_ADN` SIM phonebook records directly over Qualcomm QMI UIM (`qrtr://0`) on either **SIM 1** or **SIM 2** — even on the inactive SIM slot.
- **Built-in contact editor**: create or edit contacts directly on the keypad (`#` cycles input mode, `*` inserts space, hold `0` or press `Right` for `+`, or pick from recent unknown callers).
- **Conversations, inbox, and spam folder**: browse SMS threads and drafts with contact name resolution, unread indicators, and message bubbles (`Recv` and `Sent`). Press `Left`/`Right` in the thread list (or use **Left softkey (`Options`)**) to switch between **`Inbox`** (`~/.local/share/sxmo/modem`) and the **`Spam`** folder (`~/.local/share/sxmo/block`).
- **Full-length messages**: open a thread with **Center `OK`** to read the complete text of long, concatenated, or Unicode (`UCS-2`) messages. Message bodies are drawn line by line and clipped to the bubble, so a multipart message is never cut off at its first line. `Up`/`Down` scrolls inside the selected message (a scrollbar on the right edge shows the position) and steps to the previous/next message once the top or bottom is reached; **Right softkey (`Back`)** returns to the thread list. The QMI WMS daemon reassembles 8-bit and 16-bit concatenated SMS across GSM-7 and UCS-2 (including split surrogate pairs) before writing `sms.txt`, and the `[SIM n]` tag in its log header is stripped when parsing.
- **Anti-spam blocking**: press **Left softkey (`Options`)** on any thread or conversation to **Block Number (Spam)** (which adds the sender to `~/.config/sxmo/block.tsv` and moves their thread into the `Spam` folder), **Unblock & Restore** (which unblocks the sender and restores their thread to `Inbox`), **Manage Blocklist (N)**, or **Block a Number...**. Incoming texts from blocked numbers are silently routed into `~/.local/share/sxmo/block` without ringing or vibrating.
- **Multi-tap composer**: pick a recipient from Contacts/Recents or type a number (hold `0` for `+`), compose messages with multi-tap keypad entry (`#` cycles input mode), monitor live character/segment counts, save drafts automatically, and send via **Call (green)**, **Center `OK`**, or **Left softkey** (prompting to select **SIM 1** or **SIM 2** when two SIM cards are active in DSDS). The counter is encoding-aware: GSM-7 text shows `units/160` (or `units/306x2` for two concatenated parts at 153 septets each), while any character outside the GSM 7-bit alphabet (for example Ukrainian `є`, `і`, `ї`, `ґ`, or a supplementary-plane character) switches the whole message to UCS-2 and shows `units/70` (or `units/134x2` at 67 UTF-16 units per part). Long composed text is drawn line by line and scrolled so the end of the draft stays visible.
- **Controls and viewers**: navigate directories with `Up`/`Down`/`Left`/`Right`/`Return`, filter with `0`–`9`, toggle dotfiles with `*`, and cycle sort order (**Name** / **Date** / **Size**) with `#`.
- **Integrated GUI text editor (`Edit in Text Editor`)**: available as an action in the **Left softkey (`Actions`)** menu for **any non-directory file** (as well as via **Left softkey (`Edit`)** from the built-in text viewer, or automatically after **New File**):
- **Navigation**: `Up`/`Down`/`Left`/`Right` moves the cursor across lines and UTF-8 characters with automatic vertical and horizontal viewport scrolling and line numbers (`Ln:Col`).
- **Multi-tap keypad text entry**: type with `0`–`9` and `*` (with a live bottom candidate bar), press `#` to cycle input modes (`[abc]` -> `[Abc]` -> `[ABC]` -> `[123]` -> `[Sym]`), press **Center `OK` (`Return`)** to split the line / insert a newline, and press **Right softkey (`Del`)** or `BackSpace` to delete the character before the cursor (or join with the previous line at column `0`).
- **Editor menu (`Left softkey`)**: opens the editor menu with **Save File** (press **Left softkey** twice to save immediately), **Save & Close**, **Insert New Line**, **Insert Space**, **Duplicate Line**, **Delete Line**, and **Close Without Saving**.
- **Yabasic (`.yab`) script execution**: pressing `Return` on any `.yab` file (or selecting **Run in Yabasic (Terminal)** from the **Left softkey (`Actions`)** menu) launches `yabasic` inside `st` in the file's directory and waits for `Enter` after completion so output can be inspected.
- **J2ME (`.jar` / `.jad`) MIDlet launching**: pressing `Return` on any `.jar` or `.jad` file (or selecting **Run in ReMEdy (J2ME)** from the **Left softkey (`Actions`)** menu) opens it directly in the **ReMEdy (`remedy`)** full-screen `240x320` J2ME emulator; `.jad` files also include a **View JAD Descriptor** action in the **Actions** menu.
- **Game Boy / Game Boy Color ROM launching**: pressing `Return` on any `.gb` or `.gbc` file (or selecting **Play in Game Boy Emulator** from the **Left softkey (`Actions`)** menu) opens it directly in the **Gambatte (`gambatte`)** emulator.
- **Image preview and wallpaper installation**: pressing `Return` on any image file (`.jpg`, `.png`, `.bmp`, `.gif`, `.webp`, `.ppm`, `.tif`, `.ico`, `.svg`) opens the built-in image viewer (`*` toggles full-screen preview; **Left softkey (`Set Wall`)** installs the image into `~/Pictures/Wallpapers/`, applies it via `feh`, and refreshes the desktop overlay). You can also select **Preview Image** or **Set as Wallpaper** directly from the **Left softkey (`Actions`)** menu.
- **Monophonic ringtone viewer (`.nrt`, `.rtttl`, `.rtx`, `.emy`, `.imy`), audio playback, and ringtone/notification installation**: pressing `Return` on any Nokia RTTTL (`.nrt`, `.rtttl`, `.rtx`), Ericsson eMelody (`.emy`), or IrDA iMelody (`.imy`) file opens the built-in **Ringtone Viewer** (`RingtoneView`), displaying the melody title, format tag, BPM, note count, duration, graphical piano-roll pitch contour, and scrollable note sequence (`Up`/`Down`), with instant playback preview (`*` or `Center OK`), `Left`/`Right` to step through ringtones in the current folder, **Left softkey (`Set Ring`)** to set as the active call ringtone, **`#`** to set as the active notification/SMS sound, and `1` to edit the melody text. Pressing `Return` on standard audio or tracker module files opens **Music (`xmusic`)**. From the **Left softkey (`Actions`)** menu on any monophonic melody, audio, or tracker file, select **Preview Ringtone**, **Set as Ringtone**, **Set as Notif / SMS Sound**, **Open in Ringtones App**, or **Play in Music Player**.
- **MicroSD card (`/media/sdcard`) integration**: when a microSD card (`/dev/mmcblk1`) is inserted, `udev` and `/usr/bin/sxmo_sdcard.sh` automatically mount it at `/media/sdcard` (keeping `7864900.sdhci` in `runtime_status = suspended` when idle and unbinding only during `--force-unmount` duress mode). From the **Left softkey (`Actions`)** menu inside `xfiles` (or **System menu -> SD Card**), select **Open SD Card (/media/sdcard)** to jump straight to the card (mounting it on demand if needed) or **Mount / Unmount SD Card** to safely flush and unmount the card before removal.
- **Bluetooth file transfer (`Send via Bluetooth`)**: select **Send via Bluetooth** from the **Left softkey (`Actions`)** menu on any file to choose a paired or nearby Bluetooth device (`*` rescans) and transmit the file over Bluetooth OBEX Object Push (`/usr/bin/bananarchy-bt-obex`).
- **Viewfinder and gallery**: streams live `800x600` frames from `/dev/video0` (`GC2395` / `GC2385` / `GC2365`) into a `240x180` 4:3 viewfinder. Press **Center `OK`**, **`5`**, or **Call (green)** to capture a JPEG to `~/Pictures/photo-YYYYMMDD-HHMMSS.jpg`; `*` or `1` toggles **Auto-Flash**; `0` or `2` toggles continuous **Torch**; `Up`/`Down` adjusts **Digital Zoom** (`1.0x` / `2.0x` / `4.0x`); `#` or `3` toggles the **3-second Self-Timer**; **Left softkey (`Gallery`)** opens the built-in photo gallery.
- **Live theme switching and customizer**: browse 21 preinstalled `.xth` schemes (`~/.xthemes/*.xth`) with live color swatches and press **Center `OK`** or **Call (green)** to apply across `dwm`, `dmenu`, `st`, `dunst` (`bananarchy-sync-dunst-theme`), and all plugins with zero restart. Press **`*`** or **Left softkey** to customize individual colors and font sizes, save a custom theme (`#`), or edit the `.xth` file in Nano.
- **`1:SIMs`**: inspects both physical SIM slots via QMI UIM (`PRESENT`/`EMPTY`, `[PRI 4G / DEFAULT]`, `[PRI 4G / DSDS]`, `[SEC 2G / DEFAULT]`, `[SEC 2G / DSDS]`, `READY`/`PIN-LOCK`/`PUK-LOCK`, remaining retries, operator, RAT, and phone number). Press `Return` on a slot (or use the bottom quick-action rows) to **Set as Default SIM (Calls/SMS)** (instant switch without dropping network registration), **Make Primary GW (4G/Data Swap)** (`msm-modem-uim-selection switch <slot> --swap-gw` to move 4G/LTE/3G + Mobile Data to that slot and 2G DSDS standby to the other), **Unlock SIM PIN**, **Unblock SIM with PUK**, **Enable / Disable PIN Lock**, or **Change SIM PIN** (with automatic `ModemManager` reprobe after unlock).
- **`3:Bluetooth`**: toggle **Bluetooth Power** (showing a live `ON (N Active)` badge and starting `/usr/bin/bananarchy-bt-obex`), toggle **Discoverable** (`ON (Visible)` vs `OFF (Hidden)`, persisted in `~/.config/sxmo/bt_discoverable`), edit the **Bluetooth Device Name** (`Name: <Alias> [Edit]`, persisted in `~/.config/sxmo/bt_name` and applied via `bluetoothctl system-alias` independently of the system hostname), monitor the live **OBEX File Receiver** widget (`#` opens `~/Downloads/` in `xfiles`), scan nearby devices (`*` or `Scan`, 15-second discovery scan), and manage paired/discovered devices. The scan now drives one interactive `bluetoothctl` client through `script(1)` (`/usr/local/bin/bluetoothctl` -> `/usr/bin/bananarchy-bt-scan.sh`), sets auto transport and duplicate-data, asks the same client for `devices` three times while discovery is active, parses both `[NEW] Device ...` / `[CHG] Device ...` and `Device <MAC> <Name>` lines, and stops discovery cleanly before the client exits; the controller is also powered on automatically if `bluetoothctl show` reports `Powered: no`. A narrow `doas` helper runs `btmgmt -i hci0 le on` before discovery because this WCNSS controller otherwise starts with LE disabled and only performs BR/EDR inquiry. Active connections are pinned to the top of the device list with a green border and live profile/battery badges (`[ACTIVE: A2DP]`, `[ACTIVE: HSP/HFP]`, `[ACTIVE: HID Gamepad]`, `[ACTIVE: HID Keyboard]`, `[ACTIVE: HID Mouse]`), and the device actions menu (`Center OK`) provides **Connect Device**, **Disconnect Device**, **Pair & Trust Device**, **Switch Audio (A2DP / HSP-HFP)**, and **Forget / Remove Device**. Supports Bluetooth **A2DP** (`sbc_xq`, `aac`, `ldac`, `aptx`, `aptx_hd`) and **HSP/HFP** (`mSBC` / `CVSD`) audio (routable via `xdrawer`, `dmenu Audio`, and `sxmo_audio.sh`), **HID keyboards** (automatically switching `fcitx5-t9` and NeoUI/plugin inputs to `[KBD]` direct QWERTY mode so `0-9`, `*`, `#`, `Shift+0-9`, and letters bypass T9 multi-tap and preedit popups), **HID mice** (automatically showing the X11 mouse cursor whenever a mouse is connected and hiding it when disconnected), and **HID gamepads** (automatically bridged to the phone's D-Pad, softkeys, and action keys via `/dev/uinput`).
13. **Ringtones, notification/SMS sounds, and ringer manager (`ringtones.so` / `xringtones`)**:
- **Open**: select **Ringtones** from the System, Config, or Audio menu, select **Notification Sound** from the **Notifications (`Notifs`)** menu, or run `xringtones [--notif] [file]`.
- **Supported formats**: standard audio (`.wav`, `.ogg`, `.mp3`, `.flac`, `.opus`, `.m4a`, `.aac`), chiptune tracker modules (`.mod`, `.xm`, `.it`, `.s3m`, etc.), and classic monophonic mobile ringtones — **Nokia RTTTL** (`.nrt`, `.rtttl`, `.rtx`), **Ericsson eMelody** (`.emy`), and **IrDA iMelody** (`.imy`) — synthesized via `monotone.h` / `/usr/bin/bananarchy-melody` (`~/Ringtones/`, `~/Music/`, `/usr/share/sxmo/ringtones/`, `/usr/share/sxmo/music/`).
- **Three tabs (`1:Ringtone`, `2:Notif/SMS`, `3:Settings` — switch with `1`–`3` or `Left`/`Right` in Tabs 1 and 2)**:
- **`1:Ringtone`**: browse and preview call ringtones (`*` or **Left softkey (`Play [*]` / `Stop`)**), press `Return` to set the active **Call Ringtone** (`~/.config/sxmo/ringtone`), or press `#` to quick-assign the highlighted tone as the **Notification / SMS Sound**.
- **`2:Notif/SMS`**: browse and single-shot preview notification/SMS alert tones (including `None (Mute Sound)` for vibration-only notifications) and press `Return` to set the active **Notification / SMS Sound** (`~/.config/sxmo/notif_sound` and `SXMO_TEXTSOUND` in `~/.config/sxmo/ringsettings`), wired directly into the system notification manager (`sxmo_notifs.sh`, `sxmo_hook_notification.sh`, `sxmo_hook_sms.sh`, `xirc`, and `xtox`).
- **Controls**: browse system and user wallpapers with a live portrait thumbnail, cycle scaling mode (`Fill`, `Scale`, `Fit`, `Center`, `Tile`) with `Left`/`Right` or `#`, toggle full-screen preview with `*`, and press `Return` to apply the wallpaper and immediately refresh the desktop overlay.
15. **Music and tracker module player (`music.so` / `xmusic` / `xplayer`)**:
- **Open**: select **Music** from the System, Applications, or Audio menu, open any audio/tracker file from **Files (`xfiles`)**, or run `xmusic [file_or_dir]`.
- **Supported formats**: plays standard audio (`.wav`, `.mp3`, `.ogg`, `.flac`, `.opus`, `.m4a`, `.aac`) as well as classic chiptune/tracker modules (`.mod`, `.xm`, `.it`, `.s3m`, `.mptm`, `.stm`, `.med`, `.okt`, `.669`, `.ult`, `.far`, `.mtm`, `.ptm`, `.amf`, `.dsm`, `.imf`, `.gdm`, `.stx`, `.umx`, `.mo3`) via an embedded `mpv` + `FFmpeg` + `libopenmpt` backend that automatically pauses on incoming calls.
- **Three tabs (`1:Player`, `2:Queue`, `3:Files` — switch with `1`–`3` or `Left`/`Right` in Queue/Files)**:
- **`1:Player`**: displays format badge (`MOD`, `XM`, `MP3`, etc.), scrolling track title, artist/metadata, animated equalizer bars, elapsed/total progress bar, repeat mode (`Off`, `All`, `One`), shuffle state, and volume. Press `Return` or `5` to **Play/Pause**, `Left`/`Right` (`4`/`6`) to **Seek `-5s`/`+5s`**, `Up`/`Down` (`2`/`8`) to adjust **Volume**, `7`/`9` for **Prev/Next track**, `*` to cycle **Repeat**, `#` to toggle **Shuffle**, `0` to **Stop**, or **Left softkey (`Options`)** to install the current track as the phone ringtone.
- **`2:Queue`**: browse the active playlist queue, filter with `0`–`9`, press `Return` to jump to a track, `*` to remove a track, `#` to shuffle, or **Left softkey (`Actions`)** to set the selected track as ringtone or clear the queue.
- **`3:Files`**: browse the filesystem (`~/Music`, `/usr/share/sxmo/music`, `/usr/share/sxmo/ringtones`, or any folder), press `Return` to play a file and load its folder into the queue, `*` to append a file or folder to the queue, or `#` to play the entire current folder.
- **`1:Dialer`**: enter a SIP URI (`user@host[:port]` or `sip:user@host[:port]`) or account extension (`1001`) using multi-tap alphanumeric input (`*` or `#` cycles `[abc]` / `[ABC]` / `[123]` / `[Sym]` / `[Abc]`) or select a recent peer with `Up`/`Down`, and press **Call (green)** or **Center `OK`** to place an outgoing SIP call. Outbound calls work both with a registered SIP account and directly without any configured account (`Direct URI` mode, selectable via `Menu -> Switch Account` when accounts are also present).
- **`3:History`**: browse incoming, outgoing, and missed SIP calls (`~/.local/share/sxmo/sip_history.tsv`) and press **Call (green)** or **Center `OK`** to redial.
- **ZRTP / SRTP encryption and CallScreen (`xcallscreen`) integration**: supports RFC 6189 **ZRTP** (`DH3k` 3072-bit / `DH2k` 2048-bit Diffie-Hellman key agreement with `a=zrtp-hash` SDP signaling and persistent 96-bit `ZID`) and RFC 3711 **SRTP** (`AES-128-CM` + `HMAC-SHA1-80`/`32`) encrypted voice media (`ON` by default per account and for direct accountless calls via `Menu -> Toggle Direct ZRTP`). Incoming `INVITE` requests wake the phone, trigger the ringtone/vibrator, and open `xcallscreen` with a `[SIP/<codec>]` badge; once ZRTP completes its handshake, the active codec and 4-character Short Authentication String (`SAS`) are displayed in both `xsip` (`<codec> | ZRTP SAS:<sas>`) and `xcallscreen` (`[SIP/<codec>:<sas>]`).
- **Open**: select **Email** from the System or Applications menu, or run `xemail` / `xmail`.
- **Three tabs (`1:Inbox`, `2:Compose`, `3:Accounts` — switch with `Left`/`Right`)**:
- **`1:Inbox`**: fetches headers and message bodies via `IMAP4rev1` or `POP3` over implicit TLS (`993`/`995`), `STARTTLS` (`143`/`110`), or plain TCP (`~/.local/share/sxmo/email/`), decoding RFC 2047 encoded-word subjects/senders, Base64/Quoted-Printable MIME parts, and HTML-only bodies. Press **Center `OK`** to open the full-screen message reader (`Up`/`Down` scrolls, **Center `OK`** replies), or **Call (green)** to sync the active account.
- **`2:Compose`**: enter `To`, `Subject`, and `Body` with multi-tap input (`*` cycles mode) and press **Call (green)** or **Left softkey (`Menu -> Send Email Now`)** to send via `SMTP` (`465` TLS or `587` `STARTTLS` with `AUTH PLAIN` / `AUTH LOGIN`).
- **`3:Accounts`**: add or edit multiple email accounts (`~/.config/sxmo/email_accounts.tsv`).
18. **IRCv3 client (`irc.so` / `xirc`)**:
- **Open**: select **IRC Chat** from the System or Applications menu, or run `xirc`.
- **Three tabs (`1:Chat`, `2:Buffers`, `3:Servers` — switch with `Left`/`Right`)**:
- **`1:Chat`**: displays scrollable message history (`Up`/`Down`) and multi-tap input bar (`*`/`#` cycles mode, **Center `OK`** or **Call (green)** sends message or executes `/join`, `/part`, `/leave`, `/close`, `/msg`, `/query`, `/nick`, `/me`, `/clear`, `/connect`, `/disconnect`, `/raw`, `/quit`).
- **`2:Buffers`**: lists server `*status*` buffers, joined `#channels`, and private query buffers with server/nick/connection subtitle and unread (`+N`) or `ACTIVE` badges. Highlight any buffer with `Up`/`Down` (or `2`/`8`) to switch the active buffer and press **Center `OK`**, `5`, **Call (green)**, `Left`, or **Right softkey (`Back`)** to open it in `Chat`; press `BackSpace` or **Left softkey (`Menu -> Close Buffer`)** to part and close the selected buffer.
- **Background mode (`BG Mode`)**: when `BG Mode` is enabled on a server, closing `xirc` keeps the active IRC socket connection alive in the resident daemon and triggers notification hooks on nick highlights or private messages.
- **`1:Friends`**: lists pending friend requests (press **Center `OK`** to accept) and saved friends with live status (`ONLINE (UDP)`, `ONLINE (TCP)`, `OFFLINE`). Press **Center `OK`** to open encrypted chat or **Call (green)** to start a `ToxAV` voice call.
- **`3:My Tox ID`**: displays your 76-character hexadecimal Tox ID (also exported to `/tmp/tox_id.txt` for easy copying over SSH) and DHT connection state (`DHT(UDP)` / `DHT(TCP)`).
- **Standby `ToxAV` voice calls**: incoming 48 kHz Opus `ToxAV` calls wake the display and open `xcallscreen` with a `[TOX]` badge.
- **Open**: select **SmallWeb (Kopher)** from the System or Applications menu, or run `xkopher [url]` / `kopher [url]`.
- **Supported protocols**: **Gopher** (`gopher://`, plus optional TLS `gophers://` or the in-menu `Gopher over TLS` toggle), **Gemini** (`gemini://` over TLS with text/gemini rendering and input prompts), **Spartan** (`spartan://`), and **Nex** (`nex://`), plus built-in `about:kopher` and `about:help` pages.
- **Default WAP-style keypad controls (from [Kopher](https://code.luxferre.top/luxferre/kopher.git), customizable in `~/.config/sxmo/smallweb_controls.tsv` via `Menu -> Customize Controls`)**:
- **`2` / `Up` and `8` / `Down`**: scroll up / down 1 line
- **`4` / `Left` and `6` / `Right`**: jump to previous / next link
- **`5` / `Center OK`**: open highlighted link or submit input prompt
- **`1` and `7`**: scroll left / right (`4` columns when line wrapping is off)
- **`3` and `9`**: jump to top / bottom of page
- **`*`**: toggle line wrapping (`WRAP` / `NOWRAP`)
- **Engine, User-Agent, encoding, fonts, and multimedia**: built on WPE / WebKit (`webkit2gtk-4.1` + `libwpe-1.0`) with Adreno 304 hardware acceleration (`WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS` and WebGL) and 512 MB RAM pressure tuning (`160 MB` WebProcess cap). Uses `UTF-8` as the primary/default encoding when a server specifies none, configures Google **Noto** (`Noto Sans`, `Noto Serif`, `Noto Sans Symbols`, `Noto Sans Math`, `Noto Color Emoji`) as the default non-monospace web fonts while keeping **Fira Code** with OpenType ligatures (`calt`, `liga`) for monospace (`code`, `pre`, `kbd`, `samp`, `tt`), enables all HTML5/GStreamer multimedia playback (`MediaSource` / MSE, WebAudio, inline `<video>`/`<audio>`, and autoplay without user gesture requirements) by default, and uses `Mozilla/5.0 (Mobile; rv:123.0) Gecko/123.0 Firefox/123.0 KAIOS/4.0` as the default User-Agent (overridable via `Menu -> User-Agent Override` across 4 presets or a custom multi-tap string persisted in `~/.config/sxmo/webarchy_ua.txt`).
- **Renderer profile and troubleshooting**: `nokia-argon` and the other slab targets keep Adreno 304 hardware acceleration (`WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS` + WebGL). The 2720 Flip (`nokia,beatles`) starts on the CPU renderer (`WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER`) because its DMABUF/WebKit renderer cannot be initialised reliably; WebKitGTK's `WEBKIT_DISABLE_*` variables are presence flags, so they are never left set to `0`. Create `~/.config/sxmo/webarchy_software_renderer` to force the CPU profile on any target. If the WebProcess crashes on a hardware profile, Webarchy switches to software rendering once and reloads the page automatically. Load failures show the WebKit `GError` domain and code in the bottom status line, which makes an "Unexpected WebKit error" diagnosable instead of opaque. The image build also compiles `usr/share/glib-2.0/schemas/gschemas.compiled` from the explicit `glib` and `gsettings-desktop-schemas` packages; if that file is missing, WebKit's network process logs `No GSettings schemas are installed on the system` and reports an internal error before a page can load.
- **Dual navigation modes (`[LNK]` Keypad Link Mode vs `[CUR]` Mouse Cursor Emulation Mode)**:
- **Keypad Link Mode (default)**: `Up` / `Down` scrolls vertically; `4` / `Left` and `6` / `Right` (or customizable Kopher keys in `~/.config/sxmo/smallweb_controls.tsv`) highlight the previous / next interactive element (`<a>`, `<button>`, `<input>`, `<select>`, `<textarea>`, `<video>`, `<audio>`) and display its label/URL in the bottom status bar; `5` / `Center OK` clicks the highlighted element or opens a NeoUI multi-tap text entry modal when an HTML `<input>` or `<textarea>` is selected (`Left softkey` or `Call` submits the form); `1` / `7` scrolls horizontally; `3` / `9` jumps to page top / bottom; `0` reloads; `#` cycles page zoom (`100%` / `85%` / `120%` / `70%`).
- **Mouse Cursor Emulation Mode (optional, off by default — toggle with `*#` chord or `Menu -> Toggle Mouse Cursor`)**: renders an on-screen pointer that moves with acceleration using `D-Pad` or `2`/`4`/`6`/`8` (plus diagonals `1`/`3`/`7`/`9`), automatically scrolls the page when pushed against the viewport edges, updates the bottom status bar with `(x,y)` coordinates and the hovered DOM element, and clicks or opens multi-tap input on `5` / `Center OK`.
- **Unobtrusive bookmarking (`~/.config/sxmo/webarchy_bookmarks.tsv`)**: displays a `*` prefix on the protocol badge (`*HTTPS` / `*HTTP`) whenever the current URL is bookmarked. Press `*` followed by `1`–`9`/`0` to save the current page to slot `1`–`10` (`**` sets the homepage), `#` followed by `1`–`9`/`0` to open slot `1`–`10` (`#*` opens the homepage), or open `Menu -> Bookmarks` (`Left softkey` saves into the highlighted slot, `Center OK` opens, `Call` deletes).
22. **GPS test utility and OpenStreetMap navigator (`gps.so` / `xgps` / `xmaps` / `xnav`)**:
- **Open**: select **GPS & Maps** from the System or Applications menu, or run `xgps` / `xmaps` / `xnav`.
- **Three tabs (`1:GPS Status`, `2:OSM Map`, `3:Nav/Search` — switch with `1`–`3` or `Left`/`Right` in Tabs 1 and 3)**:
- **`1:GPS Status`**: live GNSS reception test screen displaying Fix Status (`3D/2D FIX` vs `SEARCHING`), Latitude, Longitude, Altitude, Speed (`km/h`), Heading (`deg`), Satellites (`used/view`), HDOP, UTC timestamp, 3GPP cellular tower location (`MCC`/`MNC`/`TAC`/`CID`), and recent NMEA sentences (`$GPGGA`, `$GPRMC`, `$GPGSV`). Press **Center `OK`** to refresh immediately or `5` to center the map on the current GPS fix.
- **`2:OSM Map`**: interactive `240x212` OpenStreetMap slippy-map tile viewer with offline PNG tile caching (`~/.cache/sxmo/osm_tiles/<z>/<x>/<y>.png`), crosshair, GPS position marker, saved waypoint pins, and active route polyline overlay. Pan with `D-Pad` (`Up`/`Down`/`Left`/`Right`) or `2`/`8`/`4`/`6`, zoom in/out (`z=2..18`) with `*` / `#` (or `Center OK` / `0`), re-center on GPS (`FOLLOW`) with `5`, or press **Call (green)** to search places.
- **`3:Nav/Search`**: displays the active turn-by-turn route summary (total distance and next maneuver) and saved waypoints (`~/.config/sxmo/gps_waypoints.tsv`). Press **Call (green)** (or `Menu -> Search Place (Nominatim)`) to geocode any address or POI via OpenStreetMap Nominatim, or highlight any waypoint and press **Center `OK`** to compute a turn-by-turn road route from your current position via OSRM.
- **Activate**: select **Power -> Lock** or **Power -> Lock (Screen off)**, double-press **End / Power**, close the physical slider, or run `xlocker [lock|screenoff|wake|status]`.
- **Controls, verification, and duress mode**: renders a fullscreen `240x320` (`X=0, Y=0`) lock screen showing the live clock, date, battery percentage, and unread SMS/notification count. Enter your numeric system password (`147147` by default, 4 or more digits) using `0`–`9`; when 4 or more digits are entered and match the user's `/etc/shadow` password hash (verified via `/usr/bin/bananarchy-verify-passcode`), the phone unlocks immediately. If a separate **duress passcode** has been configured and is entered on the lock screen (`exit 2`), `/usr/bin/bananarchy-duress-activate` silently activates **duress mode** (`/tmp/bananarchy_duress_mode` and blank profile `/tmp/duress_home`): contacts, call logs, and SMS history are blanked, the microSD card is unmounted and blocked, all active privacy/VPN tunnels are stopped (`bananarchy-privacy-ctl stop-all`), the UI theme and wallpaper are locked to `NordFrost.xth` and `/usr/share/wallpapers/nordic-peaks.png`, `*#06#` displays a session-persistent random Luhn-valid IMEI derived from the device's preconfigured 8-digit TAC, `xfiles` is clamped inside `/tmp/duress_home`, and `xpasscode`, `xprivacy`, `xtox`, `xirc`, `xsip`, and `st` are disabled and hidden from all menus until the phone is powered off or rebooted. Press `BackSpace`, `Left`, or **Right softkey (`Clear`)** to delete a digit; press **End / Power** (or **Right softkey (`Sleep`)** when the input field is empty) to blank the display while staying locked. Repeated wrong attempts enforce a 5-second lockout cooldown.
- **`1:User PIN`**: enter your current numeric passcode (`0`–`9`), enter and confirm a new user passcode of any length starting at `4` numeric digits, and press **Center `OK`** on **Save User Passcode** to update the real Linux system password (`user` in `/etc/shadow`).
- **`2:Duress PIN`**: verify your current user passcode and set or clear a separate numeric duress passcode (`4+` digits, stored as a salted hash in `/etc/bananarchy/duress.hash`, never matching the user passcode). Press `*` at any time to toggle masked vs. visible digits.
25. **Privacy Center (`privacy.so` / `xprivacy` / `privacy`)**:
- **Open**: select **Privacy Center** from the **System**, **Applications**, or **Config** menu, or run `xprivacy` / `privacy` (hidden and blocked in Duress Mode).
- **Five tabs (`1:Tor`, `2:Warp`, `3:OVPN`, `4:GS`, `5:WG` — switch with `Left`/`Right` or `1`–`5`; `Call` toggles the active tab's service; `*` refreshes status; `0` stops all active tunnels)**:
- **`1:Tor`**: start/stop the Tor anonymity daemon (`SocksPort 127.0.0.1:9050`, `TransPort 0.0.0.0:9040`, `DNSPort 0.0.0.0:9053`) with live bootstrap progress (`0%`–`100%`), and independently toggle **Route Native Traffic** (`OUTPUT` TCP + DNS redirection) and **Route Wi-Fi/USB Tether** (`PREROUTING` TCP + DNS redirection for `usb0` and `10.42.0.0/24`).
- **`2:Warp` (GS-Warp)**: start/stop the GSocket-tunneled OpenVPN client (`gs-warp` / `gs-warp-simple.sh` over `tun_gswarp`), edit the custom **GSocket Secret** string (or reset to the MD5 of the selected `.ovpn` profile), pick a custom `.ovpn` profile, and independently toggle **Route Native Traffic** and **Route Wi-Fi/USB Tether** (`table 210`).
- **`3:OVPN` (OpenVPN)**: start/stop OpenVPN (`tun_ovpn`) using any `.ovpn` configuration file selected via the built-in file picker or path editor, and independently toggle **Route Native Traffic** and **Route Wi-Fi/USB Tether** (`table 220`).
- **`4:GS` (GSocket single TCP port)**: start/stop `gs-netcat` (`gsocket`) for a single configurable **TCP Port** (`1`–`65535`) with a custom **GSocket Secret** (or generate a random secret via `gs-netcat -g`), switch between `Client (Out)` and `Server (In)` mode, and independently toggle **Route Native Port** and **Route Tethered Port** (`iptables -t nat REDIRECT` for that TCP port).
- **`5:WG` (WireGuard)**: start/stop a kernel WireGuard interface (`wg0`), generate a fresh Curve25519 keypair (`Generate New Keypair`), import a standard WireGuard `.conf` file, edit custom `PrivateKey`, `Peer PublicKey`, optional `PresharedKey`, `Endpoint (host:port)`, `Interface IP/CIDR`, and `Tunnel DNS`, and independently toggle **Route Native Traffic** and **Route Wi-Fi/USB Tether** (`table 230` with `fwmark 0xca6c` loop avoidance).
- **Zero-drain standby**: no background OpenRC daemons run when services are turned off, and `privacy.so` sleeps at `0%` CPU on `poll()` when hidden.
26. **Engineering menu (`engmenu.so` / `xengmenu`) and extended logging toggle (`bananarchy-engmenu-ctl`)**:
- **Open**: dial **`*#0001#`** (or `###`) in `xdialer`, or run `xengmenu` (hidden and blocked in Duress Mode).
- **Eight hardware and privacy controls (`1`–`8` hotkeys or `Up`/`Down` + `Center OK` / `Left softkey`)**:
- **`1: Override TTL`**: set a fixed outbound IPv4/IPv6 TTL/hop-limit (`64`, `65`, `128`, or custom `1..255`) for native and tethered traffic until reboot, or `0` to restore default.
- **`2: Edit IMEI 1` and `3: Edit IMEI 2`**: inspect or edit NVRAM IMEI 1 / IMEI 2 (`tunning` `nvm/num/550` & `nvm/context1/550` or `rf_nv` with Luhn check digit calculation and `*`/`#` random TAC-preserving generation).
- **`4: Run Overclock Script`**: toggle `performance` governor and maximum CPU/Adreno 304 GPU OPP clocks until reboot.
- **`5: Toggle DIAG Port`**: switch USB gadget between standard USB networking (`18d1:d001`) and Qualcomm Diagnostics + AT + NCM (`05c6:9091`).
- **`6: Edit Wi-Fi MAC` and `7: Edit Bluetooth MAC`**: set or randomize (`#`) locally-administered `wlan0` and `hci0` MAC addresses in NVRAM/persist and live interfaces.
- **`8: Extended Logging`**: toggle system and session logging (`OFF` by default). When `OFF` (default), all persistent and runtime logs (`sxmo_log`, `superd` and service logs, `Xorg`, `dwm`, `fcitx5`, `tinydm`, `NetworkManager`, `ModemManager`, and `/var/log`) are disabled and purged so there is zero idle logging activity and zero eMMC log wear. When `ON`, volatile diagnostic logs are written strictly to RAM (`/tmp/sxmo.log`, `/tmp/superd.log`, `/tmp/superd_state/superd/logs/*.log`). Also accessible from **`Config -> Extended Logging`** or via `bananarchy-engmenu-ctl logging [on|off|toggle|status]`.
#### 3.1.3 Standalone keypad games (`Snake`, `Tetris`, `Scoundrel`), Game Boy emulator (`Gambatte`), and J2ME emulator (`ReMEdy`)
Three native X11 games (`/usr/bin/snake`, `/usr/bin/tetris`, and `/usr/bin/scoundrel`), the **Gambatte (`gambatte` / `gbemu`)** Game Boy / Game Boy Color emulator, and the **ReMEdy (`remedy` / `j2me`)** J2ME (MIDP 2.0 / CLDC 1.1) emulator are accessible from **System menu -> Games** (and **System menu -> Applications** for ReMEdy, or by opening `.gb`/`.gbc` and `.jar`/`.jad` files directly in **Files (`xfiles`)**):
- **Snake (`snake`)**: steer with `2`/`8`/`4`/`6` or D-Pad; pause or restart with `5`/`Return`/`#`/`*`; quit with `Right softkey`/`BackSpace`/`Escape`.
- **Tetris (`tetris`)**: move with `4`/`6` (`Left`/`Right`), rotate with `2` (`Up`), soft drop with `8` (`Down`), hard drop with `0`/`5`/`Return`, pause with `#`/`*`, and quit with `Right softkey`/`BackSpace`/`Escape`.
- **Scoundrel (`scoundrel`)**: native `240x320` NeoUI roguelike solitaire dungeon crawler (based on the Zach Gage / Kurt Bieg card game). Navigate a 44-card dungeon (`26` Club/Spade monsters, `9` Diamond weapons, `9` Heart health potions) 4 cards at a time with `20` max HP: select room cards directly with `1`–`4` or move the cursor with `Left`/`Right` and play with `5`/`Center OK`/`Call`; press `0` or `*` to **Flee Room** (places the 4 room cards on the bottom of the deck; cannot flee two rooms in a row or after playing a card); when fighting a monster with an equipped weapon that can legally slay it (`monster <= last slain`), press `1`/`Left`/`OK` for **Weapon** or `2`/`Right` for **Barehanded**; press `#` for the in-game rules reference or **Left softkey** for a new run. High scores and win streaks are persisted in `~/.local/share/sxmo/scoundrel_stats.txt`.
- **Game Boy / Game Boy Color emulator (`gambatte` / `gbemu`)**:
- **Launch**: open **Game Boy (Gambatte)** from **System menu -> Games**, open any `.gb` or `.gbc` file from **Files (`xfiles`)**, or run `gambatte [rom.gb|rom.gbc]`. When launched without a file argument, opens a built-in ROM browser scanning `/usr/share/games/gb`, `~/Games`, `~/ROMs`, `~/Downloads`, and user directories.
- **Default keypad controls** (fully readjustable via **Pause Menu -> Keypad Controls...** or **Left softkey (`Controls`)** in the ROM browser; persisted in `~/.config/sxmo/gambatte.cfg`):
- **Quick shortcuts (when unbound)**: `1` cycles screen scaling mode (`Fit 240x216` 1.5x area-interpolated, `1:1 160x144`, `Fill 240x246`, `Full 240x296`); `4` saves state to the active slot; `7` loads state from the active slot; `#`, `BackSpace`, `Escape`, or either softkey opens the **Gambatte Pause Menu** (Save/Load State across 10 slots `.st0`..`.st9`, Palette, Screen Scale, Audio toggle, Keypad Controls remapping, Load Another ROM, and Quit). Battery-backed SRAM (`.sav`) and RTC (`.rtc`) are saved automatically in `~/.local/share/sxmo/gambatte/saves/`.
- **Launch**: open **ReMEdy (J2ME)** from **System menu -> Applications** or **System menu -> Games**, open any `.jar` or `.jad` file from **Files (`xfiles`)**, or run `remedy [app.jar|app.jad]`. When launched without a file argument, opens the NeoUI-themed **ReMEdy J2ME** browser scanning `/usr/share/games/j2me`, `~/Games`, `~/J2ME`, `~/Downloads`, and user directories, displaying the selected MIDlet's `MIDlet-Name`, `MIDlet-Vendor`, `MIDlet-Version`, main class, and RMS save status.
- **Full-screen `240x320` resolution and NeoUI-themed LCDUI**: runs in a full-screen `240x320` window (`X=0, Y=0, W=240, H=320`) and declares native `240x320` dimensions (`getWidth() == 240`, `getHeight() == 320`) to J2ME applications. Full-screen `Canvas` and `GameCanvas` games get the entire `240x320` display, while high-level LCDUI screens (`Form`, `List`, `TextBox`, `Alert`, `ChoiceGroup`, `Gauge`, `TextField`, `StringItem`, and `Command` bars/menus) render with `libneoui.so` (`PluginTheme`) and adapt automatically to the active `.Xresources` / `~/.xthemes/*.xth` system theme.
- **Hardware-accelerated 3D (JSR-184 M3G), networking, RMS, and audio**: accelerates JSR-184 (`javax.microedition.m3g.*`) 3D scenes on the Adreno 304 (`FD304`) GPU via EGL + OpenGL ES 2.0 (with depth-buffered software fallback), supports HTTP/HTTPS and raw TCP/UDP socket connections (`javax.microedition.io.Connector`, `HttpConnection`, `SocketConnection`, `FileConnection` JSR-75), Nokia UI API (`com.nokia.mid.ui.*`), persistent `RecordStore` (RMS) storage (`~/.local/share/sxmo/remedy/rms/`), and MMAPI (`javax.microedition.media.Manager`) tone and WAV/MIDI audio over ALSA (`hw:0,0`). Audio follows the system speaker volume and mute state (the xdrawer **Speaker** slider) live, at the same loudness as other apps.
- **Keypad controls and pause menu**: maps D-Pad (`Up`/`Down`/`Left`/`Right`), `Center OK` (`FIRE`), `0`–`9`, `*`, `#`, **Left softkey** (`-6`), and **Right softkey** (`-7`) directly to MIDP 2.0 / Nokia key codes, with customizable key bindings persisted in `~/.config/sxmo/remedy.conf`. Press **Call (green)** (or hold **Right softkey** for `500 ms`) during execution to open the **ReMEdy Pause Menu** (Resume, MIDlet Commands, 3D Engine toggle, Softkey Bar mode, FPS Cap/Overlay, Audio (`Left`/`Right` change the system speaker volume, `OK` toggles ReMEdy sound), Keypad Controls remapping, Restart MIDlet, Clear MIDlet RMS Data, Load JAR/JAD, or Quit). Preinstalled MIDlets in `/usr/share/games/j2me/` and `~/Games/` include `g2048.jar`, `ReMEdy3DArena.jar` (JSR-184 3D benchmark), `AstroBlaster240.jar` (`GameCanvas` space shooter), and `NetToolJ2ME.jar` (LCDUI + HTTP/TCP socket test suite).
- **Short-press `#`** *(when no character is in preedit)*: cycles through the 6 input modes (`abc` -> `Abc` -> `ABC` -> `Sym` -> `Ctl` -> `123` -> `abc`), showing a `1500ms` mode banner at the bottom of the screen.
- **Auto-commit timeout**: `1500ms` for keys with `<= 10` candidates, or `1800ms` for keys with `> 10` candidates. Pressing a different key immediately commits the active candidate.
- **Hold `*`**: in `123` mode, commits `.` (decimal point); in all other modes, toggles a one-shot **`Ctrl+` modifier latch** (`+^`) so the next key is sent as `Ctrl+<key>`.
*(In `Abc` and `ABC` modes, uppercase letters precede the digit and lowercase letters on keys `2`–`9`. In `Abc` mode, committing an alphabetic character automatically reverts to `abc`.)*
- **Password**: `147147` (`doas` and `sudo` enabled; `/etc/doas.d/50-sxmo.conf` requires a password for general `wheel` use and grants targeted passwordless rules for system actions)
- **Changing the default password**: set `BANANARCHY_USER_PASSWORD` before bootstrapping a rootfs, or change it on the device with `passwd` or the passcode configurator. The power menu no longer contains any hardcoded credential.
Launch **Bantam** directly from the System menu (`Left softkey -> Applications -> Bantam`), or run `bantam` in any terminal (`st`) or over SSH. Configure your endpoint and API key via environment variables or `~/.bantam.cfg` when needed.
- **Wi-Fi and Bluetooth missing**: both radios depend on the shared WCNSS remote processor. `msm-firmware-loader` must start in sysinit before udev and mount the stock `modem` and `persist` partitions under `/run/msm-firmware-loader/mnt`; it then exposes `wcnss.mdt` and the factory `WCNSS_qcom_wlan_nv.bin` through the kernel firmware path. Check `rc-service msm-firmware-loader status`, `cat /sys/class/remoteproc/remoteproc1/state`, and `dmesg | grep -Ei 'wcnss|remoteproc|firmware'`. A `Direct firmware load for wcnss.mdt failed` message means the loader package or its sysinit link is missing, not that the Wi-Fi and Bluetooth drivers are absent. After a successful boot, `wlan0` and `hci0` enumerate automatically; Bluetooth userspace still starts on demand from the Networks/Bluetooth UI to save power.
- **X startup and keypad**: OpenRC starts independent services in parallel; `etc/init.d/local` replaces its stock `after *` dependency, which deadlocked with parallel startup on this image. `udev_settle_timeout=2` stops missing modem firmware from holding the display manager behind a long `udevadm settle`, and `bananarchy-sshd-debug` starts independently of `local.d`. A boot-open flip reads `/run/bananarchy/lid-state` and starts in `state=unlock` with no passcode screen, so the keypad is live as soon as `dwm` starts. If the keypad is dead, check `rc-service bananarchy-lid status`, `cat /run/bananarchy/lid-state`, `sxmo_state.sh get`, `/tmp/bananarchy_screen_locked`, `DISPLAY=:0 xwininfo -id 0xa00001` and `DISPLAY=:0 xinput list`.
- **Display distortion above 71% brightness**: the internal panel uses 25 MHz SPI on `nokia-beatles`, rather than the 50 MHz timing used by the other targets. This keeps the link stable when the MPP2 backlight PWM duty rises above the level-10/14 operating point. The brightness range remains 1–14 with no artificial cap, and panel offsets/init registers are unchanged. The timing can be checked with `dtc -I dtb -O dts /boot/qcom-msm8905-nokia-beatles.dtb | grep -A8 'display@0'`.
- **Closing the flip**: `bananarchy-lid` reads the current `EV_SW` switch mask from `/dev/input/event2`, follows hall edge events with an 80 ms stability window, and reconciles the raw gpio36/gpio92 debugfs levels every 200 ms even while evdev is present. This covers missed edges and stale `EVIOCGSW` state without a busy-polling loop. On close it blanks the main panel and keypad LED immediately, runs `sxmo_state.sh set screenoff` and tells the cover daemon `LID CLOSED`; on open it clears the lock flag, restores both backlights, sends a trusted `CLOSE` to `locker.so` and runs `sxmo_state.sh set unlock`. Check `rc-service bananarchy-lid status`, `sxmo_state.sh get` and `grep -E " gpio(36|92) " /sys/kernel/debug/gpio`. If the hall polarity is inverted on your unit, set `BANANARCHY_LID_GPIO_FILE` to a different debugfs GPIO file for the fallback path.
- **Cover display status and behaviour**: `bananarchy-cover-idle` is the compiled 0%-CPU default daemon and answers `bananarchy-coverctl` (`PING`, `STATUS`, `LID CLOSED|OPEN`, `BUTTON`, `NETWORK`, `BATTERY`, `NOTIFY`, `BLANK`/`UNBLANK`, `TEST`); the native `bananarchy-coverd` is retained only for diagnostics. With the flip **open** the external panel is fully off (all-black frame plus backlight 0) and `BUTTON` is ignored. With the flip **closed** the panel stays off until an external side key is pressed: `bananarchy-volume-keys` reads `/run/bananarchy/lid-state` and sends the trusted `BUTTON` datagram instead of changing the volume, which shows the live clock, date, battery percentage and the compact main network indicators (`4G SIG75 WIFI`-style, published by `bananarchy-cover-status.sh` from the NetworkManager dispatcher and at service start). No further button blanks the cover after exactly the same **Config -> Screen blank** timeout that `dwm` uses (`~/.config/sxmo/idle_blank_timeout`, default 300 s, `0` = never; `blank_timeout = auto` in `/etc/bananarchy/cover-display.conf` selects it, a numeric value overrides it). The daemon blocks in `poll()` with no timer while off, so idle CPU stays at 0%. The renderer uses the 32-bpp fbdev `write()` path (not `mmap()`, which raises `SIGBUS` on the DRM fbdev). The shipping DTS deliberately keeps the verified single-panel layout, so `/dev/fb1` is normally absent. A live test produced a working 240x240 external framebuffer but made the main panel go dark, so the two-panel `spi-mux` wiring is opt-in in `devices/nokia-beatles/qcom-msm8905-nokia-beatles-cover.dts`: build it with `scripts/build-beatles-cover-panel.py`, install the resulting DTB/boot.img into `pmOS_boot`, and verify the main panel before keeping it. `scripts/build-beatles-no-cover-dtb.py` builds the single-panel rollback DTB. The external firmware and `mux-core`/`mux-gpio`/`spi-mux` modules are already provisioned in the initramfs; `bananarchy-coverctl STATUS` reports `backend=fb` only when the opt-in DT is installed, otherwise `backend=none`. `scripts/test-cover-idle.py` verifies the state machine with a fake framebuffer, while `scripts/test-cover-dt.py` validates both the shipping single-panel DTB and the opt-in two-panel DT, the firmware lists and the Xorg pin. Physical sign-off of gpio13 mux polarity, the external gpio21 D/C and gpio23 reset polarity, and the lk2nd boot splash is still required on a live 2720 Flip; `devices/nokia-beatles/cover-panel.dtsi` remains a compile-checked reference for older DTBs. Run `bananarchy-cover-diagnose.sh` on the phone to check `/dev/fb1`, its geometry, the DRM cards, the loaded mux/panel modules, the firmware, the lid state and `bananarchy-coverctl STATUS` in one report. If the external panel disturbs the main display during sign-off, `scripts/build-beatles-no-cover-dtb.py --install` builds the verified single-panel DTB and patches the local boot image / `pmOS_boot`; `sync-beatles-bootfs.py` without overrides restores the shipping DTB. "Fully off" is a black frame plus `FBIOBLANK`/`FB_BLANK_POWERDOWN` on the fbdev (and the optional `backlight_path` sysfs node when present).
- **Camera app frozen / UI unresponsive**: check `top` for `bananarchy-volume-keys`. The daemon must be a single instance at 0% CPU; stale evdev fds are pruned by `prune_devices()`/`drop_device()` and guarded by `flock`. `rc-service bananarchy-volume-keys status` and `bananarchy-keypad-diagnose.sh` report its state. `xcamera` should return immediately and `bananarchy-photo <file>` should write a 600x800 JPEG.
- **Camera**: `/dev/video0` is provided by the out-of-tree `msm8905-cam` module, loaded at boot by `/etc/modules-load.d/bananarchy-hardware.conf` and `etc/local.d/10-bananarchy-hardware.start`. Check with `v4l2-ctl --list-devices`; a missing node means the module did not load (previously caused by a missing `/bin/sed` breaking the `modules` service).
- **Side volume keys**: the compiled evdev daemon `bananarchy-volume-keys` reads `KEY_VOLUMEUP`/`KEY_VOLUMEDOWN` directly and calls `sxmo_audio.sh vol up/down 5`; `sxmo_audio.sh` mirrors that percentage into the live PipeWire sink (the MSM8905 mainline kernel has no ALSA card yet). Press a side button and check `wpctl get-volume <sink-id>`; `bananarchy-keypad-diagnose.sh` reports the XKB mapping and both volume values.
- **First-boot checklist**: the rootfs must contain the full BusyBox applet set (`scripts/busybox-applets.txt`). `/bin/ash` is the `user` login shell and `/bin/grep` is used by OpenRC; if either is missing, sshd rejects `user/147147` and `udev` cannot start. Check `rc-service udev status` and `DISPLAY=:0 xinput list`: the keypad only appears in X when udev is running, `/dev/input/event*` are `0660 root:input` and elogind lists the keyboards under `seat0`. Run `rc-service tinydm restart` after fixing udev.
- **SSH rejects `147147`**: the PAM-enabled `/usr/sbin/sshd.pam` is pinned through `/etc/conf.d/sshd`, `/etc/pam.d/sshd` supplies an explicit `pam_unix` stack, and both `PasswordAuthentication` and `KbdInteractiveAuthentication` are enabled in `/etc/ssh/sshd_config.d/90-bananarchy-access.conf`. If PAM is ever broken again, a USB-only diagnostic listener is available on port 2222 (bound to `172.16.42.1`, never to Wi-Fi):
```bash
ssh -p 2222 user@172.16.42.1
```
The phone key in `keys/phone_id_ed25519` is pre-authorized for both `user` and `root`; add `touch /etc/bananarchy-no-debug-sshd` to turn the fallback listener off.
- **No boot splash**: the `extlinux.conf` `append` line must contain `quiet splash`. The pmOS initramfs defaults to `nosplash=y` and only starts `plymouthd` for the literal `splash` parameter; `scripts/sync-beatles-bootfs.py` restores the release cmdline and `--check` rejects a debug cmdline. Use `--debug-cmdline --allow-debug` only for a diagnostic build.
- **Keypad does not respond**: run `bananarchy-keypad-diagnose.sh` over SSH. It reports `/proc/bus/input/devices`, udev `ID_INPUT_*` tags (forced by `99-bananarchy-keypad.rules`), `SW_LID` / `SW_KEYPAD_SLIDE` state, kernel messages, Xorg/libinput devices and a short raw `evtest` probe. The Xorg rule `60-bananarchy-keypad.conf` binds the matrix keypad by product name so a missing `ID_INPUT_KEYBOARD` tag cannot make X ignore it. If the kernel emits no `EV_KEY` events at all, check the row/column GPIOs and `SW_LID` polarity on hardware.
### 5.1 Taking photos and screenshots (`bananarchy-photo`, `bananarchy-screenshot`, and `/dev/video0`)
Pressing **`*` and `#` simultaneously** from anywhere (desktop, menus, plugins, terminal, or games) captures a `240x320` screenshot using `scrot` (`/usr/bin/bananarchy-screenshot`), saves it to `~/Pictures/screenshot-YYYYMMDD-HHMMSS.png`, and triggers a brief haptic pulse and notification toast. You can also take screenshots from the CLI or via **System menu -> Scripts -> Screenshot**:
```bash
# Capture a 240x320 PNG screenshot to ~/Pictures/screenshot-YYYYMMDD-HHMMSS.png
The `msm8905-cam` kernel module drives the rear 2MP GalaxyCore `GC2395` (TA-1048), `GC2385` (TA-1059), and `GC2365` sensors through MSM8909 `CAMSS` and registers `/dev/video0` (`800x600` 24-bit `RGB3`). On `nokia-beatles` only, the demosaic sampler applies a 180-degree rotation while producing this frame, correcting the Flip's sensor mounting for every V4L2 consumer without an additional frame-buffer copy; the existing 90-degree portrait transform in `bananarchy-photo` and `xcamera` is unchanged.
Both the rear loudspeaker (`Speaker`, with boosted `RX3 Digital Volume` for loud, clear ringtones and media), the front earpiece speaker (`Earpiece`, boosted by +6 dB and selectable as a standard output device for any audio stream), and wired 3.5mm headphones (`Headphones`, automatically detected and routed on plug-in and restored to `Speaker` on unplug by `sxmo_soundmonitor.sh`), as well as the internal MEMS microphone (`Mic1`) and 3.5mm headset microphone (`Mic2`), are managed through PipeWire/WirePlumber and `sxmo_audio.sh` with linear `1%`–`100%` volume controls across all channels:
- **Open an audio file, tracker module (`.mod`, `.xm`, `.it`, `.s3m`), monophonic ringtone (`.nrt`, `.rtttl`, `.rtx`, `.emy`, `.imy`), or folder in the native music player (`xmusic`)**:
- **Inspect, synthesize to WAV, or play a Nokia RTTTL (`.nrt`, `.rtttl`, `.rtx`), Ericsson eMelody (`.emy`), or IrDA iMelody (`.imy`) ringtone from the CLI (`bananarchy-melody`)**:
### 5.5 Adreno 304 GPU hardware acceleration and OpenGL / OpenGL ES demos
Bananarchy includes full kernel (`drm/msm` + `qcom-iommu` with `96 KB` GMEM, `a300_pfp.fw` / `a300_pm4.fw`, and up to `409.6 MHz` OPP scaling) and userspace (**Mesa Freedreno `FD304`**) hardware acceleration for the Qualcomm **Adreno 304 (`0x03000400`)** GPU across all supported MSM8905 and MSM8909 devices.
The **Xlibre** display server (`modesetting_drv.so`) uses **Glamor + DRI3 + GLX + KMSRO** to offload X11 rendering to the Adreno 304 GPU (`/dev/dri/card1` / `/dev/dri/renderD128`) and synchronize GMEM resolves before transferring damaged rectangles over DMA to the `panel-mipi-dbi` SPI display (`/dev/dri/card0`).
- **Query active OpenGL 3.1 / OpenGL ES 3.0 and EGL hardware renderer info**:
All CLI and `gps.so` queries go through `/usr/bin/bananarchy-gps-modem.sh`, which picks the modem advertising `gps-nmea` (with `--location-enable-3gpp`, `--location-enable-gps-nmea`, `--location-enable-gps-raw`, `--location-set-gps-refresh-rate=2` and `--enable`). Plain `mmcli -m any` is ambiguous on the dual-SIM 2720 Flip and used to leave every GPS query empty.
### 5.7 Network time synchronisation (`bananarchy-time-sync.sh`)
`chronyd` runs from the default runlevel with `pool pool.ntp.org iburst minpoll 12 maxpoll 16`: long polls keep Wi-Fi asleep, while `iburst` sets the clock within seconds whenever the pool resolves. Because NetworkManager installs `resolv.conf` after `chronyd` starts, a `bananarchy-time-sync` OpenRC service and `/etc/NetworkManager/dispatcher.d/20-bananarchy-time-sync.sh` re-resolve the pool and request an immediate burst when a connection comes up (`up`, `dhcp4-change`, `dhcp6-change`, `dns-change`, `connectivity-change`, `vpn-up`). The helper uses chronyd's root-only Unix command socket, so `cmdport 0` keeps the UDP command port closed, and it throttles repeats with a monotonic uptime stamp so a decades-long clock step cannot confuse it. `/var/lib/chrony` is owned by the `chrony` user so the driftfile survives reboots.
If the clock is still wrong after a connection comes up, use **Config -> Sync net time**. It runs `bananarchy-sync-net-time.sh`, forces an immediate burst over the same Unix socket, and shows a notification with the synced UTC date or a failure message. This is also handy after a long offline period, when the RTC has fallen back to 1970. After a confirmed sync, the helper calls `sxmo_hook_statusbar.sh refresh` as the X session user, so the status bar clock and charge icon are republished immediately instead of waiting for the next 300 s periodic tick. Charge events likewise refresh both the charge icon and the clock, and unlock forces a charge icon refresh even if the backlight is not yet bright. Plugging or unplugging the USB cable is handled by `85-bananarchy-battery.rules` and `/usr/bin/bananarchy-battery-charge-event.sh`: the charger's `power_supply` uevent forces the icon immediately and once more after a two-second sysfs race window (with `flock` coalescing the burst of uevents), so the charge icon changes at the moment of the transition even when the reported capacity has not changed yet.
### 5.8 GPS-only system time (`bananarchy-gps-time-sync.sh`)
**Config -> Time source** toggles between `Network (NTP)` (the default) and `GPS only`. In GPS-only mode `chronyd` is stopped, `bananarchy-time-sync.sh` declines every boot/network-up/force NTP burst, and the system datetime is set **solely** from GNSS: `/usr/bin/bananarchy-gps-time-sync.sh` enables the modem's location sources, reads either ModemManager's `modem.location.gps.utc` or a valid `$GNRMC`/`$GPRMC` fix, steps the clock with `date -u -s`, writes the RTC with `hwclock -w -u`, and republishes the status bar clock. No DNS, NTP pool or network connection is used. The boot service calls `boot` in this mode, so a cold start with a 1970 RTC still recovers the date from GPS.
**Config -> Sync GPS time** (`/usr/bin/bananarchy-sync-gps-time.sh`) runs the same one-shot sync immediately and shows the resulting UTC timestamp (or the failure reason) as a notification; it works in either time-source mode. From the shell:
```bash
bananarchy-gps-time-sync.sh get # network | gps
bananarchy-gps-time-sync.sh source gps # select GNSS as the sole source
bananarchy-gps-time-sync.sh source network # restore NTP and chronyd
A fresh `git clone` is enough to produce a flashable image. Docker, Python 3, and network access are the only host requirements; no pre-existing `rootfs/`, `images/`, or EDL checkout is needed.
`rebuild-image.sh` runs the following steps automatically:
1. Verifies shell and Python syntax, the `armv7` package list, plugin artifacts, overlay sync, and the ignored local agent config (`scripts/check-rebuild.sh`).
2. Mirrors `prebuilt/` into `overlay/rootfs/` (`scripts/sync-prebuilt-overlay.sh`).
3. Creates a complete `armv7` rootfs from `scripts/rootfs-packages.txt` when `rootfs/` is missing or stale (`scripts/bootstrap-rootfs.sh`), including system accounts, OpenRC runlevels, base configuration, the overlay, and prebuilt kernel modules.
4. Applies the overlay, regenerates the initramfs with `mkinitfs`, and assembles the partitioned MBR image in `images/`.
./scripts/bootstrap-rootfs.sh --check # report whether bootstrapping is needed
./chroot-shell.sh # bootstraps rootfs/ before opening a shell
sudo ./flash-edl.sh nokia-argon # uses vendor/edl/ and auto-installs host deps
```
The bootstrap is idempotent: an up-to-date rootfs is left untouched. `prebuilt/` is the single source of truth for compiled artifacts, and `scripts/rootfs-packages.txt` is the single source of truth for the package set. The patched EDL client library is vendored under `vendor/edl/` (MIT), so flashing works from a clean clone without a manual download; `flash-edl.sh` installs `pyusb` and `pyserial` into the gitignored `.flash-deps/` directory when needed.
For the `a1108` / `dejavu` release, use the verified `nokia-beatles` raw image, standalone boot image, and display-enabled lk2nd image generated in `images/`. These files are local build outputs and are not tracked in git; `scripts/check-rebuild.sh` pins their hashes when present. `scripts/set-bananarchy-hostname.sh` gives every image its target codename as the default hostname, and the display lk2nd image now requires the low-bit reboot cookie so **Reboot to bootloader** reaches the visible Fastboot menu. The default `147147` unlock passcode remains provisioned with the locker path unchanged. The X session performs a one-shot startup cleanup of stale `dmenu` and xlocker keyboard grabs, while `dwm` keeps the known-good 350 ms wake guard. `prepare-release.sh` rebuilds missing images from source and packages them; use `BA_REBUILD=1` for a forced source rebuild.