zacharyweiss / magspoof_flipper

Port of Samy Kamkar's MagSpoof project (http://samy.pl/magspoof/) to the Flipper Zero. Enables wireless emulation of magstripe data, primarily over GPIO, with additional experimental internal TX.
https://lab.flipper.net/apps/magspoof
MIT License
515 stars 27 forks source link

Build fails #7

Closed rhysperry111 closed 4 months ago

rhysperry111 commented 1 year ago

Trying to build this against the latest firmware release gives the following:

scons: Entering directory `/home/rhys/.ufbt/current/scripts/ufbt'
    CC  /tmp/tmptmp/magspoof_flipper/helpers/mag_helpers.c
    CC  /tmp/tmptmp/magspoof_flipper/helpers/mag_text_input.c
    CC  /tmp/tmptmp/magspoof_flipper/scenes/mag_scene_about.c
    CC  /tmp/tmptmp/magspoof_flipper/scenes/mag_scene_delete_confirm.c
    CC  /tmp/tmptmp/magspoof_flipper/scenes/mag_scene_delete_success.c
    CC  /tmp/tmptmp/magspoof_flipper/scenes/mag_scene_emulate.c
    CC  /tmp/tmptmp/magspoof_flipper/scenes/mag_scene_emulate_config.c
    CC  /tmp/tmptmp/magspoof_flipper/scenes/mag_scene_exit_confirm.c
    CC  /tmp/tmptmp/magspoof_flipper/scenes/mag_scene_file_select.c
    CC  /tmp/tmptmp/magspoof_flipper/scenes/mag_scene_input_name.c
    CC  /tmp/tmptmp/magspoof_flipper/scenes/mag_scene_input_value.c
    CC  /tmp/tmptmp/magspoof_flipper/scenes/mag_scene_save_success.c
/tmp/tmptmp/magspoof_flipper/helpers/mag_text_input.c:3:10: fatal error: assets_icons.h: No such file or directory
    3 | #include <assets_icons.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
scons: *** [/home/rhys/.ufbt/build/mag/helpers/mag_text_input.o] Error 1
/tmp/tmptmp/magspoof_flipper/helpers/mag_helpers.c: In function 'tx_init_rfid':
/tmp/tmptmp/magspoof_flipper/helpers/mag_helpers.c:131:5: error: implicit declaration of function 'furi_hal_ibutton_start_drive'; did you mean 'furi_hal_ibutton_pin_write'? [-Werror=implicit-function-declaration]
  131 |     furi_hal_ibutton_start_drive();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     furi_hal_ibutton_pin_write
/tmp/tmptmp/magspoof_flipper/helpers/mag_helpers.c:132:5: error: implicit declaration of function 'furi_hal_ibutton_pin_low'; did you mean 'furi_hal_ibutton_pin_write'? [-Werror=implicit-function-declaration]
  132 |     furi_hal_ibutton_pin_low();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
      |     furi_hal_ibutton_pin_write
cc1: all warnings being treated as errors
scons: *** [/home/rhys/.ufbt/build/mag/helpers/mag_helpers.o] Error 1

Am I doing something wrong?

treyf711 commented 1 year ago

I am also getting a similar error with mag_helpers.c. On lines 131 and 132 I changed the functions to furi_hal_ibutton_pin_configure(); furi_hal_ibutton_pin_write(0);

which are compatible with the latest API version that I'm using (30.1).

It looks like the older functions were taken out, but I believe that these two are their new equivalents. Will test and report back.

adamyeager commented 6 months ago

I am getting an error with the latest versions saying it's missing random_name in toolbox.

applications_user/magspoof_flipper/scenes/mag_scene_input_name.c:1:10: fatal error: lib/toolbox/random_name.h: No such file or directory 1 | #include <lib/toolbox/random_name.h>

zacharyweiss commented 5 months ago

Hey folks! Sorry for the delay, I largely abandoned this project when work got busy. The code in my repo is indeed outdated re: API version; that said, there seem to be folks who have kept it updated it my absence, as it comes packaged with Unleashed and Momentum CFWs at the time of writing, along with some improvements. For code that will compile without edits, I would encourage you to seek out their FAP srcs