Files
bananarchy/MANUAL.md
T

56 KiB
Raw Blame History

Bananarchy Linux — user, flashing, and customization manual

Bananarchy Banner

This manual covers flashing, operating, and customizing Bananarchy Linux (240x320 native edition) on Qualcomm MSM8905 and MSM8909 Nokia feature phones:

  • Nokia 8110 4G (nokia-argon)
  • Nokia 2720 Flip (nokia-beatles)
  • Nokia 800 Tough (nokia-tough / nokia-coconut)
  • Nokia 8000 4G (nokia-sparkler) and Nokia 6300 4G (nokia-leo)

1. System overview and workspace contents

1.1 System images (images/)

  • 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.

1.2 Bootloader and EDL programmer (bootloader/)

  • bootloader/lk2nd-msm8909.img: secondary bootloader (lk2nd) providing Fastboot and extlinux boot discovery for MSM8905 and MSM8909 devices.
  • bootloader/loaders/8110.mbn: signed Qualcomm Sahara/Firehose programmer (05c6:9008).

1.3 Core architecture highlights

  1. Pure X11 (Xlibre + sxmo-de-dwm) for 240x320 QVGA displays:
    • Uses a lightweight cross-compiled Xlibre server with modesetting KMS, partial-rectangle ShadowFB SPI updates, and zero Wayland overhead.
    • Patched dwm provides a 240x320 vertical bottom-stack (bstack) layout, a 24px top status bar, a transparent "Menu" / "Names" desktop softkey bar, a Conky desktop clock and status widget (which refreshes automatically when changing time, timezone, or wallpaper, or when logging out), and < 2 ms handling of physical slider (SW_LID) and wake keys.
  2. Preloaded resident DWM plugins (< 2 ms wakeup):
    • Core phone applications (dmenu, xdrawer, dialer, calllog, callscreen, contacts, sms, files, camera, themes, modem, networks, ringtones, wallpapers, music) run as preloaded resident daemons (dwm-plugin <name> --preload) that sleep at 0% CPU and open instantaneously over FIFO/socket IPC.
    • All UI elements share the NeoUI SDK (libneoui.so + /usr/include/neoui.h) and a single XRDB theming engine (~/.xthemes/*.xth -> ~/.Xresources) with 20 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 and ~/Projects/neoui_demo.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 for the complete API reference and examples.
  3. First-class terminal (st) and 6-mode fcitx5-t9 keypad input:
    • st is patched with HarfBuzz OpenType ligature shaping (Fira Code default) and live .Xresources reload.
    • fcitx5-t9 provides 6 keypad input modes (abc, Abc, ABC, Sym, Ctl, 123 + * long-press Ctrl+ latch) in a fixed bottom candidate bar (Y = 290, H = 30).
  4. Mainline Linux 6.12 hardware drivers:
    • QDSP6 / Q6Voice audio and Dual-SIM modem: loudspeaker, boosted (+6 dB) earpiece, internal MEMS and headset microphones, ModemManager + q6voiced call audio routing, and direct Qualcomm QMI UIM Dual-SIM Dual Standby (DSDS), instant default SIM switching, Primary/Secondary GW (4G/Data) slot swapping, PIN/PUK management, and SIM phonebook access.
    • Rear 2MP camera and torch LED: msm8905-cam V4L2 driver (/dev/video0 800x600 RGB3 for GalaxyCore GC2395 / GC2385 / GC2365) and leds-msm8905-torch (white:torch + PM8909 clean poweroff).
  5. Preinstalled developer and utility stack:
    • gcc/g++, make, git, GNU coreutils, GNU bc/dc, nano, ed, less, rlwrap, lua (5.5 and 5.4), yabasic, janet + jpm, bantam coding agent, perl (IO::Socket::SSL), tcl (tcllib, tcl-tls, sqlite-tcl), sqlite3, frotz, ffmpeg, mpv, imv, standalone snake and tetris X11 games, the gambatte Game Boy / Game Boy Color emulator, and the ReMEdy (remedy / j2me) 240x320 J2ME (MIDP 2.0 / CLDC 1.1) emulator.

2. Flashing instructions

Run the automated EDL flasher from the repository root on your host machine:

sudo ./flash-edl.sh

(To flash another target device image, pass its codename, e.g. sudo ./flash-edl.sh nokia-sparkler.)

The script performs the following steps automatically:

  1. Temporarily pauses host ModemManager so it does not interfere with 05c6:9008.
  2. Waits for the phone to appear in Qualcomm EDL mode (05c6:9008):
    • From Bananarchy Linux: open the Power menu (End / Power key or System menu -> Power), select Reboot to loader (sxmo_power.sh loader) to enter the lk2nd Fastboot menu, and select EDL (or let flash-edl.sh automatically send fastboot oem reboot-edl).
    • Button combo: power off the phone, hold D-Pad up + D-Pad down, and plug in the USB cable.
    • EDL cable: hold the EDL cable button while plugging in USB.
    • From ADB or Fastboot: the script automatically sends adb reboot edl or fastboot oem reboot-edl if detected.
  3. Uploads bootloader/loaders/8110.mbn via Sahara and connects to eMMC via Firehose.
  4. Backs up gpt.bin, fsc, fsg, modemst1, modemst2, persist, and boot into ./backup/ if not already backed up.
  5. Flashes lk2nd-msm8909.img to boot, flashes images/bananarchy-<device>.img to userdata, clears the stock system superblock, and reboots into Bananarchy Linux.

Method B: Fastboot flashing (once lk2nd is installed)

  1. Enter the lk2nd Fastboot menu either by selecting Reboot to loader from the Power menu (sxmo_power.sh loader) or by holding D-Pad down while powering on the phone.
  2. Flash the system image to userdata:
    fastboot flash userdata ./images/bananarchy-nokia-argon.img
    fastboot erase system
    fastboot reboot
    

Method C: booting from a microSD card

lk2nd automatically checks the microSD card for a pmOS_boot partition before internal eMMC:

sudo dd if=./images/bananarchy-nokia-argon.img of=/dev/sdX bs=4M status=progress conv=fsync

3. Keypad controls and native applications

3.1 Global keypad controls (240x320)

Physical key Linux keysym / event Action
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
Both softkeys together KEY_MENU + KEY_BACK Toggle XDrawer (xdrawer) global phone controls overlay from anywhere (disabled while passcode-locked)
* + # together KEY_NUMERIC_STAR + KEY_NUMERIC_POUND Capture a 240x320 screenshot (scrot via bananarchy-screenshot) to ~/Pictures/screenshot-YYYYMMDD-HHMMSS.png
Digits 0–9, *, # (on idle desktop) 0–9, asterisk, numbersign Open Dialer (xdialer) and immediately insert the pressed digit, *, or #
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
D-Pad up / down Up / Down Navigate menus and apps; in st: Shift+Up/Shift+Down (or ScrlUp/ScrlDn in Ctl mode) scrolls terminal history; in T9 preedit: toggle letter case (a <-> A) or jump +4 / -4 candidates
D-Pad left / right Left / Right On empty desktop: switch workspace tags (-1 / +1); in T9 preedit: step back 1 candidate (Left) or commit candidate (Right); in idle Ctl mode: Home / End
Center OK Return (KEY_OK) Confirm / Enter, or commit active T9 preedit candidate immediately
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

Screen blanking, passcode locking (xlocker), waking, and brightness persistence: X11 screensaver/DPMS blanking and deep system suspend are disabled so screen state is controlled cleanly and the phone always wakes immediately. 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.

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.
  • Triple-press Call (green) (3x Call): cycle the active layout (TTT -> []= -> [D] -> [M] -> TTT).
  • Double-press Call (green) (2x Call): move focus to the next open window (Super+j).
  • Triple-press End / Power (red) (3x End): launch a new st terminal in the active workspace.
  • External keyboard shortcuts (Mod4):
    • Mod4+space: cycle layout (TTT -> []= -> [D] -> [M]).
    • Mod4+Shift+slash: vertical stack layout (bstack, TTT).
    • Mod4+slash: horizontal tile layout (tile, []=).
    • Mod4+m: fullscreen monocle layout (monocle, [M]).
    • Mod4+Up / Mod4+Down (or Mod4+k / Mod4+j): move focus between tiled windows.
    • Mod4+Shift+k / Mod4+Shift+j: move the focused window up or down in the stack.
    • Mod4+1..4: switch to workspace tag 1..4.
    • Mod4+Shift+q: close the focused window.

3.1.2 Preloaded native DWM applications

All twenty-two 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 loader, Reboot to EDL, and Poweroff), 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.
  2. Global phone controls (xdrawer.so / xdrawer):

    • Open / close: press both softkeys simultaneously (KEY_MENU + KEY_BACK) from anywhere, or select XDrawer from the System menu.
    • Controls: use Up/Down (or 1–9/0) to select linear (1%–100%) Speaker, Earpiece, Ring Vol, Ringer (Ring+Vib / Vibrate / Silent / DND), Vibration (Light / Medium / Strong with instant tactile feedback), Flashlight, Sound, Microphone, Screen, or Keypad; use Left/Right or Return to adjust or toggle.
  3. Phone dialer (dialer.so / xdialer):

    • 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).
  4. Call history and anti-spam blocklist (calllog.so / xcalllog):

    • Open: press Call (green) on the empty desktop, or select Call Log from the System menu or Dialer.
    • 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.
  5. Incoming and active call screen (callscreen.so / xcallscreen):

    • 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.
    • In-call controls and recording:
      • [1] / * — microphone mute: toggles hardware QDSP6 and PipeWire microphone mute (ON / MUTED).
      • [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: switches between EARPIECE (default for all calls) and SPEAKER.
      • Left / Right — call volume: adjusts in-call volume in 5% steps.
      • [0] / Left softkey (DTMF): toggles DTMF tone keypad mode.
      • End (red) or Right softkey (Hangup): hangs up the call.
  6. Contacts phonebook (contacts.so / xcontacts):

    • 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).
  7. SMS manager, composer, and spam filter (sms.so / xsms):

    • Open: select Texts from the System menu, or choose Send SMS / Read Messages from Contacts.
    • 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).
    • 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 (0/160), 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).
  8. File manager (files.so / xfiles):

    • Open: select Files from the System menu or press Mod4+d.
    • 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 Conky). 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. 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.
    • File management actions: the Left softkey (Actions) menu also provides Edit in Text Editor, View Text, Edit in nano, New Folder, New File, Rename, Copy, Cut / Move, Paste Here, Properties, Open Terminal Here, and Delete.
  9. Camera (camera.so / xcamera):

    • Open: select Camera from the System menu or run xcamera.
    • 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.
  10. Theme manager (themes.so / xthemes):

    • Open: select Themes from the System, Apps, or Config menu, or run xthemes.
    • Live theme switching and customizer: browse 20 preinstalled .xth schemes (~/.xthemes/*.xth) with live color swatches and press Center OK or Call (green) to apply across dwm, dmenu, st, 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.
  11. Modem, Dual-SIM, and PIN/PUK manager (modem.so / xmodem):

    • Open: select Modem from the System menu, or run xmodem. Also opens automatically when a SIM card requires PIN or PUK unlock.
    • Four control tabs (Left/Right or 1–4):
      • 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).
      • 2:Radio: shows signal bar, registration status, access technology (LTE/UMTS/GSM), operator, both IMEIs, and phone number, with actions to switch Network Mode (4G/3G/2G, 3G/2G, 4G Only, 3G Only, 2G Only), Send USSD Code, toggle Modem Power, or Restart ModemManager.
      • 3:AT: interactive AT command console with presets (AT, ATI, AT+CSQ, AT+CPIN?, AT+COPS?, etc.) and custom keypad entry.
      • 4:Log: scrollable history of calls, SMS events, and USSD responses.
  12. Networks and Bluetooth manager (networks.so / xnetworks / xbluetooth):

    • Open: select Networks or Bluetooth from the System menu, or run xnetworks / xbluetooth.
    • Three connectivity tabs (Left/Right or 1–3):
      • 1:Wi-Fi: toggle Wi-Fi radio, rescan (*), toggle Wi-Fi Hotspot, and connect to WPA2/open networks with a multi-tap password dialog (* toggles password visibility).
      • 2:Cell/APN: toggle Mobile Data (configuring the QMI bam-dmux wwan0 static IPv4 bearer, default route, and DNS automatically), inspect wwan0 IPv4 status, edit APN Configuration, and toggle USB Tethering.
      • 3:Bluetooth: toggle Bluetooth power, scan nearby devices (*), and pair, connect, disconnect, or remove devices.
  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).
      • 3:Settings: configure Ringer Mode (Ring + Vibrate, Ring Only, Vibrate Only, Silent), Notif / SMS Sound (Left/Right cycles tones, * previews, Return opens Tab 2), Call Ringtone (Left/Right cycles tones, * previews, Return opens Tab 1), Ring & Alert Volume (0%–100%, also adjustable in XDrawer), Call Ring Duration, Call Ring Loop Count, and 3-level hardware Vibrate Strength (Level 1 (Light) pulsed 1600 mV, Level 2 (Medium) pulsed 2100 mV, Level 3 (Strong) continuous 3100 mV, Return tests vibration).
  14. Desktop wallpaper manager (wallpapers.so / xwallpapers / xbackground):

    • Open: select Wallpapers from the System, Config, or Apps menu, or run xwallpapers.
    • 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 Conky 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.
  16. SIP VoIP client (sip.so / xsip):

    • Open: select SIP VoIP from the System or Applications menu, or run xsip.
    • Three tabs (1:Dialer, 2:Accounts, 3:History — switch with Left/Right):
      • 1:Dialer: enter a SIP URI (user@domain) or extension (1001) using multi-tap input (* cycles input mode) or select a recent peer with Up/Down, and press Call (green) or Center OK to place an outgoing SIP call.
      • 2:Accounts: add or edit SIP accounts (~/.config/sxmo/sip_accounts.tsv: Label, Username, Password, Domain, Port, UDP/TCP/TLS transport, Enabled). Enabled accounts maintain RFC 3261 REGISTER keepalives with Digest MD5 authentication in the background even when xsip is closed.
      • 3:History: browse incoming, outgoing, and missed SIP calls (~/.local/share/sxmo/sip_history.tsv) and press Call (green) or Center OK to redial.
    • CallScreen (xcallscreen) and RTP audio integration: incoming INVITE requests wake the phone, trigger the ringtone/vibrator, and open xcallscreen with a [SIP] badge; answering streams bidirectional 8 kHz G.711 (PCMU/PCMA) RTP audio and RFC 2833 DTMF tones.
  17. Email client (email.so / xemail / xmail):

    • 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:Buffers, 2:Chat, 3:Servers — switch with Left/Right):
      • 1:Buffers: lists server status buffers, joined #channels, and private query buffers with unread ([N]) and highlight ([!]) badges.
      • 2:Chat: displays scrollable message history (Up/Down) and multi-tap input bar (* cycles mode, Center OK sends message or executes /join, /part, /msg, /nick, /me, /topic, /raw, /quit).
      • 3:Servers: manage multiple IRC servers (~/.config/sxmo/irc_servers.tsv, preconfigured with Libera.Chat and OFTC over TLS 6697), supporting OpenSSL TLS, IRCv3 capability negotiation (CAP LS 302: sasl, server-time, message-tags, multi-prefix, away-notify, account-notify, chghost, cap-notify), and SASL PLAIN authentication.
    • Background mode (BG_STAY): when Stay Connected in Background is enabled in the Left softkey (Menu), closing xirc keeps all active IRC socket connections alive in the resident daemon and vibrates on nick highlights or private messages.
  19. Tox / Trifa P2P messenger and audio call client (tox.so / xtox):

    • Open: select Tox (Trifa) from the System or Applications menu, or run xtox.
    • Three tabs (1:Friends, 2:Chat, 3:My Tox ID — switch with Left/Right):
      • 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.
      • 2:Chat: end-to-end encrypted P2P messaging (~/.local/share/sxmo/tox/logs/) with multi-tap input (* cycles mode, Center OK sends, Call (green) initiates a 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.
  20. Kopher SmallWeb browser (smallweb.so / xkopher / kopher / xsmallweb):

    • 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, 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)
      • #: toggle light / dark reader theme
      • 0: reload current page
      • Call (green): open URL address bar (* cycles input mode; Call inside the address bar toggles Gopher TLS)
      • Right softkey / BackSpace: navigate back in history (or close when at root)
  21. 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.
  22. Passcode phone locker (locker.so / xlocker):

    • 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 and verification: 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) 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. 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.

3.1.3 Standalone keypad games (Snake, Tetris), Game Boy emulator (Gambatte), and J2ME emulator (ReMEdy)

Two classic X11 games (/usr/bin/snake and /usr/bin/tetris), 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.
  • 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):
      • B button: 8
      • Turbo B: 5
      • A button: 9
      • Turbo A: 6
      • Directions (Up/Down/Left/Right): D-Pad (Up, Down, Left, Right)
      • Start: 2
      • Select: 3
      • Palette selection: * (cycles through 10 built-in color palettes: DMG Classic, Bananarchy Gold, GB Pocket Gray, GB Light Teal, GBC Blue/Red, Super Game Boy, Amber CRT, Mintberry, Virtual Boy, Inverted Dark)
      • Fast forward (2x): 0 (while held)
      • 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/.
  • ReMEdy J2ME (MIDP 2.0 / CLDC 1.1) emulator (remedy / j2me):
    • 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 D-Pad (D-Pad + 2/4/6/8, D-Pad Only, 2/4/6/8 Only) and softkey modes persisted in ~/.config/sxmo/remedy.cfg. Press End / Power (red) (Escape) during execution to open the ReMEdy Pause Menu (Resume, Send Left/Right Softkey Command, Screen Scaling, 3D Renderer toggle, Audio (Left/Right change the system speaker volume, OK toggles ReMEdy sound), Keypad Controls remapping, Reset RMS Save Data, Load Another MIDlet, 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).

3.2 Multi-mode fcitx5-t9 keypad reference

  • 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.
  • While a candidate is highlighted ([item]) in preedit:
    • Press # or D-Pad Up: toggles letter case (a <-> A) on the fly, or jumps forward +4 candidates for non-alphabetic items.
    • Press D-Pad Down: toggles letter case (a <-> A) for alphabetic items, or jumps backward -4 candidates for non-alphabetic items.
    • Press D-Pad Left: steps backward 1 candidate on the same key.
    • Press D-Pad Right or Center OK (Return): commits the highlighted candidate immediately.
    • Press BackSpace: cancels the uncommitted preedit candidate without deleting already committed text.
  • Long-press (>= 550ms):
    • Hold 0–9: commits the digit (0–9) immediately in any mode.
    • 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>.
    • Hold #: commits a literal # character immediately in any mode.

Modes 1–3: abc (lowercase), Abc (one-shot Shift), and ABC (Caps Lock)

(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.)

Key Tap sequence (abc mode)
1 . , - _ ! ? / @ : ; ' " + = * # $ % ^ & ( ) [ ] { } < > | \ ~ ` 1
2 a b c 2 A B C
3 d e f 3 D E F
4 g h i 4 G H I
5 j k l 5 J K L
6 m n o 6 M N O
7 p q r s 7 P Q R S
8 t u v 8 T U V
9 w x y z 9 W X Y Z
0 Space (SPC) 0 Ent (Return) Tab
* * # + - = _ / \ | ~ ` @ $ % ^ & ( ) [ ] { } < > ' " . , ! ? : ; Tab Esc ^C ^D ^Z (hold 450ms for Ctrl+ latch)

Mode 4: Sym (grouped ASCII punctuation, symbols, and special keys)

Key Symbols / keys
1 . , ! ? : ; - _ 1
2 @ # $ % ^ & 2
3 ( ) [ ] { } < > 3
4 + - * / = _ 4
5 | \ ~ ` ' " 5
6 ' " ` ~ ^ 6
7 / \ | _ - + 7
8 < > ! = ? & 8
9 $ % ^ & * # @ 9
0 Space (SPC) 0 Tab Ent (Return) Esc
* * # + - = _ / \ | ~ ` @ $ % ^ & ( ) [ ] { } < > ' " . , ! ? : ;

Mode 5: Ctl (terminal control characters, navigation, and function keys)

  • Direct D-Pad navigation (when no preedit candidate is active in Ctl mode):
    • D-Pad Up / Down: sends Page_Up (PgUp) / Page_Down (PgDn) immediately.
    • D-Pad Left / Right: sends Home / End immediately.
  • Keypad multi-tap:
Key Control sequences / special keys
1 Esc Tab Del Ins Bksp
2 ^C ^D ^Z ^X ^\
3 ^A ^E ^U ^K ^W
4 ^R ^L ^P ^N ^G
5 ^S ^Q ^O ^T ^Y
6 ^B ^F ^V ^H ^[ ^] ^^ ^_
7 PgUp PgDn Home End ScrlUp ScrlDn
8 Up Down Left Right
9 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12
0 Space (SPC) Tab Ent (Return) Esc
* Esc Tab ^C ^D ^Z ^X ^L ^R ^W

Mode 6: 123 (instant numeric entry)

Key Action
0–9 Commits digit 0–9 immediately on single tap
* Commits * immediately on single tap; hold 450ms to commit . (decimal point)
# Short-press: cycle back to abc mode; hold 450ms: commit #

4. Default credentials, USB SSH, and Bantam AI agent

  • Username: user
  • Password: 147147 (doas and sudo enabled, with passwordless doas configured for wheel in /etc/doas.d/50-sxmo.conf)
  • USB networking SSH:
    ssh user@172.16.42.1
    
  • Bantam AI agent: 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.

5. Command-line hardware reference

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:

# Capture a 240x320 PNG screenshot to ~/Pictures/screenshot-YYYYMMDD-HHMMSS.png
bananarchy-screenshot

# Capture to a custom PNG path
bananarchy-screenshot ~/my-screen.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).

  • Using bananarchy-photo:
    # Capture to ~/Pictures/photo-YYYYMMDD-HHMMSS.jpg and print path
    bananarchy-photo
    
    # Capture with rear LED flash enabled and open in imv
    bananarchy-photo -f -v
    
    # Capture to a custom JPEG or PNG file path
    bananarchy-photo ~/my-shot.png
    
  • Direct low-level capture (v4l2-ctl + ffmpeg -f rawvideo):
    v4l2-ctl -d /dev/video0 \
      --set-fmt-video=width=800,height=600,pixelformat=RGB3 \
      --stream-mmap --stream-count=1 --stream-to=/tmp/frame.rgb && \
    ffmpeg -hide_banner -loglevel error \
      -f rawvideo -pixel_format rgb24 -video_size 800x600 \
      -i /tmp/frame.rgb -vf "transpose=1" -frames:v 1 -y ~/photo.jpg && \
    rm -f /tmp/frame.rgb
    

5.2 Audio routing, music playback, and microphone recording

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):
    xmusic ~/Music/Bananarchy_Chip.mod
    
  • 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):
    bananarchy-melody --info /usr/share/sxmo/ringtones/Nokia_Gran_Vals.nrt
    bananarchy-melody --wav /usr/share/sxmo/ringtones/Ericsson_Cascade.emy /tmp/out.wav
    bananarchy-melody --play /usr/share/sxmo/ringtones/IrDA_Pager.imy
    
  • List available audio outputs (Speaker, Earpiece, Headphones):
    sxmo_audio.sh out list
    
  • Switch active output to the rear loudspeaker or front earpiece:
    sxmo_audio.sh out set "Speaker"
    sxmo_audio.sh out set "Earpiece"
    
  • Record from the internal MEMS microphone (Mic1):
    pw-record --rate=48000 --channels=1 --format=s16 ~/recording.wav
    

5.3 Flashlight (white:torch), keypad backlight (white:kbd_backlight), and vibration (sxmo_vibrate)

  • Turn rear flashlight on or off:
    brightnessctl -d white:torch set 1
    brightnessctl -d white:torch set 0
    
  • Set keypad backlight brightness (0–255):
    brightnessctl -d white:kbd_backlight set 255
    
  • Trigger PM8909 vibration motor (duration_ms [strength_1_to_3]):
    sxmo_vibrate 350 1   # light (1600 mV, 38% duty cycle)
    sxmo_vibrate 350 2   # medium (2100 mV, 67% duty cycle)
    sxmo_vibrate 350 3   # strong (3100 mV, 100% continuous)
    

5.4 Cellular modem, Dual-SIM, and QMI UIM helper

  • Inspect Dual-SIM card status, PIN/PUK state, and active slot:
    doas /usr/libexec/msm-modem-uim-selection status
    
  • Switch default outgoing SIM slot (1 or 2) instantaneously without dropping DSDS registration:
    doas /usr/libexec/msm-modem-uim-selection switch 2
    
  • Swap Primary GW (4G/LTE/3G + Mobile Data) and Secondary GW (2G GSM DSDS) between physical SIM slots:
    doas /usr/libexec/msm-modem-uim-selection switch 2 --swap-gw
    
  • Send a USSD request on a specific SIM slot (1 or 2):
    doas /usr/libexec/msm-modem-uim-selection ussd initiate --sim 2 "*111#"
    
  • Inspect ModemManager registration, operator, and signal quality:
    mmcli -m any
    

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:
    DISPLAY=:0 glxinfo -B
    DISPLAY=:0 eglinfo -B
    
  • Run 3D OpenGL and OpenGL ES hardware-accelerated demos on the 240x320 display:
    DISPLAY=:0 glxgears -info
    DISPLAY=:0 glteapot
    DISPLAY=:0 es2gears_x11
    
  • Inspect live Adreno 304 GPU hardware state, frequency, and ringbuffer fences:
    doas cat /sys/kernel/debug/dri/1/gpu
    

5.6 MicroSD card management (sxmo_sdcard.sh) and GNSS / GPS CLI (bananarchy-gps)

  • Check microSD card (/dev/mmcblk1) status, mount, or unmount from the CLI:
    sxmo_sdcard.sh status
    sxmo_sdcard.sh mount      # mounts at /media/sdcard
    sxmo_sdcard.sh unmount    # flushes buffers and unmounts /media/sdcard
    
  • Test GNSS / GPS reception and inspect NMEA / 3GPP location from the CLI (bananarchy-gps):
    bananarchy-gps status     # enable GNSS if needed and print 3GPP + GPS coordinates and NMEA
    bananarchy-gps nmea       # print raw NMEA sentences from ModemManager / QMI PDS
    bananarchy-gps watch 2    # continuously poll GPS fix and satellite telemetry every 2s
    bananarchy-gps disable    # stop standalone GNSS engine to save power