Skip to content

About

Delta Chat for Android 2.3+

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Delta Chat Gingerbread

A lightweight, native client for Delta Chat built for Android 2.3+

It pairs the real upstream Delta Chat Rust Core (chatmail/core) with a zero-dependency Java UI written purely against the classic Android SDK. No AndroidX, no bloated support libraries, and no outdated system TLS headaches - just modern encrypted email-based messaging and voice calls running smoothly on 2011-era hardware.

Official Delta Chat for Android requires Android 5.0+, ships native binaries only for ARMv7/ARM64, and pulls in modern UI/media libraries (androidx.*, Material Components, Glide, Jackson, ExoPlayer, full WebRTC). That puts it far past what an Android 2.3 phone's 5 MB Dalvik LinearAlloc buffer and ~16–24 MB per-app heap can handle.

Yet almost all of Delta Chat's real intelligence - IMAP/SMTP networking, Chatmail onboarding, encryption, invites, storage, and TLS 1.3 - lives inside a single self-contained Rust library. By compiling that Rust core for ARMv6 and wrapping it in a clean, dependency-free Android SDK interface, old devices get modern messaging without the overhead.

What's working

  • Chats - replies, editing, forwarding, Saved Messages, contact requests, chat search, multi-account switching.
  • Images, voice notes & files - cached image thumbnails, full-screen image preview, voice message recording/playback, file attachments, Android Share, and Delta Chat deep links (dcaccount:, dclogin:, mailto:, etc.)
  • Voice calls - built-in WebRTC audio calls with an Android 2.3-style swipe-to-answer screen, mute/speakerphone controls, proximity screen-off, and missed-call notifications
  • Onboarding & sync - one-tap Chatmail signup, classic IMAP/SMTP login, second-device transfer, and backup import/export
  • Built-in QR scanner & invites - camera QR code scanner and native QR rendering for SecureJoin verification
  • Extra - Light/Dark native themes, SOCKS5/Shadowsocks proxies, background notifications, connectivity diagnostics, and live logs

Screenshot 1

Screenshot 2


How It Works Under the Hood

Getting a modern Rust codebase running on a 2011 Android phone takes four key pieces:

  1. Custom ARMv6 Rust Target (jni/arm-linux-androideabi.json) Stock Rust's arm-linux-androideabi target assumes ARMv5 (no 64-bit atomics, which dependencies like mail-builder need), while armv7-linux-androideabi emits ARMv7/NEON instructions that crash with SIGILL on an ARM1136 chip. A custom target spec enables +strict-align,+v6,+vfp2 with 64-bit atomics and rebuilds std via Cargo -Z build-std for arm1136jf-s.

  2. Android 2.3 libc Compatibility Layer (jni/android23_compat.c) Modern Rust std, tokio, mio, rusqlite, openssl-sys, and ring expect POSIX and Linux functions added in Android 4.x–7.x that are absent from Android 2.3.7's libc.so (even one missing symbol breaks dlopen). android23_compat.c bridges those gaps using Android 2.3's API-9 sysroot, POSIX fallbacks, and kernel syscalls (for example pipe2, posix_memalign, ftruncate64, futimens, and a getauxval stub that tells ring/OpenSSL to stay on safe ARMv6/C paths), while also piping stdout/stderr into Logcat (RustStdio).

  3. Lightweight C WebRTC Audio Engine (jni/dc_webrtc.c) Google's official libwebrtc doesn't support API 10 or ARMv6 and weighs tens of megabytes on its own. Instead, audio calls run on a focused ~1,500-line C engine linked directly against statically compiled fixed-point libopus and Rust core's OpenSSL, paired with Java AudioRecord/AudioTrack.

  4. Zero-Dependency Java UI & Minimal RPC (src/main/java/deltachat/gingerbread/) All screens use standard Android 2.3–4.4 framework widgets. The JNI layer (com.b44t.messenger.*) matches dc_wrapper.c, and JSON-RPC calls use a lightweight ~200-line client (SimpleRpc.java) built on Android's built-in org.json rather than jackson-databind.


How to build

1. Set Up the Environment (Dev Container Recommended)

Open the repository in VS Code with Dev Containers or in GitHub Codespaces. .devcontainer/devcontainer.json automatically runs scripts/setup-toolchain.sh to install:

  • Rust 1.91.1 (with rust-src for -Z build-std)
  • Android SDK (android-10, android-19, Build Tools 25.0.3 and 30.0.3)
  • Android NDK 25.2.9519653 (Clang/LLVM toolchain) + Android NDK r10e API-9 ARM sysroot

If you decided not to use Dev Container, make sure to clone repository with submodules!

2. Compile Native Libraries & Build the APK

# Step 1: Compile Rust core (ARMv6), Opus, minimal ZXing JAR, and libnative-utils.so
bash scripts/ndk-make.sh

# Step 2: Compile Java/resources and produce the aligned, V1+V2 signed APK
bash scripts/build-apk.sh

By default, build-apk.sh signs with your debug keystore (~/.android/debug.keystore, generating one if needed). To sign with your own release key:

KEYSTORE=/path/to/release.keystore KEYSTORE_PASS=secret KEY_ALIAS=mykey bash scripts/build-apk.sh

The finished APK is written to deltachat-gingerbread.apk.

Because AndroidManifest.xml sets android:installLocation="auto", devices with limited internal storage can move the app to an SD card under Settings → Applications → Manage applications → Delta Chat → Move to SD card.

About

Delta Chat for Android 2.3+

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages