Inspiration

CyberDrill started with a real study routine, not a hackathon brief. Its author is working through Cisco's NetAcad cybersecurity path — a career changer studying at night, in Spanish, for certifications whose material is published almost entirely in English. The pattern is the same for thousands of Spanish-speaking students: the knowledge is available, the tutor is not. Commercial prep apps are English-first, cloud-only, and useless on a bus, in a dead zone, or on a metered connection — exactly where working students actually study. So the question became: what should a study app look like if it respected both the student's language and their connectivity? Firebase AI Logic's hybrid inference gave the answer a shape: the same SDK can answer from Gemini Nano on the device or from Gemini in the cloud. CyberDrill assigns each study task to the place where it genuinely works best — and tells the student, on every single answer, which place that was.

What it does

CyberDrill is a pocket cybersecurity tutor for Android, bilingual with Spanish as the default language (a persistent ES/EN selector is always visible). It is built around six topics from the NetAcad study path: Governance & compliance, Threats & vulnerabilities, Network defense, Endpoint security, Incident response, and Cryptography basics.

  • Flashcards. Each topic has term cards. The built-in definition is one tap away from a fresh, AI-generated definition — and the card shows a badge with the real inference source.
  • Mini-quizzes. Five quick questions per topic, fully playable offline. A "new AI question" button generates a fresh question on demand; the generation prompt excludes the question on screen and rotates its focus, so tapping it never shows you the same question twice.
  • Full exam. Ten questions with an explanation for every answer and a closing progress analysis written in Spanish. The exam is generated in the cloud as two parallel blocks of five, and the loading screen shows real progress ("5 of 10 questions ready") instead of a mute spinner.
  • Progress. Sessions, questions answered, accuracy, and a mastery bar per topic. Everything is stored locally with DataStore — no accounts, no tracking, nothing to sign up for.
  • Radical transparency about the AI. Every AI answer carries a badge — On device, In the cloud, or Local bank — read from the SDK's own inferenceSource. Students learn to feel the difference between the two inference routes, which is the entire point of hybrid AI. If Firebase is not configured or a call fails, a built-in seed bank of 42 flashcards and 24 questions (original content, ES + EN) keeps every screen functional. Nothing in the app dead-ends.

How we built it

CyberDrill is a native Android app in Kotlin with Jetpack Compose, built around Firebase AI Logic (firebase-ai + firebase-ai-ondevice) with App Check (debug provider in debug builds, Play Integrity in release). One SDK entry point builds three models, each matched to a task:

  • Hybrid model — cloud Gemini Flash plus OnDeviceConfig(InferenceMode.PREFER_ON_DEVICE, maxOutputTokens = 256). It serves flashcard definitions and single mini-quiz questions: short, structured, single-turn tasks that fit the envelope Google validates for Gemini Nano. Offline they answer on device, privately, at zero cost; if Nano is unavailable, the same call falls back to the cloud automatically.
  • Cloud model, creative — temperature = 0.9, used only for generating fresh single questions, where variety matters more than determinism.
  • Cloud model, exam — strict JSON mode (responseMimeType = "application/json"), maxOutputTokens = 2048, minimal thinking level. It generates the full exam and the progress analysis. Rich Spanish generation lives here by design: on-device inference is single-turn and short-output, and Google validates only English and Korean on device — so long-form Spanish belongs in the cloud. The on-device lifecycle is managed explicitly at startup (checkStatus() → download() when downloadable → warmUp()), because the SDK never downloads the model implicitly. Exam generation is split into two parallel 5-question blocks with a per-block retry and a tolerant parser that salvages complete questions from imperfect JSON, so one bad block never restarts the whole exam. The UI reads response.inferenceSource (ON_DEVICE / IN_CLOUD) and renders the badge from it — the badge is never guessed.

Challenges we ran into

  • The hybrid route is only real on real hardware. Gemini Nano does not run on emulators, so the on-device path could only be verified on a physical Galaxy Z Fold7 — including registering the App Check debug token and watching the first answer arrive with the On device badge.
  • A cloud model is a moving target. The model we started with was closed to new users mid-hackathon; we migrated the cloud route and re-verified the whole chain end to end.
  • Long generation feels broken even when it works. Our first full exam took so long behind a static spinner that it read as a hang. Splitting the exam into two parallel blocks, switching the exam model to strict JSON with minimal thinking, adding per-block retries, and showing real progress turned the wait from minutes into seconds — and made it visible.
  • Deterministic models repeat themselves. Gemini Nano returned the same "new" question for the same prompt. The fix was prompt engineering (exclude the current question, rotate the focus) plus temperature on the cloud route, with a seed-bank guarantee that the screen always changes.
  • Silent failure is the worst failure. Early builds fell back to the seed bank without a trace. Timeouts, parse failures, and fallbacks are now surfaced on the home screen with the real cause, which is what made every other fix debuggable.

Accomplishments that we're proud of

  • A complete, working hybrid loop on real hardware: flashcards and mini-quiz questions answered on device in airplane mode, full exams generated in the cloud, and an honest badge proving which route each answer took.
  • A Spanish-first study tool for a real curriculum — not a translated demo, but the app its author actually studies with every night.
  • An exam generator that is fast because it is engineered, not because it asks for less: parallel blocks, strict JSON, per-block salvage, real progress.
  • Zero dead ends: seed bank, cloud fallback, and visible errors mean the student can always keep studying.

What we learned

Hybrid inference is a design discipline, not a toggle. The interesting work is deciding, task by task, what belongs on the device (short, private, offline, free) and what belongs in the cloud (long, rich, in the student's language) — and then being transparent about the choice. We also learned that on-device models have personalities: near-deterministic outputs and short envelopes shape your prompts as much as any API limit.

What's next for CyberDrill

  • The remaining NetAcad courses in the author's path (defense analyst, ethical hacker, network technician, CCNA) as new topic packs.
  • Spaced repetition scheduling driven by the per-topic mastery data the app already collects.
  • A web companion built on the same Firebase AI Logic hybrid SDK, so the drill follows the student from phone to browser.
  • Publishing on Google Play so other Spanish-speaking students can use it.

Built With

  • android
  • datastore
  • firebase-ai-logic
  • firebase-app-check
  • gemini
  • gemini-nano
  • google-ai-studio
  • jetpack-compose
  • kotlin
Share this project:

Updates

Submission history