15 KiB
Bananarchy Linux — User, Flashing & Customization Manual
This manual covers flashing, operating, and customizing Bananarchy Linux (v0.0.1, Sxmo 240x320 native edition) on Qualcomm MSM8905 / 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) & Nokia 6300 4G (nokia-leo)
1. What Is Prepared in This Workspace
1.1 System Images (images/)
images/bananarchy-nokia-argon.img(linked asimages/nokia-argon-sxmo.img) — Raw partitioned image (256 MiBext2pmOS_boot+ext4pmOS_root) ready for EDL flashing touserdataor rawddto a microSD card.images/bananarchy-nokia-argon.sparse.img(linked asimages/nokia-argon-sxmo.sparse.img) — Android sparse image forfastboot flash userdata.images/boot-bananarchy-nokia-argon.img(linked asimages/boot-nokia-argon-sxmo.img) — Standalone Androidboot.imgwith Linux6.12.1-msm8916, initramfs, and appended DTB.- 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 & EDL Programmer (bootloader/)
bootloader/lk2nd-msm8909.img— Secondary bootloader (lk2nd) providing Fastboot andextlinuxboot discovery for MSM8905/MSM8909 devices.bootloader/loaders/8110.mbn— Signed Qualcomm Sahara/Firehose programmer (05c6:9008).
1.3 Integrated Hardware & UX Tweaks
- Native 1:1
240x320Resolution & Enlarged Fonts:- Sway runs at
output * scale 1(SXMO_SWAY_SCALE=1) with Xwayland disabled to save RAM. - Enlarged fonts across all UI layers:
Sxmo 13window titles and24pxtop bar,34pt/14ptConky clock/date positioned cleanly above the Bananarchy emblem wallpaper,15pxbold Wofi full-screen menus (240x296),13ptFoot terminal font,220x28Wob volume/brightness overlay, and12ptDunst notifications.
- Sway runs at
- Multi-Mode
fcitx5-t9Keypad Engine (src/fcitx5-t9/):- Supports 6 input modes cycled with
#(XF86NumericPound):abc,Abc,ABC,Sym,Ctl, and123. - Includes instant case toggling during preedit, full 32-character ASCII punctuation/symbol entry, terminal control sequences (
^A–^Z,Esc,Tab,F1–F12), and a450mslong-press*Ctrl+modifier latch.
- Supports 6 input modes cycled with
- Bantam DIY AI Agent (
prebuilt/bantam/bantam):- Fetched from the latest
masterbranch ofhttps://code.luxferre.top/luxferre/bantam-cpp, cross-compiled forarmv7, and installed to/usr/bin/bantamand/usr/local/bin/bantam(with no default.bantam.cfgpre-created).
- Fetched from the latest
- Mainline 6.12.1-msm8916 QDSP6 Audio, Voice Call & LTE Modem Stack:
- Patched
q6core,q6afe,q6afe-dai,q6voice-dai,q6mvm, and device trees (VoiceMMode1DAI + PM8909 WCD codec). - WirePlumber
50-s16le.lua(S16LEsample format enforcement), ALSA UCM2 profiles (HiFi.confandVoiceCall.conf),q6voiced,rmtfs,msm-modem-uim-selection,msm8909-modem-wwan-port, andModemManager.
- Patched
- Memory & Swap Tuning for 512 MB RAM:
384 MiBZSTD-compressedzram0swap (priority100) +512 MiB/swapfile(priority10), withvm.swappiness=100andvm.page-cluster=0.
- Preinstalled On-Device Development & Scripting Stack:
- C / C++ Toolchain & Build Tools:
gcc,g++,musl-dev,make,git,nano - Janet:
janet,janet-dev,jpm(Janet Package Manager) - Perl:
perl,perl-io-socket-ssl(IO::Socket::SSL) - Tcl & SQLite:
tcl,tcl-lib(tcllib),tcl-tls,sqlite(sqlite3),sqlite-tcl(tcl-sqlite)
- C / C++ Toolchain & Build Tools:
2. Flashing Instructions
Method A: Automated USB EDL Flasher (Recommended)
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 will:
- Temporarily pause host
ModemManagerso it does not interfere with05c6:9008. - Wait for the phone to appear in Qualcomm EDL mode (
05c6:9008):- 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 / Fastboot: The script automatically sends
adb reboot edlorfastboot oem edlif detected.
- Upload
bootloader/loaders/8110.mbnvia Sahara and connect to eMMC via Firehose. - Back up
gpt.bin,fsc,fsg,modemst1,modemst2,persist, andbootinto./backup/(if not already backed up). - Flash
lk2nd-msm8909.imgtoboot, flashimages/bananarchy-<device>.imgtouserdata, clear the stocksystemsuperblock, and reboot into Bananarchy Linux.
Method B: Fastboot Flashing (Once lk2nd Is Installed)
- Hold D-Pad Up while powering on the phone to enter
lk2ndFastboot mode. - Flash the sparse system image to
userdata:fastboot flash userdata ./images/bananarchy-nokia-argon.sparse.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 & Multi-Mode T9 Input Guide
3.1 Global Sxmo Keypad Controls (240x320)
| Physical Key | Linux Keysym / Event | Action in Sxmo |
|---|---|---|
| Left Softkey | XF86KbdLcdMenu1 (KEY_MENU) |
Open System Menu, close open menu, or wake & unlock when locked |
| Right Softkey / Back | XF86KbdLcdMenu2 / BackSpace (KEY_BACK) |
Open App Context Menu (or close menu if open); in apps/T9 preedit acts as BackSpace |
| Call (Green) | XF86PickupPhone (KEY_SEND) |
Wake & unlock when locked, confirm (Return) in menus, or: 1× Answer call / App Context Menu, 2× Focus Next Window, 3× Toggle Tiling Layout (Vertical -> Horizontal -> Tabbed) |
| End / Power (Red) | XF86PowerOff |
Wake & unlock when locked, close open menu, or: 1× Power Menu (space shutter in Megapixels), 2× cycle screen state, 3× (or hold 400ms) launch new terminal |
| D-Pad Up / Down | Up / Down |
Navigate menus/apps; in T9 preedit: toggle letter case (a ↔ A) or jump +4 / -4 candidates; in idle Ctl mode: Page_Up / Page_Down |
| D-Pad Left / Right | Left / Right |
Move cursor; in T9 preedit: step back 1 candidate (Left) / 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/turn screen off; Open: restore keypad backlight, unlock, and turn screen on |
Waking & Unlocking After Screen Fade: When the screen turns off after inactivity (or when the slider is closed), you can wake and unlock the phone in a single action by either:
- Opening the slider (
SW_LIDoff), or- Pressing End / Power (Red), Left Softkey, Right Softkey, or Call (Green) once.
3.1.1 Window Tiling Modes & Switching Combos
By default, Sxmo Sway is configured with default_orientation vertical (splitv), so opening multiple terminals stacks them vertically (one terminal under another) to maximize line width on the 240x320 portrait screen.
You can switch between Vertical (splitv, one under another), Horizontal (splith, side-by-side), and Tabbed (tabbed, full-screen tabs) layouts — as well as switch focus between open terminals — using any of the following combos:
- Direct Physical Keypad Combos:
- Triple-press Call (Green) (
3× Call): Cycles the current container layout (Vertical splitv->Horizontal splith->Tabbed->Vertical splitv). - Double-press Call (Green) (
2× Call): Switches focus to the next open window/terminal (e.g., jumps between the top and bottom terminals). - Triple-press (or hold
400ms) End / Power (Red) (3× End): Opens a newFootterminal tiled in the active layout.
- Triple-press Call (Green) (
- Terminal Context Menu (
Right Softkeyor1× Call (Green)insideFoot):- Next Window: Switch focus to the next open terminal/window.
- Toggle Layout: Cycle
splitv->splith->tabbed. - Tile Vertical: Immediately arrange open windows vertically (one under another) and set future splits to vertical.
- Tile Horizontal: Immediately arrange open windows horizontally (side-by-side) and set future splits to horizontal.
- New Terminal / Close Terminal: Open a new terminal or close the focused terminal.
- System Windows Menu (
Left Softkey->Windows):- Next window: Focus the next window in the workspace.
splitv -> splith -> tabbed: Cycle container layout mode.- Split vertical / Split horizontal / Tabbed layout: Switch directly to the chosen layout.
- Switch menu / Move menu / Kill window: Switch to any window across workspaces, move windows between positions/workspaces, or close the focused window.
- External Keyboard /
swaymsg($mod=Mod4/Super):Mod4+v: Vertical split (splitv)Mod4+b: Horizontal split (splith)Mod4+e: Toggle split orientation (layout toggle splitbetween vertical and horizontal)Mod4+w: Tabbed layout (layout tabbed)Mod4+s: Stacking layout (layout stacking)Mod4+f: Toggle fullscreen (fullscreen)Mod4+Up/Mod4+Down/Mod4+Left/Mod4+Right: Move focus between tiled windowsMod4+Shift+Up/Mod4+Shift+Down/Mod4+Shift+Left/Mod4+Shift+Right: Reposition focused window
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), displaying a900mspreedit status banner ([Mode: abc],[Mode: Abc],[Mode: ABC],[Mode: Sym],[Mode: Ctl],[Mode: 123]). - Auto-commit timeout:
600msfor keys with<= 10candidates, or750msfor keys with> 10candidates (1and*inabc/Abc/ABC,*inSym,9inCtl). Pressing a different key immediately commits the active candidate. - While a candidate is highlighted (
[item]) in preedit:- Press
#or D-PadUp: Toggles letter case (a<->A) on the fly without changing mode, or jumps forward+4candidates for non-alphabetic items. - Press D-Pad
Down: Toggles letter case (a<->A) for alphabetic items, or jumps backward-4candidates for non-alphabetic items. - Press D-Pad
Left: Steps backward 1 candidate on the same key. - Press D-Pad
Rightor CenterOK(Return): Commits the highlighted candidate immediately. - Press
BackSpace: Cancels the uncommitted preedit candidate without deleting previously committed text.
- Press
- Long-press (
>= 450ms):- Hold
0–9: Commits the digit (0–9) immediately in any mode. - Hold
*:- In
123mode: Commits a decimal point (.) immediately. - In all other modes: Toggles a one-shot
Ctrl+modifier latch ([Ctrl+ LATCH ON]/[Ctrl+ LATCH OFF]; mode prefix shows+^, e.g.abc+^). The next committed key (a–z,[,\,],^/6,_/-) is sent asCtrl+<key>.
- In
- Hold
#: Commits a literal#character immediately in any mode.
- Hold
Modes 1–3: abc (Lowercase), Abc (One-Shot Shift), 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 & 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 & Function Keys)
- Direct D-Pad Navigation (when no preedit candidate is active in
Ctlmode):- D-Pad
Up/Down: SendsPage_Up(PgUp) /Page_Down(PgDn) immediately. - D-Pad
Left/Right: SendsHome/Endimmediately.
- D-Pad
- 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 |
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 & Bantam AI Agent
- Username:
user - Password:
147147(doasandsudoenabled) - USB Networking SSH:
ssh user@172.16.42.1 - Bantam AI Agent:
Run
bantamin the terminal (Foot) or over SSH. Configure your endpoint/API key via environment variables or~/.bantam.cfgwhen needed.
