7.2 KiB
Installation guide
Flash a Planet Computers Gemini PDA (Wi-Fi + 4G, MT6797X) directly from Linux using Geminux's bundled pure-Python MediaTek BROM/DA flasher—either from a prebuilt release ZIP or from a local source build.
Option A: Flash a prebuilt release ZIP
Host prerequisites (no Docker required)
- Linux x86_64/arm64 PC with
python3,python3-pip,libusb-1.0,e2fsprogs(debugfs,e2fsck), andsudo(raw USB access). - Optional:
cryptsetup(only for--encryptLUKS2 full-disk encryption) andsimg2img(only if extracting firmware from a sparse stock Androidsystem.img). - Gemini PDA (x27) connected directly to a host USB port via USB-C data cable (avoid unpowered hubs).
Steps
unzip geminux-<version>-<codename>-gemini-x27.zip
cd geminux-<version>-<codename>-gemini-x27
sha256sum -c SHA256SUMS.txt
cat FLASH-INSTRUCTIONS.txt # bundled plain-text flashing guide
Continue to Flashing to the Gemini PDA below.
Option B: Build from source and package a release
Build host prerequisites
In addition to python3, libusb-1.0, e2fsprogs, and optional img2simg/simg2img, building images requires Docker (docker).
./rebuild-image.sh # or ./rebuild-image.sh --rebuild-all --force-bootstrap
./scripts/check-rebuild.sh # offline APK, ELF, DTB, image & Python unit checks
Outputs images/boot-geminux.img, images/recovery-geminux.img, images/geminux-rootfs.img (plus .simg if img2simg is installed), and images/SHA256SUMS.
Package a redistributable release ZIP
Create a self-contained ZIP archive under releases/ containing the images, SHA256SUMS.txt, plain-text FLASH-INSTRUCTIONS.txt, flash-mtk.sh, helper scripts, and vendor/mtkclient/:
./package-image.sh # or ./rebuild-image.sh --package
By default, scripts/package-release-zip.py stages a copy of geminux-rootfs.img, strips SSH host/authorized keys while keeping /lib/firmware/mediatek/mt6797/ blobs (--include-firmware default), verifies e2fsck -fn and ZIP CRCs, and writes <archive>.zip.sha256 (--strip-firmware omits proprietary blobs for clean redistribution; --keep-ssh-keys keeps SSH keys).
Flashing to the Gemini PDA
Warning
Never wipe or overwrite MediaTek factory calibration, baseband, or bootloader partitions (
proinfo,nvram,nvdata,protect1,protect2,seccfg,lk,tee1,md1img,scp1,preloader).
Geminux claims user-writable eMMC past LBA 0x70000 (0x0E000000), replacing Android system, cache, and userdata with boot, recovery, boot2, and a single full-disk linux ext4 partition.
- Connecting BROM/Preloader mode: Keep the Gemini powered off and unplugged, start the flash command on your host, then plug the USB-C cable into the left USB-C port (closest to
Esc). flash-mtk.sh pauses hostModemManagertemporarily so/dev/ttyACM*is not grabbed mid-handshake. - Turnkey firmware handling: Clean release archives do not ship proprietary MediaTek blobs. During
--flash-full, flash-mtk.py automatically reads your device's stock Androidsystempartition before repartitioning, saves Wi-Fi/BT/SPM blobs intofirmware-cache/mt6797/, and injects them offline into the stagedlinuxrootfs viadebugfs(--skip-firmware-injectdisables). If Android was already replaced earlier, extract blobs once from a stocksystem.imgfirst:./flash-mtk.sh --extract-firmware --system-img /path/to/system.img
Flasher commands
# 1. Optional standalone backup -> backup/<timestamp>/ + pgpt.bin + sgpt.bin:
./flash-mtk.sh --only-backup
# 2. Full interactive install (prompts for user/root credentials & optional LUKS2):
./flash-mtk.sh --flash-full
# 3. Non-interactive example with explicit username, prompted passwords & LUKS2:
./flash-mtk.sh --flash-full --username alice --ask-user-password --ask-root-password --encrypt
# 4. Keep image defaults (unencrypted, login: user / geminux):
./flash-mtk.sh --flash-full --use-default-credentials
What --flash-full runs: Resolves credentials/LUKS2 passphrase upfront, backs up protected partitions into backup/<timestamp>/ (reuse via --skip-backup --backup-dir ...), verifies protected GPT boundaries (--force-gpt overrides), writes & readback-checks updated Primary/Backup GPT, stages geminux-rootfs.img cleanly with firmware injection, /etc/{passwd,group,shadow} provisioning, and optional LUKS2 (aes-xts-plain64, Argon2id), writes & readback-verifies boot, recovery, and boot2, flashes linux, and reboots (--no-reboot / --poweroff overrides).
Partial updates and restore
./flash-mtk.sh --flash-kernel-only
./flash-mtk.sh --flash-rootfs-only --username alice --ask-user-password --encrypt
./flash-mtk.sh --customize-rootfs /tmp/custom.img --username alice --encrypt
./flash-mtk.sh --restore-backup backup/<timestamp>
First boot and recovery notes
- eSIM persistence: Profiles on the hardware ST33 eUICC survive
linuxreflashes (whereas flashinglinuxreplaces/and/home). - Power on & USB fuel gauge: Unplug USB-C and hold Esc to boot. If booted on USB power,
bq25890pauses charging (~15 s whileVSYSstays USB-powered) somt6351-fuel-gaugecalibrates true open-circuit battery voltage. - LUKS2 unlock & ext4 expand: Encrypted installs prompt on
tty1using/etc/gemini-us.kmapand unlock the full dynamiclinuxpartition (--allow-discards). First boot automatically runse2fsck -pandresize2fs -f(~58 GiB) and creates/var/lib/geminux/.rootfs-resized. For LUKS2 cipher/kernel details, see ARCHITECTURE.md. - Desktop defaults: Auto-logs into XLibre + DWM as UID
10000(provisioned username oruser, default passwordgeminux, default Anodized theme, and defaultgeminux-dark.pngwallpaper). - USB NCM rescue: Connecting USB-C brings up
usb0(172.16.42.1/24); recovery initramfs provides LUKS2-awareunlock-root,check-fs, andmount-root.
Live Gemini PDA x27 hardware validation checklist
uname -rshows7.3.5-geminux;lsmodshowsmediatek_drm,panfrost,mt6797_ccci_cldma,mt6797_wlan_core, andbtmt6797.ssd2092touchscreen,geminux-touchdgestures, and XKB keys (Fn+1..0,Fn+Z/X,Fn+Alt = Mod4, Planet key) work;glxinfo | grep -i rendererreports Panfrost.- Anodized default theme,
geminux-dark.pngdefault wallpaper, interactive theme editor, andgeminux-apply-wallpaperrestore cleanly. - Wi-Fi (
geminux-net), Bluetooth, and PipeWire audio (speaker, 3.5 mm jack, internal mic) function normally. - With MD1 firmware present,
/dev/ccci_md_ctl,/dev/ttyC0,doas geminux-cellctl status(MD_STATE=READY+ SIM/ST33 eUICC),geminux-imsd,ccmni*data, voice calls (geminux-dialer), and SMS (geminux-sms) work. - Front camera capture (
geminux-camera), externalSiI9024HDMI,/media/sdcardautomount,Fn+FAirplane Mode, lid-close & overnight battery deep sleep recovery (0013–0014), andgeminux-power-audit(pmic_modes=Y,allow_md1=Y,gpu_rail_suspends, standby draw in Airplane Mode ON and OFF) succeed.