[FL-3902] NFC app now can launch MFKey32 (#4117)

* feat: app chaining

* add `launch_current_app_after_deferred`, remove `get_referring_application`

* fix naming

* new api

* fix f18

* Added new function which enqueues external app from nfc app

* Added path to MFKey32 app

* Button "Crack nonces in MFKey32" added to ReadMenu scene

* SaveConfirm scene adjusted to move to different scenes depending on state

* SaveSuccess scene now moves to different scenes depending on SaveConfirm scene state

* MfKeyComplete scene shows different text when MFKey.fap present on the device

* Now MfKeyClassic scene can run external app

* fix deferred launches after errors

Co-authored-by: Anna Antonenko <portasynthinca3@gmail.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: hedger <hedger@nanode.su>
This commit is contained in:
RebornedBrain
2025-04-07 00:49:22 +03:00
committed by GitHub
parent 6b5d006690
commit f07048d1b0
6 changed files with 118 additions and 20 deletions

View File

@@ -14,7 +14,8 @@ enum {
SubmenuIndexDetectReader = SubmenuIndexCommonMax,
SubmenuIndexWrite,
SubmenuIndexUpdate,
SubmenuIndexDictAttack
SubmenuIndexDictAttack,
SubmenuIndexCrackNonces,
};
static void nfc_scene_info_on_enter_mf_classic(NfcApp* instance) {
@@ -128,6 +129,13 @@ static void nfc_scene_read_menu_on_enter_mf_classic(NfcApp* instance) {
SubmenuIndexDictAttack,
nfc_protocol_support_common_submenu_callback,
instance);
submenu_add_item(
submenu,
"Crack nonces in MFKey32",
SubmenuIndexCrackNonces,
nfc_protocol_support_common_submenu_callback,
instance);
}
}
@@ -193,6 +201,11 @@ static bool nfc_scene_read_menu_on_event_mf_classic(NfcApp* instance, SceneManag
if(event.type == SceneManagerEventTypeCustom) {
if(event.event == SubmenuIndexDetectReader) {
scene_manager_set_scene_state(
instance->scene_manager,
NfcSceneSaveConfirm,
NfcSceneSaveConfirmStateDetectReader);
scene_manager_next_scene(instance->scene_manager, NfcSceneSaveConfirm);
dolphin_deed(DolphinDeedNfcDetectReader);
consumed = true;
@@ -205,6 +218,11 @@ static bool nfc_scene_read_menu_on_event_mf_classic(NfcApp* instance, SceneManag
} else if(event.event == SubmenuIndexCommonEdit) {
scene_manager_next_scene(instance->scene_manager, NfcSceneSetUid);
consumed = true;
} else if(event.event == SubmenuIndexCrackNonces) {
scene_manager_set_scene_state(
instance->scene_manager, NfcSceneSaveConfirm, NfcSceneSaveConfirmStateCrackNonces);
scene_manager_next_scene(instance->scene_manager, NfcSceneSaveConfirm);
consumed = true;
}
}