Giter Club home page Giter Club logo

flipperzero-firmware's Introduction

A pixel art of a Dophin with text: Flipper Zero Official Repo

Flipper Zero Firmware

Contributing

Our main goal is to build a healthy and sustainable community around Flipper, so we're open to any new ideas and contributions. We also have some rules and taboos here, so please read this page and our Code of Conduct carefully.

I need help

The best place to search for answers is our User Documentation. If you can't find the answer there, check our Discord Server or our Forum.

I want to report an issue

If you've found an issue and want to report it, please check our Issues page. Make sure the description contains information about the firmware version you're using, your platform, and a clear explanation of the steps to reproduce the issue.

I want to contribute code

Before opening a PR, please confirm that your changes must be contained in the firmware. Many ideas can easily be implemented as external applications and published in the Flipper Application Catalog (coming soon). If you are unsure, reach out to us on the Discord Server or the Issues page, and we'll help you find the right place for your code.

Also, please read our Contribution Guide and our Coding Style, and make sure your code is compatible with our Project License.

Finally, open a Pull Request and make sure that CI/CD statuses are all green.

Development

Flipper Zero Firmware is written in C, with some bits and pieces written in C++ and armv7m assembly languages. An intermediate level of C knowledge is recommended for comfortable programming. C, C++, and armv7m assembly languages are supported for Flipper applications.

Requirements

Supported development platforms:

  • Windows 10+ with PowerShell and Git (x86_64)
  • macOS 12+ with Command Line tools (x86_64, arm64)
  • Ubuntu 20.04+ with build-essential and Git (x86_64)

Supported in-circuit debuggers (optional but highly recommended):

Flipper Build System will take care of all the other dependencies.

Cloning source code

Make sure you have enough space and clone the source code:

git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git

Building

Build firmware using Flipper Build Tool:

./fbt

Flashing firmware using an in-circuit debugger

Connect your in-circuit debugger to your Flipper and flash firmware using Flipper Build Tool:

./fbt flash

Flashing firmware using USB

Make sure your Flipper is on, and your firmware is functioning. Connect your Flipper with a USB cable and flash firmware using Flipper Build Tool:

./fbt flash_usb

Documentation

Project structure

  • applications - applications and services used in firmware
  • assets - assets used by applications and services
  • furi - Furi Core: OS-level primitives and helpers
  • debug - debug tool: GDB plugins, an SVD file, etc.
  • documentation - documentation generation system configs and input files
  • firmware - firmware source code
  • lib - our and 3rd party libraries, drivers, etc.
  • scripts - supplementary scripts and python libraries home

Also, see ReadMe.md files inside those directories for further details.

Links

flipperzero-firmware's People

Contributors

aku-plooks avatar albkharisov avatar aprosvetova avatar astrrra avatar bettse avatar disasm avatar doomwastaken avatar drunkbatya avatar drzlo13 avatar glitchcore avatar gmman avatar gornekich avatar gsurkov avatar hedger avatar hp197 avatar hramrach avatar itsyourbedtime avatar karator avatar kevinwallace avatar lomalkin avatar mauimauer avatar nminaylov avatar okalachev avatar rusdacent avatar shmuma avatar skorpionm avatar skotopes avatar tonyfreeman avatar xmasterx avatar zhovner avatar

Watchers

 avatar  avatar

flipperzero-firmware's Issues

(Post v1) Request Service

Useful for fetch key versions, etc.

  • For card info, we can issue a Request Service v2 + Request Service for node 0x0000 to probe if the card supports AES, DES or both
  • Try Request Service v2
  • If it fails, fall back to Request Service
  • If Request Service v2 succeeds:
    • Read the encryption identifier
    • Set node->key_version.aes = aes_version and node->key_version.des = des_version when card supports DES or node->key_version.des = KEY_NOT_INSTALLED when otherwise
  • Otherwise, if Request Service succeeds
    • Set node->key_version.des = des_version and node->key_version.aes = KEY_NOT_INSTALLED
  • Otherwise, set both to KEY_NOT_INSTALLED
  • On the area info and service viewer UI, print aes key version ${node->key_version.aes} and/or des key version ${node->key_version.des} when they are not KEY_NOT_INSTALLED

* Note that KEY_NOT_INSTALLED = 0xffff

NFC-F Specific Card Types

  • Read IC/Suica
    • Maybe we should implement this as an optional parser for Read FeliCa? (EMV was a pretty bad example i.e. hardcoded behavior with no layering)
    • Reads balance (and transaction history in the future once we got a romanized SFCardFan DB) for Suica-compatibles i.e. CJRC ticketing system.
    • Use nfc_scene_device_info to display the info for this.
    • Maybe optional for the PR.
  • Read FeliCa Lite
    • Analogous to Read NTAG/Ultralight.
    • Specialized for FeliCa Lite{,-S}. This might eventually take Link's as well.
    • Check the first system (no traversal). If it's Lite{,-S} or Link, dump all the high-level blocks possible.
    • Maybe optional for the PR (more code == longer review == more complications). The Lite reader was pretty functional right now so maybe we can include it.
  • #2
    • Analogous to Read Mifare DESFire.
    • Dumps all systems, services and public blocks < a specific size for FeliCa's without specialized decoders.
    • Reskin the old FeliCa task could be an option.
  • Read NFC-F data
    • Analogous to its NFC-A counterpart.
    • Read and parse nothing but IDm and PMm.

Read FeliCa

  • Figure out why nfcf patch won't read (is it only handling Lite? Yes.)
  • Fix crash on double entering lite system info scene (regression?) Might be more appropriate to let @nullableVoidPtr to handle this.
  • Plumbing for FeliCa Standard
    • Traversal system
    • Read public blocks
    • Enumerate over systems
    • Put the above 3 together
    • felica_read_card should automagically read Standard as well as Lite{,-S} using the above routine
    • Protocol version dumper (use Request Specification Version)
    • Force probing for Standard or Lite tags
      • Standard: Probe for Request System Code
      • Lite: Selecting Lite system code succeeds
      • 12fc: Selecting 12fc system code succeeds
  • Invoke from generic NFC info scene when needed (FeliCa-specific data should be displayed on the info scene e.g. human readable IC type as title, primary system, # of systems, areas and services)
  • "More" button behavior
    • For Standard: NfcDataInfo -> FelicaData
    • For monolithic Lite or 12fc (IC code 0xffff): NfcDataInfo -> FelicaSystemData (how do we properly support these?)
    • For Lite or 12fc systems: Same as Standard
  • Data (FelicaData) scene
    • List all systems on card
    • Card info viewer (shows protocol version)
  • System viewer (FelicaSystemData) scene
    • List available areas and services when the node is an area
    • Show service info and public blocks when the node is a service
      • List service info at the beginning of block view like DESFire (if needed)
      • Print hexdump of blocks
    • System info viewer like DESFire (only applicable to root area) (if needed)
    • Area info viewer like DESFire (if needed)
  • Felica Lite data dumper FelicaLiteData
    • Can be largely copied from the old code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.