LupusE / FlipperMgmt

Flipper management scripts and tools
12 stars 2 forks source link

Flipper Management Tools

A collection of tools to handle the Flipper Zero

Here are some of my helper for daily handling the Flipper Zero

irfiles-import.py - Flipper-IRDB to sqlite.db

This is a tool to convert a local git repository of a Flipper-IRDB to a SQLite3 Database.

Documentation: https://github.com/LupusE/FlipperMgmt/blob/main/docs/irfiles2sqlite.md

Todo:

syncFlipper

A script to keep some github sources local up-to-date and sync with sd card (if mounted), with less write cycles. During copy to SD there are some redirections, for better browsing at the Flipper itself.

Installation

  1. cd ~/git && git clone https://github.com/LupusE/FlipperMgmt/
  2. cd FlipperMgmt && sh syncFlipper

Feel free to make the script executable with chmod +x syncFlipper -> ./syncFlipper

Usage

Just start the script from your terminal with sh syncFlipper or ./syncFlipper. The script will go through the github sources, if no local repository is found it will clone the remote one. If it is available, it will update (git pull) it. If the SDCard is mounted at sdcard=/media/$USER/xxx (line 8), it will sync the files as well. The main script syncflipper will call the subscripts. Here are the available git sources. In syncflipperGit are the functions to pull the git sources and copy to SD, if availale In syncflipperApps is a function to sync the apps from GuidoZ to the SD card

If the sd card is mounted under the given path (sdcard=/media/$USER/xxx,line 8), the script will sync (copy, update and delete) the local repository to the sd card. It is hard to navigate trough too much files at the small flipper screen. Therfore I've reorganized the destination path of some repositorys for the sd card

Within the script you'll find some repositorys from Flipper Zero Awsome. Just comment/uncomment as you need. A special case is the huge UberGuidoz repository. It contains plenty of different modules, so I've wrote a own function for this one. The Flipper-Starnew repository splits between iButton and RFID dumps.

Before the scripting, I always wondered why some flipper directorys are 3 to 4 times bigger than the local ones. There is a difference because of the filesystem (blocksize), but not this much. The Flipper-IRDB files for example are under heavy development. Sometimes a whole directory is renamed. At first I only copied the new files, the size increased. So I switched to rsync. First advantage: The files are checked by checksum. This reduces write cycles on sd card. Second advantage: The --delete option deletes files in the target, that are not at the source.

Subfolder /helper

Some helper for the helper

animaltag_hex2dec.py

Two functions.

The main function calls asks for a filename (export) to create a Flipper Zero .rfid file. With 'Enter' no file will be generated, it will just convert from one to another.

The script is based on @cbytes work in the Flipper Zero forum. I just added some checks and the file output. Also I reduced the lines for the math part.

generate_universalremote_file.py

Just take the result from ../irfiles_import.py from flipper_irdblite.db and generate files for the Flipper Zero universal remote. No fancy UI at the moment.