Skip to content
kshatriya-abhayPublic

Repository files navigation

Ferb

CI

A private assistant for Android that does things, on the phone.

Type a request, such as "set a timer for 10 minutes" or "turn on the flashlight", and Ferb does it: it sets the timer, switches on the torch, opens the app or settings page. A small tool-calling model, Needle 3 (35 MB), runs on the phone inside the app. Or tap the mic and say it: where Gemini Nano runs (Pixel 10 and 11, among others), it hears English and Hindi on the phone (through Android's AICore) and rewrites what you say as one plain English command for Needle 3; elsewhere, Whistle (17 MB) transcribes English on the phone.

Private by design: Ferb has no internet permission, so nothing you type leaves your phone. The one exception is opt-in: Ferb Link, below, which takes the steps you choose to a computer of your own.

Ferb doesn't chat or answer questions; it runs tools on your phone, and says so when none fits.

Setup: Choose your preferred model  The chat: a timer, the media volume and the flashlight  The assistant sheet over the home screen: it hears “Add eggs to the shopping list”, adds them, and opens the list in Obsidian

Get started

Install

You need an Android phone with a 64-bit ARM processor (most phones since 2017) and Android 13 or later. Ferb isn't on the Play Store; install it from GitHub, with updates through Obtainium if you like.

From GitHub: download the latest ferb-*.apk from Releases on your phone and open it. Android asks once to allow installs from your browser or files app. To update, install the newer APK the same way: your settings and reminders stay.

With Obtainium (updates without checking GitHub yourself):

  1. Install Obtainium, from its site or F-Droid.
  2. In Obtainium, tap Add app, paste https://github.com/kshatriya-abhay/ferb, and tap Add.
  3. Tap Install. Obtainium offers each new release.

Using Ferb Link too? Add https://github.com/kshatriya-abhay/ferb-link the same way. Get both apps from the same place: Ferb Link answers only a Ferb signed with the same key, so releases go with releases and your own builds with your own builds.

Or build it from source.

First launch

Four short pages: a welcome; Choose your preferred model (Gemini Nano is picked where it can run; Download starts it, and Ferb works meanwhile); Choose Ferb's tools (turn on the ones that need a permission or a folder); and making Ferb your assistant. Skip goes to the chat; Settings → Run setup again brings the pages back. Try:

  • "Set a timer for 10 minutes"
  • "Turn on the flashlight"
  • "Wake me up at 6:45"
  • "Open the calculator"
  • "Open Wi-Fi settings"

Each reply shows what Ferb did, with buttons such as Turn off, Undo or Open again. When Ferb isn't sure enough, or the tool is one that reaches other people, it asks first: Shall I do this? Tap a reply to see the details (how sure Needle 3 was, and why it asked or ran). Settings → Show tips again brings back the one-time tips and the setup pages.

Turn on more tools

Tools that need nothing set up are on from the start. The rest (Calls & Messages, Agenda & Calendar, Reminders, Lists) are turned on from setup's tools page or Settings → Tools, where each tool's page also has its keywords, whether it asks first, and how sure Needle 3 must be.

Choose your preferred model

Settings → Choose your preferred model has three choices. Each one hears you and tidies what you say; Needle 3 makes the tool call on the phone whichever you choose, and you can always type.

  • Needle + Whistle: English-only, wide-compatibility. Whistle hears you on the phone; no rewrite.
  • Gemini Nano: on-device, multilingual, compatibility varies (Pixel 10 and 11 among others). It hears you and rewrites the request, on the phone. Greyed out where Gemini Nano can't run; where it still needs a one-time download, the download is right there, and Ferb uses Whistle until it's ready.
  • Gemma 4 (via Ferb Link): run it on your own server, multilingual. Your computer hears you and rewrites the request, through Ferb Link. Greyed out until Ferb Link is installed; until it's paired, a line and a button open it.

If your computer can't be reached for a request, Ferb answers on the phone and says so on the reply. Settings → Advanced has the steps one by one: audio processing, prompt rewrite and tool selection (Jev, through Ferb Link). Options your phone can't ever use there are hidden, with a line saying why.

Make Ferb your phone's assistant

In Android's Settings → Apps → Default apps → Digital assistant app, pick Ferb. Then holding the power button, or swiping up from a bottom corner, opens Ferb in a sheet over whatever app you're in, already listening (or ready to type, with audio processing off): say it, tap ✓, and the reply shows there. Drag it up, or tap it, for the full chat. Ferb doesn't read the screen and asks for no extra permission for this.

What it can do

Tool On at first Try
Alarms ✓ "Wake me up at 6:45"
Timers ✓ "Timer for 10 minutes"
Open apps ✓ "Open the calculator"
Settings pages ✓ "Open Wi-Fi settings"
Flashlight ✓ "Turn on the flashlight"
Show alarms ✓ "Show my alarms"
Media volume ✓ "Set volume to 40"
Media controls ✓ "Pause the music"
Camera ✓ "Take a picture"
Notes ✓ "Note that the car is parked on level 3" (to your notes app, such as Google Keep, or, with Obsidian installed, "Markdown notes (powered by Obsidian)": Markdown files in a folder of your vault, opened in Obsidian)
Lists "Add milk and eggs to the shopping list" (a note with checkboxes in your notes folder)
Show lists "What's on my shopping list?" (tick items off in the chat)
Tick off "Tick milk off the shopping list"
Reminders "Remind me on Friday to pay the rent" (Ferb's own notification, with Done and Snooze; can repeat; listed, made by hand and cleared on the Notes screen's Reminders tab)
Directions ✓ "Show me the way to the Taj Mahal" (opens Google Maps)
Calls "Call Kritika" (always asks first)
Messages "Text Priya I'm running late" (always asks first; you press send)
Agenda "What's on tomorrow?"
Calendar "Add the dentist to my calendar tomorrow at 5 pm" (always asks first)

How each one works, and when Ferb asks first: docs/how-it-works.md.

Ferb Link (optional)

Ferb Link is a companion app for a bigger model on a computer of your own (one with a GPU, such as a gaming laptop, reached over Tailscale). It holds the internet access Ferb doesn't have. With it, any of the steps above can use your computer: Gemma 4 there can hear you and rewrite your requests (Hindi and Hinglish too), and Jev can pick the tool. Needle 3 on the phone still makes the call. Ferb Link answers only a Ferb signed with the same key, so get both the same way: both from Releases, or both built on the same computer. Set it up with Ferb Link's quick start. Can't reach your computer? See Ferb Link's troubleshooting (for example, Private DNS set to a provider).

Build from source

Needs Linux or macOS, and:

  • mise, which installs the right Java and runs the build tasks;
  • the Android SDK (from Android Studio, or the command-line tools) with these packages:
    sdkmanager "platforms;android-37.2" "build-tools;37.0.0" "ndk;28.2.13676358" "cmake;3.22.1" "platform-tools"
    The SDK is looked for in ~/Android/Sdk (Android Studio's place on Linux); set ANDROID_HOME if yours is elsewhere (on macOS, usually ~/Library/Android/sdk);
  • your phone with USB debugging on, connected (adb devices lists it).
git clone https://github.com/kshatriya-abhay/ferb.git
cd ferb
mise trust && mise install   # Java 21
mise run bootstrap           # writes local.properties (the SDK's path)
mise run fetch               # the Needle engine and the Needle 3 model (pinned, checksummed)
mise run test                # the unit tests, about 11 s
mise run run                 # builds, installs and opens Ferb on the phone

The app is signed with your computer's debug key (~/.android/debug.keystore, created on the first build). Build Ferb Link on the same computer, and the two recognise each other. Releases are signed with the release key, so a build of your own can't update a release install: switching means uninstalling, which removes Ferb's settings and reminders.

Working on Ferb itself (tests, tuning the tools, comparing models): docs/development.md.

Privacy

Ferb has no internet access, analytics, ads or accounts. What stays on the phone and what can leave it: PRIVACY.md, and Settings → Privacy in the app.

Credits

Project Licence Used for
Needle 3 by Cactus Compute Apache-2.0 The tool-calling model, bundled
Whistle by Cactus Compute Apache-2.0 Speech to text on the phone (audio processing: Whistle, English), bundled
Needle engine by Cactus Compute Apache-2.0 Runs Needle 3 and Whistle (libneedle.a, linked prebuilt)
ML Kit GenAI Speech Recognition by Google (genai-speech-recognition) ML Kit Terms Gemini Nano speech to text through AICore (audio processing: English and Hindi, on Pixel 10 and 11). Its network permissions are removed from Ferb
ML Kit GenAI Prompt API by Google (genai-prompt), with Gemini Nano ML Kit Terms The prompt rewrite with Gemini Nano, through AICore: each request as one English command for Needle 3, or none
ML Kit GenAI Schema by Google (genai-schema) ML Kit Terms Gemini Nano's typed answer for the prompt rewrite: the command and, apart, the words to keep as said
AndroidX (Compose, Material 3, Lifecycle) Apache-2.0 UI
Material Components for Android Apache-2.0 The Material 3 window theme behind Compose
Kotlin coroutines Apache-2.0 Background work
Material Icons Apache-2.0 Icons
Kotlin standard library by JetBrains Apache-2.0 The language's runtime
kotlinx.serialization by JetBrains Apache-2.0 Brought in by ML Kit GenAI
Guava by Google Apache-2.0 Brought in by ML Kit
Google Play services by Google (play-services-base, -basement, -tasks) Android Software Development Kit License Brought in by ML Kit
Firebase components and Google Data Transport by Google Apache-2.0 Brought in by ML Kit: its telemetry transport, which can't send anything, as Ferb has no INTERNET permission
Annotations: JSR 305, Error Prone annotations, JSpecify, javax.inject, JetBrains annotations, J2ObjC annotations Apache-2.0 Brought in by Guava, ML Kit and Kotlin
Checker Framework qualifiers MIT Annotations, brought in by Guava
Reactive Streams CC0 Brought in by Kotlin coroutines' reactive bridge

Tools and models used only for tuning, not shipped: docs/development.md.

License

Apache-2.0: see LICENSE. What the app ships with and their licences: Credits above, and Settings → Open-source licences.