[FL-3400] External menu apps (#2849)

* FBT, applications: add MENUEXTERNAL app type
* FBT, uFBT: build MENUEXTERNAL as EXTERNAL app
* Loader menu: show external menu apps
* LFRFID: move to sd card
* FBT: always build External Applications list
* Archive: look for external apps path
* Infrared: move to sd card
* Apps: add "start" apps
* iButton: move to sd card
* BadUSB: move to sd card
* External apps: update icons
* GPIO: move to sd card
* Loader: look for external apps path
* U2F: move to sd
* SubGHz: move to sd
* Apps: "on_start" metapackage
* NFC: move to sd
* Sync f7 and f18

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Sergey Gavrilov 2023-07-10 11:03:41 +03:00 committed by GitHub
parent 4736fa876d
commit 9b2d80d6b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 258 additions and 98 deletions

View File

@ -4,7 +4,6 @@ App(
apptype=FlipperAppType.METAPACKAGE,
provides=[
"gpio",
"onewire",
"ibutton",
"infrared",
"lfrfid",
@ -13,5 +12,20 @@ App(
"bad_usb",
"u2f",
"archive",
"main_apps_on_start",
],
)
App(
appid="main_apps_on_start",
name="On start hooks",
apptype=FlipperAppType.METAPACKAGE,
provides=[
"ibutton_start",
"onewire_start",
"subghz_start",
"infrared_start",
"lfrfid_start",
"nfc_start",
],
)

View File

@ -5,13 +5,14 @@
#include "../helpers/archive_browser.h"
#include "../views/archive_browser_view.h"
#include "archive/scenes/archive_scene.h"
#include <applications.h>
#define TAG "ArchiveSceneBrowser"
#define SCENE_STATE_DEFAULT (0)
#define SCENE_STATE_NEED_REFRESH (1)
const char* archive_get_flipper_app_name(ArchiveFileTypeEnum file_type) {
static const char* archive_get_flipper_app_name(ArchiveFileTypeEnum file_type) {
switch(file_type) {
case ArchiveFileTypeIButton:
return "iButton";

View File

@ -1,15 +1,12 @@
App(
appid="bad_usb",
name="Bad USB",
apptype=FlipperAppType.APP,
apptype=FlipperAppType.MENUEXTERNAL,
entry_point="bad_usb_app",
cdefines=["APP_BAD_USB"],
requires=[
"gui",
"dialogs",
],
stack_size=2 * 1024,
icon="A_BadUsb_14",
order=70,
fap_libs=["assets"],
fap_icon="icon.png",
fap_category="USB",
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

View File

@ -1,12 +1,12 @@
App(
appid="gpio",
name="GPIO",
apptype=FlipperAppType.APP,
apptype=FlipperAppType.MENUEXTERNAL,
entry_point="gpio_app",
cdefines=["APP_GPIO"],
requires=["gui"],
stack_size=1 * 1024,
icon="A_GPIO_14",
order=50,
fap_libs=["assets"],
fap_icon="icon.png",
fap_category="GPIO",
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,25 +1,21 @@
App(
appid="ibutton",
name="iButton",
apptype=FlipperAppType.APP,
apptype=FlipperAppType.MENUEXTERNAL,
targets=["f7"],
entry_point="ibutton_app",
cdefines=["APP_IBUTTON"],
requires=[
"gui",
"dialogs",
],
provides=["ibutton_start"],
icon="A_iButton_14",
stack_size=2 * 1024,
order=60,
fap_libs=["assets"],
fap_icon="icon.png",
fap_category="iButton",
)
App(
appid="ibutton_start",
apptype=FlipperAppType.STARTUP,
targets=["f7"],
entry_point="ibutton_on_system_start",
requires=["ibutton"],
order=60,
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

View File

@ -1,25 +1,21 @@
App(
appid="infrared",
name="Infrared",
apptype=FlipperAppType.APP,
apptype=FlipperAppType.MENUEXTERNAL,
entry_point="infrared_app",
targets=["f7"],
cdefines=["APP_INFRARED"],
requires=[
"gui",
"dialogs",
],
provides=["infrared_start"],
icon="A_Infrared_14",
stack_size=3 * 1024,
order=40,
fap_libs=["assets"],
fap_icon="icon.png",
fap_category="Infrared",
)
App(
appid="infrared_start",
apptype=FlipperAppType.STARTUP,
targets=["f7"],
entry_point="infrared_on_system_start",
requires=["infrared"],
order=20,
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

View File

@ -1,27 +1,21 @@
App(
appid="lfrfid",
name="125 kHz RFID",
apptype=FlipperAppType.APP,
apptype=FlipperAppType.MENUEXTERNAL,
targets=["f7"],
entry_point="lfrfid_app",
cdefines=["APP_LF_RFID"],
requires=[
"gui",
"dialogs",
],
provides=[
"lfrfid_start",
],
icon="A_125khz_14",
stack_size=2 * 1024,
order=20,
fap_libs=["assets"],
fap_icon="icon.png",
fap_category="RFID",
)
App(
appid="lfrfid_start",
targets=["f7"],
apptype=FlipperAppType.STARTUP,
entry_point="lfrfid_on_system_start",
requires=["lfrfid"],
order=50,
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

View File

@ -1,24 +1,21 @@
App(
appid="nfc",
name="NFC",
apptype=FlipperAppType.APP,
apptype=FlipperAppType.MENUEXTERNAL,
targets=["f7"],
entry_point="nfc_app",
cdefines=["APP_NFC"],
requires=[
"gui",
"dialogs",
],
provides=["nfc_start"],
icon="A_NFC_14",
stack_size=5 * 1024,
order=30,
fap_libs=["assets"],
fap_icon="icon.png",
fap_category="NFC",
)
App(
appid="nfc_start",
targets=["f7"],
apptype=FlipperAppType.STARTUP,
entry_point="nfc_on_system_start",
requires=["nfc"],
order=30,
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

View File

@ -1,14 +1,6 @@
App(
appid="onewire",
name="1-Wire",
apptype=FlipperAppType.METAPACKAGE,
provides=["onewire_start"],
)
App(
appid="onewire_start",
apptype=FlipperAppType.STARTUP,
entry_point="onewire_on_system_start",
requires=["onewire"],
order=60,
)

View File

@ -1,25 +1,21 @@
App(
appid="subghz",
name="Sub-GHz",
apptype=FlipperAppType.APP,
apptype=FlipperAppType.MENUEXTERNAL,
targets=["f7"],
entry_point="subghz_app",
cdefines=["APP_SUBGHZ"],
requires=[
"gui",
"cli",
"dialogs",
],
provides=["subghz_start"],
icon="A_Sub1ghz_14",
stack_size=3 * 1024,
order=10,
fap_libs=["assets", "hwdrivers"],
fap_icon="icon.png",
fap_category="Sub-GHz",
)
App(
appid="subghz_start",
targets=["f7"],
apptype=FlipperAppType.STARTUP,
entry_point="subghz_on_system_start",
requires=["subghz"],
order=40,
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

View File

@ -1,15 +1,12 @@
App(
appid="u2f",
name="U2F",
apptype=FlipperAppType.APP,
apptype=FlipperAppType.MENUEXTERNAL,
entry_point="u2f_app",
cdefines=["APP_U2F"],
requires=[
"gui",
"dialogs",
],
stack_size=2 * 1024,
icon="A_U2F_14",
order=80,
fap_libs=["assets"],
fap_category="USB",
fap_icon="icon.png",
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

View File

@ -17,6 +17,12 @@ typedef struct {
const FlipperInternalApplicationFlag flags;
} FlipperInternalApplication;
typedef struct {
const char* name;
const Icon* icon;
const char* path;
} FlipperExternalApplication;
typedef void (*FlipperInternalOnStartHook)(void);
extern const char* FLIPPER_AUTORUN_APP_NAME;
@ -52,3 +58,9 @@ extern const FlipperInternalApplication FLIPPER_ARCHIVE;
*/
extern const FlipperInternalApplication FLIPPER_SETTINGS_APPS[];
extern const size_t FLIPPER_SETTINGS_APPS_COUNT;
/* External Menu Apps list
* Spawned by loader
*/
extern const FlipperExternalApplication FLIPPER_EXTERNAL_APPS[];
extern const size_t FLIPPER_EXTERNAL_APPS_COUNT;

View File

@ -170,6 +170,16 @@ static const FlipperInternalApplication* loader_find_application_by_name(const c
return application;
}
static const char* loader_find_external_application_by_name(const char* app_name) {
for(size_t i = 0; i < FLIPPER_EXTERNAL_APPS_COUNT; i++) {
if(strcmp(FLIPPER_EXTERNAL_APPS[i].name, app_name) == 0) {
return FLIPPER_EXTERNAL_APPS[i].path;
}
}
return NULL;
}
static void loader_start_app_thread(Loader* loader, FlipperInternalApplicationFlag flags) {
// setup heap trace
FuriHalRtcHeapTrackMode mode = furi_hal_rtc_get_heap_track_mode();
@ -379,6 +389,14 @@ static LoaderStatus loader_do_start_by_name(
break;
}
// check External Applications
{
const char* path = loader_find_external_application_by_name(name);
if(path) {
name = path;
}
}
// check external apps
{
Storage* storage = furi_record_open(RECORD_STORAGE);

View File

@ -52,12 +52,18 @@ static void loader_menu_start(const char* name) {
furi_record_close(RECORD_LOADER);
}
static void loader_menu_callback(void* context, uint32_t index) {
static void loader_menu_apps_callback(void* context, uint32_t index) {
UNUSED(context);
const char* name = FLIPPER_APPS[index].name;
loader_menu_start(name);
}
static void loader_menu_external_apps_callback(void* context, uint32_t index) {
UNUSED(context);
const char* path = FLIPPER_EXTERNAL_APPS[index].path;
loader_menu_start(path);
}
static void loader_menu_applications_callback(void* context, uint32_t index) {
UNUSED(index);
UNUSED(context);
@ -89,13 +95,24 @@ static uint32_t loader_menu_exit(void* context) {
static void loader_menu_build_menu(LoaderMenuApp* app, LoaderMenu* menu) {
size_t i;
for(i = 0; i < FLIPPER_EXTERNAL_APPS_COUNT; i++) {
menu_add_item(
app->primary_menu,
FLIPPER_EXTERNAL_APPS[i].name,
FLIPPER_EXTERNAL_APPS[i].icon,
i,
loader_menu_external_apps_callback,
(void*)menu);
}
for(i = 0; i < FLIPPER_APPS_COUNT; i++) {
menu_add_item(
app->primary_menu,
FLIPPER_APPS[i].name,
FLIPPER_APPS[i].icon,
i,
loader_menu_callback,
loader_menu_apps_callback,
(void*)menu);
}
menu_add_item(

View File

@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,33.2,,
Version,+,34.0,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,

1 entry status name type params
2 Version + 33.2 34.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h

View File

@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,33.2,,
Version,+,34.0,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@ -147,7 +147,12 @@ Header,+,lib/mlib/m-rbtree.h,,
Header,+,lib/mlib/m-tuple.h,,
Header,+,lib/mlib/m-variant.h,,
Header,+,lib/music_worker/music_worker.h,,
Header,+,lib/nfc/helpers/mfkey32.h,,
Header,+,lib/nfc/helpers/nfc_generators.h,,
Header,+,lib/nfc/nfc_device.h,,
Header,+,lib/nfc/nfc_types.h,,
Header,+,lib/nfc/nfc_worker.h,,
Header,+,lib/nfc/parsers/nfc_supported_card.h,,
Header,+,lib/nfc/protocols/nfc_util.h,,
Header,+,lib/one_wire/maxim_crc.h,,
Header,+,lib/one_wire/one_wire_host.h,,
@ -1935,40 +1940,40 @@ Function,-,mf_classic_authenticate,_Bool,"FuriHalNfcTxRxContext*, uint8_t, uint6
Function,-,mf_classic_authenticate_skip_activate,_Bool,"FuriHalNfcTxRxContext*, uint8_t, uint64_t, MfClassicKey, _Bool, uint32_t"
Function,-,mf_classic_block_to_value,_Bool,"const uint8_t*, int32_t*, uint8_t*"
Function,-,mf_classic_check_card_type,_Bool,"uint8_t, uint8_t, uint8_t"
Function,-,mf_classic_dict_add_key,_Bool,"MfClassicDict*, uint8_t*"
Function,+,mf_classic_dict_add_key,_Bool,"MfClassicDict*, uint8_t*"
Function,-,mf_classic_dict_add_key_str,_Bool,"MfClassicDict*, FuriString*"
Function,-,mf_classic_dict_alloc,MfClassicDict*,MfClassicDictType
Function,-,mf_classic_dict_check_presence,_Bool,MfClassicDictType
Function,-,mf_classic_dict_delete_index,_Bool,"MfClassicDict*, uint32_t"
Function,+,mf_classic_dict_alloc,MfClassicDict*,MfClassicDictType
Function,+,mf_classic_dict_check_presence,_Bool,MfClassicDictType
Function,+,mf_classic_dict_delete_index,_Bool,"MfClassicDict*, uint32_t"
Function,-,mf_classic_dict_find_index,_Bool,"MfClassicDict*, uint8_t*, uint32_t*"
Function,-,mf_classic_dict_find_index_str,_Bool,"MfClassicDict*, FuriString*, uint32_t*"
Function,-,mf_classic_dict_free,void,MfClassicDict*
Function,+,mf_classic_dict_free,void,MfClassicDict*
Function,-,mf_classic_dict_get_key_at_index,_Bool,"MfClassicDict*, uint64_t*, uint32_t"
Function,-,mf_classic_dict_get_key_at_index_str,_Bool,"MfClassicDict*, FuriString*, uint32_t"
Function,+,mf_classic_dict_get_key_at_index_str,_Bool,"MfClassicDict*, FuriString*, uint32_t"
Function,-,mf_classic_dict_get_next_key,_Bool,"MfClassicDict*, uint64_t*"
Function,-,mf_classic_dict_get_next_key_str,_Bool,"MfClassicDict*, FuriString*"
Function,-,mf_classic_dict_get_total_keys,uint32_t,MfClassicDict*
Function,-,mf_classic_dict_is_key_present,_Bool,"MfClassicDict*, uint8_t*"
Function,+,mf_classic_dict_get_next_key_str,_Bool,"MfClassicDict*, FuriString*"
Function,+,mf_classic_dict_get_total_keys,uint32_t,MfClassicDict*
Function,+,mf_classic_dict_is_key_present,_Bool,"MfClassicDict*, uint8_t*"
Function,-,mf_classic_dict_is_key_present_str,_Bool,"MfClassicDict*, FuriString*"
Function,-,mf_classic_dict_rewind,_Bool,MfClassicDict*
Function,-,mf_classic_emulator,_Bool,"MfClassicEmulator*, FuriHalNfcTxRxContext*, _Bool"
Function,-,mf_classic_get_classic_type,MfClassicType,"uint8_t, uint8_t, uint8_t"
Function,-,mf_classic_get_read_sectors_and_keys,void,"MfClassicData*, uint8_t*, uint8_t*"
Function,-,mf_classic_get_sector_by_block,uint8_t,uint8_t
Function,+,mf_classic_get_read_sectors_and_keys,void,"MfClassicData*, uint8_t*, uint8_t*"
Function,+,mf_classic_get_sector_by_block,uint8_t,uint8_t
Function,-,mf_classic_get_sector_trailer_block_num_by_sector,uint8_t,uint8_t
Function,-,mf_classic_get_sector_trailer_by_sector,MfClassicSectorTrailer*,"MfClassicData*, uint8_t"
Function,+,mf_classic_get_sector_trailer_by_sector,MfClassicSectorTrailer*,"MfClassicData*, uint8_t"
Function,-,mf_classic_get_total_block_num,uint16_t,MfClassicType
Function,-,mf_classic_get_total_sectors_num,uint8_t,MfClassicType
Function,+,mf_classic_get_total_sectors_num,uint8_t,MfClassicType
Function,-,mf_classic_get_type_str,const char*,MfClassicType
Function,-,mf_classic_halt,void,"FuriHalNfcTxRxContext*, Crypto1*"
Function,-,mf_classic_is_allowed_access_data_block,_Bool,"MfClassicData*, uint8_t, MfClassicKey, MfClassicAction"
Function,-,mf_classic_is_allowed_access_sector_trailer,_Bool,"MfClassicData*, uint8_t, MfClassicKey, MfClassicAction"
Function,-,mf_classic_is_block_read,_Bool,"MfClassicData*, uint8_t"
Function,-,mf_classic_is_card_read,_Bool,MfClassicData*
Function,-,mf_classic_is_key_found,_Bool,"MfClassicData*, uint8_t, MfClassicKey"
Function,+,mf_classic_is_block_read,_Bool,"MfClassicData*, uint8_t"
Function,+,mf_classic_is_card_read,_Bool,MfClassicData*
Function,+,mf_classic_is_key_found,_Bool,"MfClassicData*, uint8_t, MfClassicKey"
Function,-,mf_classic_is_sector_data_read,_Bool,"MfClassicData*, uint8_t"
Function,-,mf_classic_is_sector_read,_Bool,"MfClassicData*, uint8_t"
Function,-,mf_classic_is_sector_trailer,_Bool,uint8_t
Function,+,mf_classic_is_sector_trailer,_Bool,uint8_t
Function,-,mf_classic_is_value_block,_Bool,"MfClassicData*, uint8_t"
Function,-,mf_classic_read_block,_Bool,"FuriHalNfcTxRxContext*, Crypto1*, uint8_t, MfClassicBlock*"
Function,-,mf_classic_read_card,uint8_t,"FuriHalNfcTxRxContext*, MfClassicReader*, MfClassicData*"
@ -1986,10 +1991,10 @@ Function,-,mf_classic_value_to_block,void,"int32_t, uint8_t, uint8_t*"
Function,-,mf_classic_write_block,_Bool,"FuriHalNfcTxRxContext*, Crypto1*, uint8_t, MfClassicBlock*"
Function,-,mf_classic_write_sector,_Bool,"FuriHalNfcTxRxContext*, MfClassicData*, MfClassicData*, uint8_t"
Function,-,mf_df_cat_application,void,"MifareDesfireApplication*, FuriString*"
Function,-,mf_df_cat_application_info,void,"MifareDesfireApplication*, FuriString*"
Function,-,mf_df_cat_card_info,void,"MifareDesfireData*, FuriString*"
Function,+,mf_df_cat_application_info,void,"MifareDesfireApplication*, FuriString*"
Function,+,mf_df_cat_card_info,void,"MifareDesfireData*, FuriString*"
Function,-,mf_df_cat_data,void,"MifareDesfireData*, FuriString*"
Function,-,mf_df_cat_file,void,"MifareDesfireFile*, FuriString*"
Function,+,mf_df_cat_file,void,"MifareDesfireFile*, FuriString*"
Function,-,mf_df_cat_free_mem,void,"MifareDesfireFreeMemory*, FuriString*"
Function,-,mf_df_cat_key_settings,void,"MifareDesfireKeySettings*, FuriString*"
Function,-,mf_df_cat_version,void,"MifareDesfireVersion*, FuriString*"
@ -2019,8 +2024,8 @@ Function,-,mf_df_prepare_read_records,uint16_t,"uint8_t*, uint8_t, uint32_t, uin
Function,-,mf_df_prepare_select_application,uint16_t,"uint8_t*, uint8_t[3]"
Function,-,mf_df_read_card,_Bool,"FuriHalNfcTxRxContext*, MifareDesfireData*"
Function,-,mf_ul_check_card_type,_Bool,"uint8_t, uint8_t, uint8_t"
Function,-,mf_ul_emulation_supported,_Bool,MfUltralightData*
Function,-,mf_ul_is_full_capture,_Bool,MfUltralightData*
Function,+,mf_ul_emulation_supported,_Bool,MfUltralightData*
Function,+,mf_ul_is_full_capture,_Bool,MfUltralightData*
Function,-,mf_ul_prepare_emulation,void,"MfUltralightEmulator*, MfUltralightData*"
Function,-,mf_ul_prepare_emulation_response,_Bool,"uint8_t*, uint16_t, uint8_t*, uint16_t*, uint32_t*, void*"
Function,-,mf_ul_pwdgen_amiibo,uint32_t,FuriHalNfcDevData*
@ -2030,13 +2035,18 @@ Function,-,mf_ul_reset,void,MfUltralightData*
Function,-,mf_ul_reset_emulation,void,"MfUltralightEmulator*, _Bool"
Function,-,mf_ultralight_authenticate,_Bool,"FuriHalNfcTxRxContext*, uint32_t, uint16_t*"
Function,-,mf_ultralight_fast_read_pages,_Bool,"FuriHalNfcTxRxContext*, MfUltralightReader*, MfUltralightData*"
Function,-,mf_ultralight_get_config_pages,MfUltralightConfigPages*,MfUltralightData*
Function,+,mf_ultralight_get_config_pages,MfUltralightConfigPages*,MfUltralightData*
Function,-,mf_ultralight_read_counters,_Bool,"FuriHalNfcTxRxContext*, MfUltralightData*"
Function,-,mf_ultralight_read_pages,_Bool,"FuriHalNfcTxRxContext*, MfUltralightReader*, MfUltralightData*"
Function,-,mf_ultralight_read_pages_direct,_Bool,"FuriHalNfcTxRxContext*, uint8_t, uint8_t*"
Function,-,mf_ultralight_read_signature,_Bool,"FuriHalNfcTxRxContext*, MfUltralightData*"
Function,-,mf_ultralight_read_tearing_flags,_Bool,"FuriHalNfcTxRxContext*, MfUltralightData*"
Function,-,mf_ultralight_read_version,_Bool,"FuriHalNfcTxRxContext*, MfUltralightReader*, MfUltralightData*"
Function,-,mfkey32_alloc,Mfkey32*,uint32_t
Function,-,mfkey32_free,void,Mfkey32*
Function,+,mfkey32_get_auth_sectors,uint16_t,FuriString*
Function,-,mfkey32_process_data,void,"Mfkey32*, uint8_t*, uint16_t, _Bool, _Bool"
Function,-,mfkey32_set_callback,void,"Mfkey32*, Mfkey32ParseDataCallback, void*"
Function,-,mkdtemp,char*,char*
Function,-,mkostemp,int,"char*, int"
Function,-,mkostemps,int,"char*, int, int"
@ -2085,11 +2095,25 @@ Function,+,nfc_device_save_shadow,_Bool,"NfcDevice*, const char*"
Function,+,nfc_device_set_loading_callback,void,"NfcDevice*, NfcLoadingCallback, void*"
Function,+,nfc_device_set_name,void,"NfcDevice*, const char*"
Function,+,nfc_file_select,_Bool,NfcDevice*
Function,-,nfc_generate_mf_classic,void,"NfcDeviceData*, uint8_t, MfClassicType"
Function,+,nfc_get_dev_type,const char*,FuriHalNfcType
Function,-,nfc_guess_protocol,const char*,NfcProtocol
Function,+,nfc_mf_classic_type,const char*,MfClassicType
Function,+,nfc_mf_ul_type,const char*,"MfUltralightType, _Bool"
Function,+,nfc_supported_card_verify_and_parse,_Bool,NfcDeviceData*
Function,+,nfc_util_bytes2num,uint64_t,"const uint8_t*, uint8_t"
Function,+,nfc_util_even_parity32,uint8_t,uint32_t
Function,+,nfc_util_num2bytes,void,"uint64_t, uint8_t, uint8_t*"
Function,+,nfc_util_odd_parity,void,"const uint8_t*, uint8_t*, uint8_t"
Function,+,nfc_util_odd_parity8,uint8_t,uint8_t
Function,+,nfc_worker_alloc,NfcWorker*,
Function,+,nfc_worker_free,void,NfcWorker*
Function,+,nfc_worker_get_state,NfcWorkerState,NfcWorker*
Function,-,nfc_worker_nfcv_emulate,void,NfcWorker*
Function,-,nfc_worker_nfcv_sniff,void,NfcWorker*
Function,-,nfc_worker_nfcv_unlock,void,NfcWorker*
Function,+,nfc_worker_start,void,"NfcWorker*, NfcWorkerState, NfcDeviceData*, NfcWorkerCallback, void*"
Function,+,nfc_worker_stop,void,NfcWorker*
Function,-,nfca_append_crc16,void,"uint8_t*, uint16_t"
Function,-,nfca_emulation_handler,_Bool,"uint8_t*, uint16_t, uint8_t*, uint16_t*"
Function,-,nfca_get_crc16,uint16_t,"uint8_t*, uint16_t"
@ -2666,6 +2690,7 @@ Function,-,strupr,char*,char*
Function,-,strverscmp,int,"const char*, const char*"
Function,-,strxfrm,size_t,"char*, const char*, size_t"
Function,-,strxfrm_l,size_t,"char*, const char*, size_t, locale_t"
Function,-,stub_parser_verify_read,_Bool,"NfcWorker*, FuriHalNfcTxRxContext*"
Function,+,subghz_block_generic_deserialize,SubGhzProtocolStatus,"SubGhzBlockGeneric*, FlipperFormat*"
Function,+,subghz_block_generic_deserialize_check_count_bit,SubGhzProtocolStatus,"SubGhzBlockGeneric*, FlipperFormat*, uint16_t"
Function,+,subghz_block_generic_get_preset_name,void,"const char*, FuriString*"
@ -3358,6 +3383,8 @@ Variable,+,message_red_255,const NotificationMessage,
Variable,+,message_sound_off,const NotificationMessage,
Variable,+,message_vibro_off,const NotificationMessage,
Variable,+,message_vibro_on,const NotificationMessage,
Variable,+,nfc_generators,const NfcGenerator*[],
Variable,-,nfc_supported_card,NfcSupportedCard[NfcSupportedCardTypeEnd],
Variable,+,sequence_audiovisual_alert,const NotificationSequence,
Variable,+,sequence_blink_blue_10,const NotificationSequence,
Variable,+,sequence_blink_blue_100,const NotificationSequence,

1 entry status name type params
2 Version + 33.2 34.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
147 Header + lib/mlib/m-tuple.h
148 Header + lib/mlib/m-variant.h
149 Header + lib/music_worker/music_worker.h
150 Header + lib/nfc/helpers/mfkey32.h
151 Header + lib/nfc/helpers/nfc_generators.h
152 Header + lib/nfc/nfc_device.h
153 Header + lib/nfc/nfc_types.h
154 Header + lib/nfc/nfc_worker.h
155 Header + lib/nfc/parsers/nfc_supported_card.h
156 Header + lib/nfc/protocols/nfc_util.h
157 Header + lib/one_wire/maxim_crc.h
158 Header + lib/one_wire/one_wire_host.h
1940 Function - mf_classic_authenticate_skip_activate _Bool FuriHalNfcTxRxContext*, uint8_t, uint64_t, MfClassicKey, _Bool, uint32_t
1941 Function - mf_classic_block_to_value _Bool const uint8_t*, int32_t*, uint8_t*
1942 Function - mf_classic_check_card_type _Bool uint8_t, uint8_t, uint8_t
1943 Function - + mf_classic_dict_add_key _Bool MfClassicDict*, uint8_t*
1944 Function - mf_classic_dict_add_key_str _Bool MfClassicDict*, FuriString*
1945 Function - + mf_classic_dict_alloc MfClassicDict* MfClassicDictType
1946 Function - + mf_classic_dict_check_presence _Bool MfClassicDictType
1947 Function - + mf_classic_dict_delete_index _Bool MfClassicDict*, uint32_t
1948 Function - mf_classic_dict_find_index _Bool MfClassicDict*, uint8_t*, uint32_t*
1949 Function - mf_classic_dict_find_index_str _Bool MfClassicDict*, FuriString*, uint32_t*
1950 Function - + mf_classic_dict_free void MfClassicDict*
1951 Function - mf_classic_dict_get_key_at_index _Bool MfClassicDict*, uint64_t*, uint32_t
1952 Function - + mf_classic_dict_get_key_at_index_str _Bool MfClassicDict*, FuriString*, uint32_t
1953 Function - mf_classic_dict_get_next_key _Bool MfClassicDict*, uint64_t*
1954 Function - + mf_classic_dict_get_next_key_str _Bool MfClassicDict*, FuriString*
1955 Function - + mf_classic_dict_get_total_keys uint32_t MfClassicDict*
1956 Function - + mf_classic_dict_is_key_present _Bool MfClassicDict*, uint8_t*
1957 Function - mf_classic_dict_is_key_present_str _Bool MfClassicDict*, FuriString*
1958 Function - mf_classic_dict_rewind _Bool MfClassicDict*
1959 Function - mf_classic_emulator _Bool MfClassicEmulator*, FuriHalNfcTxRxContext*, _Bool
1960 Function - mf_classic_get_classic_type MfClassicType uint8_t, uint8_t, uint8_t
1961 Function - + mf_classic_get_read_sectors_and_keys void MfClassicData*, uint8_t*, uint8_t*
1962 Function - + mf_classic_get_sector_by_block uint8_t uint8_t
1963 Function - mf_classic_get_sector_trailer_block_num_by_sector uint8_t uint8_t
1964 Function - + mf_classic_get_sector_trailer_by_sector MfClassicSectorTrailer* MfClassicData*, uint8_t
1965 Function - mf_classic_get_total_block_num uint16_t MfClassicType
1966 Function - + mf_classic_get_total_sectors_num uint8_t MfClassicType
1967 Function - mf_classic_get_type_str const char* MfClassicType
1968 Function - mf_classic_halt void FuriHalNfcTxRxContext*, Crypto1*
1969 Function - mf_classic_is_allowed_access_data_block _Bool MfClassicData*, uint8_t, MfClassicKey, MfClassicAction
1970 Function - mf_classic_is_allowed_access_sector_trailer _Bool MfClassicData*, uint8_t, MfClassicKey, MfClassicAction
1971 Function - + mf_classic_is_block_read _Bool MfClassicData*, uint8_t
1972 Function - + mf_classic_is_card_read _Bool MfClassicData*
1973 Function - + mf_classic_is_key_found _Bool MfClassicData*, uint8_t, MfClassicKey
1974 Function - mf_classic_is_sector_data_read _Bool MfClassicData*, uint8_t
1975 Function - mf_classic_is_sector_read _Bool MfClassicData*, uint8_t
1976 Function - + mf_classic_is_sector_trailer _Bool uint8_t
1977 Function - mf_classic_is_value_block _Bool MfClassicData*, uint8_t
1978 Function - mf_classic_read_block _Bool FuriHalNfcTxRxContext*, Crypto1*, uint8_t, MfClassicBlock*
1979 Function - mf_classic_read_card uint8_t FuriHalNfcTxRxContext*, MfClassicReader*, MfClassicData*
1991 Function - mf_classic_write_block _Bool FuriHalNfcTxRxContext*, Crypto1*, uint8_t, MfClassicBlock*
1992 Function - mf_classic_write_sector _Bool FuriHalNfcTxRxContext*, MfClassicData*, MfClassicData*, uint8_t
1993 Function - mf_df_cat_application void MifareDesfireApplication*, FuriString*
1994 Function - + mf_df_cat_application_info void MifareDesfireApplication*, FuriString*
1995 Function - + mf_df_cat_card_info void MifareDesfireData*, FuriString*
1996 Function - mf_df_cat_data void MifareDesfireData*, FuriString*
1997 Function - + mf_df_cat_file void MifareDesfireFile*, FuriString*
1998 Function - mf_df_cat_free_mem void MifareDesfireFreeMemory*, FuriString*
1999 Function - mf_df_cat_key_settings void MifareDesfireKeySettings*, FuriString*
2000 Function - mf_df_cat_version void MifareDesfireVersion*, FuriString*
2024 Function - mf_df_prepare_select_application uint16_t uint8_t*, uint8_t[3]
2025 Function - mf_df_read_card _Bool FuriHalNfcTxRxContext*, MifareDesfireData*
2026 Function - mf_ul_check_card_type _Bool uint8_t, uint8_t, uint8_t
2027 Function - + mf_ul_emulation_supported _Bool MfUltralightData*
2028 Function - + mf_ul_is_full_capture _Bool MfUltralightData*
2029 Function - mf_ul_prepare_emulation void MfUltralightEmulator*, MfUltralightData*
2030 Function - mf_ul_prepare_emulation_response _Bool uint8_t*, uint16_t, uint8_t*, uint16_t*, uint32_t*, void*
2031 Function - mf_ul_pwdgen_amiibo uint32_t FuriHalNfcDevData*
2035 Function - mf_ul_reset_emulation void MfUltralightEmulator*, _Bool
2036 Function - mf_ultralight_authenticate _Bool FuriHalNfcTxRxContext*, uint32_t, uint16_t*
2037 Function - mf_ultralight_fast_read_pages _Bool FuriHalNfcTxRxContext*, MfUltralightReader*, MfUltralightData*
2038 Function - + mf_ultralight_get_config_pages MfUltralightConfigPages* MfUltralightData*
2039 Function - mf_ultralight_read_counters _Bool FuriHalNfcTxRxContext*, MfUltralightData*
2040 Function - mf_ultralight_read_pages _Bool FuriHalNfcTxRxContext*, MfUltralightReader*, MfUltralightData*
2041 Function - mf_ultralight_read_pages_direct _Bool FuriHalNfcTxRxContext*, uint8_t, uint8_t*
2042 Function - mf_ultralight_read_signature _Bool FuriHalNfcTxRxContext*, MfUltralightData*
2043 Function - mf_ultralight_read_tearing_flags _Bool FuriHalNfcTxRxContext*, MfUltralightData*
2044 Function - mf_ultralight_read_version _Bool FuriHalNfcTxRxContext*, MfUltralightReader*, MfUltralightData*
2045 Function - mfkey32_alloc Mfkey32* uint32_t
2046 Function - mfkey32_free void Mfkey32*
2047 Function + mfkey32_get_auth_sectors uint16_t FuriString*
2048 Function - mfkey32_process_data void Mfkey32*, uint8_t*, uint16_t, _Bool, _Bool
2049 Function - mfkey32_set_callback void Mfkey32*, Mfkey32ParseDataCallback, void*
2050 Function - mkdtemp char* char*
2051 Function - mkostemp int char*, int
2052 Function - mkostemps int char*, int, int
2095 Function + nfc_device_set_loading_callback void NfcDevice*, NfcLoadingCallback, void*
2096 Function + nfc_device_set_name void NfcDevice*, const char*
2097 Function + nfc_file_select _Bool NfcDevice*
2098 Function - nfc_generate_mf_classic void NfcDeviceData*, uint8_t, MfClassicType
2099 Function + nfc_get_dev_type const char* FuriHalNfcType
2100 Function - nfc_guess_protocol const char* NfcProtocol
2101 Function + nfc_mf_classic_type const char* MfClassicType
2102 Function + nfc_mf_ul_type const char* MfUltralightType, _Bool
2103 Function + nfc_supported_card_verify_and_parse _Bool NfcDeviceData*
2104 Function + nfc_util_bytes2num uint64_t const uint8_t*, uint8_t
2105 Function + nfc_util_even_parity32 uint8_t uint32_t
2106 Function + nfc_util_num2bytes void uint64_t, uint8_t, uint8_t*
2107 Function + nfc_util_odd_parity void const uint8_t*, uint8_t*, uint8_t
2108 Function + nfc_util_odd_parity8 uint8_t uint8_t
2109 Function + nfc_worker_alloc NfcWorker*
2110 Function + nfc_worker_free void NfcWorker*
2111 Function + nfc_worker_get_state NfcWorkerState NfcWorker*
2112 Function - nfc_worker_nfcv_emulate void NfcWorker*
2113 Function - nfc_worker_nfcv_sniff void NfcWorker*
2114 Function - nfc_worker_nfcv_unlock void NfcWorker*
2115 Function + nfc_worker_start void NfcWorker*, NfcWorkerState, NfcDeviceData*, NfcWorkerCallback, void*
2116 Function + nfc_worker_stop void NfcWorker*
2117 Function - nfca_append_crc16 void uint8_t*, uint16_t
2118 Function - nfca_emulation_handler _Bool uint8_t*, uint16_t, uint8_t*, uint16_t*
2119 Function - nfca_get_crc16 uint16_t uint8_t*, uint16_t
2690 Function - strverscmp int const char*, const char*
2691 Function - strxfrm size_t char*, const char*, size_t
2692 Function - strxfrm_l size_t char*, const char*, size_t, locale_t
2693 Function - stub_parser_verify_read _Bool NfcWorker*, FuriHalNfcTxRxContext*
2694 Function + subghz_block_generic_deserialize SubGhzProtocolStatus SubGhzBlockGeneric*, FlipperFormat*
2695 Function + subghz_block_generic_deserialize_check_count_bit SubGhzProtocolStatus SubGhzBlockGeneric*, FlipperFormat*, uint16_t
2696 Function + subghz_block_generic_get_preset_name void const char*, FuriString*
3383 Variable + message_sound_off const NotificationMessage
3384 Variable + message_vibro_off const NotificationMessage
3385 Variable + message_vibro_on const NotificationMessage
3386 Variable + nfc_generators const NfcGenerator*[]
3387 Variable - nfc_supported_card NfcSupportedCard[NfcSupportedCardTypeEnd]
3388 Variable + sequence_audiovisual_alert const NotificationSequence
3389 Variable + sequence_blink_blue_10 const NotificationSequence
3390 Variable + sequence_blink_blue_100 const NotificationSequence

View File

@ -6,6 +6,11 @@ env.Append(
],
SDK_HEADERS=[
File("nfc_device.h"),
File("nfc_worker.h"),
File("nfc_types.h"),
File("helpers/mfkey32.h"),
File("parsers/nfc_supported_card.h"),
File("helpers/nfc_generators.h"),
File("protocols/nfc_util.h"),
],
)

View File

@ -6,6 +6,10 @@
#include <lib/toolbox/stream/file_stream.h>
#include <lib/toolbox/stream/buffered_file_stream.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
MfClassicDictTypeUser,
MfClassicDictTypeSystem,
@ -97,3 +101,7 @@ bool mf_classic_dict_find_index_str(MfClassicDict* dict, FuriString* key, uint32
* @return true on success
*/
bool mf_classic_dict_delete_index(MfClassicDict* dict, uint32_t target);
#ifdef __cplusplus
}
#endif

View File

@ -2,6 +2,10 @@
#include <lib/nfc/protocols/mifare_classic.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct Mfkey32 Mfkey32;
typedef enum {
@ -24,3 +28,7 @@ void mfkey32_process_data(
void mfkey32_set_callback(Mfkey32* instance, Mfkey32ParseDataCallback callback, void* context);
uint16_t mfkey32_get_auth_sectors(FuriString* string);
#ifdef __cplusplus
}
#endif

View File

@ -2,6 +2,10 @@
#include "nfc_device.h"
#ifdef __cplusplus
extern "C" {
#endif
const char* nfc_get_dev_type(FuriHalNfcType type);
const char* nfc_guess_protocol(NfcProtocol protocol);
@ -9,3 +13,7 @@ const char* nfc_guess_protocol(NfcProtocol protocol);
const char* nfc_mf_ul_type(MfUltralightType type, bool full_name);
const char* nfc_mf_classic_type(MfClassicType type);
#ifdef __cplusplus
}
#endif

View File

@ -2,6 +2,10 @@
#include "nfc_device.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct NfcWorker NfcWorker;
typedef enum {
@ -97,4 +101,8 @@ void nfc_worker_start(
void nfc_worker_stop(NfcWorker* nfc_worker);
void nfc_worker_nfcv_unlock(NfcWorker* nfc_worker);
void nfc_worker_nfcv_emulate(NfcWorker* nfc_worker);
void nfc_worker_nfcv_sniff(NfcWorker* nfc_worker);
void nfc_worker_nfcv_sniff(NfcWorker* nfc_worker);
#ifdef __cplusplus
}
#endif

View File

@ -4,6 +4,10 @@
#include "../nfc_worker.h"
#include "../nfc_device.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
NfcSupportedCardTypePlantain,
NfcSupportedCardTypeTroika,
@ -37,3 +41,7 @@ bool nfc_supported_card_verify_and_parse(NfcDeviceData* dev_data);
// support the card. This is needed for DESFire card parsers which can't
// provide keys, and only use NfcSupportedCard->parse.
bool stub_parser_verify_read(NfcWorker* nfc_worker, FuriHalNfcTxRxContext* tx_rx);
#ifdef __cplusplus
}
#endif

View File

@ -3,6 +3,10 @@
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
uint32_t odd;
uint32_t even;
@ -35,3 +39,7 @@ void crypto1_encrypt(
uint16_t plain_data_bits,
uint8_t* encrypted_data,
uint8_t* encrypted_parity);
#ifdef __cplusplus
}
#endif

View File

@ -4,6 +4,10 @@
#include "crypto1.h"
#ifdef __cplusplus
extern "C" {
#endif
#define MF_CLASSIC_BLOCK_SIZE (16)
#define MF_CLASSIC_TOTAL_BLOCKS_MAX (256)
#define MF_MINI_TOTAL_SECTORS_NUM (5)
@ -241,3 +245,7 @@ bool mf_classic_write_sector(
MfClassicData* dest_data,
MfClassicData* src_data,
uint8_t sec_num);
#ifdef __cplusplus
}
#endif

View File

@ -5,6 +5,10 @@
#include <furi_hal_nfc.h>
#ifdef __cplusplus
extern "C" {
#endif
#define MF_DF_GET_VERSION (0x60)
#define MF_DF_GET_FREE_MEMORY (0x6E)
#define MF_DF_GET_KEY_SETTINGS (0x45)
@ -169,3 +173,7 @@ uint16_t mf_df_prepare_read_records(uint8_t* dest, uint8_t file_id, uint32_t off
bool mf_df_parse_read_data_response(uint8_t* buf, uint16_t len, MifareDesfireFile* out);
bool mf_df_read_card(FuriHalNfcTxRxContext* tx_rx, MifareDesfireData* data);
#ifdef __cplusplus
}
#endif

View File

@ -2,6 +2,10 @@
#include <furi_hal_nfc.h>
#ifdef __cplusplus
extern "C" {
#endif
// Largest tag is NTAG I2C Plus 2K, both data sectors plus SRAM
#define MF_UL_MAX_DUMP_SIZE ((238 + 256 + 16) * 4)
@ -259,3 +263,7 @@ uint32_t mf_ul_pwdgen_amiibo(FuriHalNfcDevData* data);
uint32_t mf_ul_pwdgen_xiaomi(FuriHalNfcDevData* data);
bool mf_ul_is_full_capture(MfUltralightData* data);
#ifdef __cplusplus
}
#endif

View File

@ -18,6 +18,7 @@ class FlipperAppType(Enum):
SETTINGS = "Settings"
STARTUP = "StartupHook"
EXTERNAL = "External"
MENUEXTERNAL = "MenuExternal"
METAPACKAGE = "Package"
PLUGIN = "Plugin"
@ -213,7 +214,7 @@ class AppBuildset:
appmgr: AppManager,
appnames: List[str],
hw_target: str,
message_writer: Callable = None,
message_writer: Callable | None = None,
):
self.appmgr = appmgr
self.appnames = set(appnames)
@ -367,6 +368,11 @@ class ApplicationsCGenerator:
),
}
APP_EXTERNAL_TYPE = (
"FlipperExternalApplication",
"FLIPPER_EXTERNAL_APPS",
)
def __init__(self, buildset: AppBuildset, autorun_app: str = ""):
self.buildset = buildset
self.autorun = autorun_app
@ -387,6 +393,17 @@ class ApplicationsCGenerator:
.icon = {f"&{app.icon}" if app.icon else "NULL"},
.flags = {'|'.join(f"FlipperInternalApplicationFlag{flag}" for flag in app.flags)} }}"""
def get_external_app_descr(self, app: FlipperApplication):
app_path = "/ext/apps"
if app.fap_category:
app_path += f"/{app.fap_category}"
app_path += f"/{app.appid}.fap"
return f"""
{{
.name = "{app.name}",
.icon = {f"&{app.icon}" if app.icon else "NULL"},
.path = "{app_path}" }}"""
def generate(self):
contents = [
'#include "applications.h"',
@ -418,4 +435,11 @@ class ApplicationsCGenerator:
]
)
entry_type, entry_block = self.APP_EXTERNAL_TYPE
external_apps = self.buildset.get_apps_of_type(FlipperAppType.MENUEXTERNAL)
contents.append(f"const {entry_type} {entry_block}[] = {{")
contents.append(",\n".join(map(self.get_external_app_descr, external_apps)))
contents.append("};")
contents.append(f"const size_t {entry_block}_COUNT = COUNT_OF({entry_block});")
return "\n".join(contents)

View File

@ -423,7 +423,10 @@ def AddAppLaunchTarget(env, appname, launch_target_name):
host_app = env["APPMGR"].get(artifacts_app_to_run.app.requires[0])
if host_app:
if host_app.apptype == FlipperAppType.EXTERNAL:
if host_app.apptype in [
FlipperAppType.EXTERNAL,
FlipperAppType.MENUEXTERNAL,
]:
_add_host_app_to_targets(host_app)
else:
# host app is a built-in app

View File

@ -262,6 +262,7 @@ apps_artifacts = appenv["EXT_APPS"]
apps_to_build_as_faps = [
FlipperAppType.PLUGIN,
FlipperAppType.EXTERNAL,
FlipperAppType.MENUEXTERNAL,
]
known_extapps = [

View File

@ -67,6 +67,7 @@ class FlipperExtAppBuildArtifacts:
apps_to_build_as_faps = [
FlipperAppType.PLUGIN,
FlipperAppType.EXTERNAL,
FlipperAppType.MENUEXTERNAL,
FlipperAppType.DEBUG,
]