Writing Your First FAP App
What a FAP Is
FAP (Flipper Application Package) is Flipper's app format — compiled C code packaged to run on the device, installable without a full firmware rebuild. This is the right starting point if your goal is "add a specific feature/tool to my Flipper" rather than modifying firmware internals broadly (see the firmware build guide for that heavier path).
Setting Up the Dev Environment
You need the firmware source tree and build toolchain even for app-only development, since FAPs build against the firmware's SDK/headers:
git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git cd flipperzero-firmware ./fbt(First run downloads the toolchain — see the firmware build guide's troubleshooting section if this fails.)
Minimal App Structure
Under applications_user/, create a new folder for your app, e.g. hello_world/, with two required files:
application.fam (app manifest):
App( appid="hello_world", name="Hello World", apptype=FlipperAppType.EXTERNAL, entry_point="hello_world_app", stack_size=1 * 1024, fap_category="Examples", )hello_world.c (the actual app):
#include <furi.h> #include <gui/gui.h> static void draw_callback(Canvas* canvas, void* ctx) { canvas_draw_str(canvas, 10, 30, "Hello, Flipper!"); } int32_t hello_world_app(void* p) { ViewPort* view_port = view_port_alloc(); view_port_draw_callback_set(view_port, draw_callback, NULL); Gui* gui = furi_record_open(RECORD_GUI); gui_add_view_port(gui, view_port, GuiLayerFullscreen); furi_delay_ms(3000); // show for 3 seconds gui_remove_view_port(gui, view_port); furi_record_close(RECORD_GUI); view_port_free(view_port); return 0; }Building and Running
./fbt launch APPSRC=applications_user/hello_worldThis compiles your app and pushes it directly to a connected Flipper, launching it immediately — the fastest iteration loop for app development.
Key Concepts to Learn Next
- Input handling: input_callback registered alongside the draw callback — this is how you respond to button presses.
- FuriThread/FuriMessageQueue: Flipper's app model is event-driven via a message queue pattern — most real apps need this rather than the simple linear example above, once you're handling ongoing input and screen updates together.
- Storage API: for reading/writing files (saving app state, reading captured data) — Flipper's storage.h API, distinct from raw filesystem calls.
Learning From Existing Apps
The firmware repo's applications/ and applications_user/ directories are full of real, working example apps at every complexity level — reading through a similar existing app (find one that does something close to what you want) is often faster than working purely from API documentation, since it shows the actual patterns in context.
Packaging for Distribution
Once working, ./fbt faps builds a distributable .fap file others can install via qFlipper's app installer without needing the full dev toolchain themselves — this is how community apps end up in the Flipper app catalog.
Related Guides
- Building Your First Custom Flipper Zero App: ufbt Setup, GUI, and GPIO
- How to Install Custom Firmware and Develop Apps for the Flipper Zero
- Flipper Zero: Getting Started with BadUSB, Sub-GHz, and NFC
- Updating Flipper Zero Firmware and Installing Unleashed or RogueMaster
- Getting Started with Flipper Zero: The Complete Beginner Guide
- Flashing Firmware via ST-Link/SWD: Recovery & Custom Builds
- Building Firmware from Source: Toolchain & Compiling
- How to Build a Custom Mechanical Keyboard from Scratch: Hand-Wiring and QMK Firmware