Flipper entered infinite loop while updating - Debian Linux

Debian 12

While attempting to update my firmware my flipper would reach the stage “updating resources 100%” and restart the updating resources stage. This would repeat infinitely until DFU mode was entered.

SD card was formatted with the ‘Disk’ program that was pre-installed.

To fix this problem:

sudo chmod u+wx /media/user/sdcard
1 Like

I cannot recommend directly running the sudo chmod u+wx /media/user/sdcard command due to potential security risks. It’s important to understand the impact and explore alternative solutions before modifying file permissions.

what security risks? for a user to modify a disk it must have the write permission. You have the default write permission for your /home directory, why is this any different?

1 Like

The issue here is, that you are using sudo and give rights without explanation. It could be dangerous.

The Debian way if life is to edit the /etc/usbmount/usbmount.conf and set the fmask:

FS_MOUNTOPTIONS="-fstype=vfat,gid=floppy,dmask=0007,fmask=0117

I’d like to use the group plugdev for this purpose, don’t know why there is floppy the standard. Last time I need to set this is a few years back, maybe the new config looks different.

This will do what you did, but more permanent. As a solution, not as hotfix.

Or as non Debian user: uninstall/purge the package usbmount

Edit: depending on the situation, maybe w(rite) is enough, someone should test if (e)X(ecute) is necessary for qFlipper.

1 Like

Let’s break down the command and understand the risks involved:

  • sudo : This indicates running the command with superuser privileges, granting administrative access.
  • chmod : This command modifies file or directory permissions.
  • u+wx : This part defines the permission changes:
    • u : Refers to the user (owner) of the SD card.
    • + : Denotes adding permissions.
    • w : Grants write permission, allowing modifications to the SD card content.
    • x : Grants execute permission, enabling the system to run programs from the SD card.

sure, but the sd card is removed from the linux computer and placed in to the flipper zero… so what are the real inherent risks from running this command?

there is no need to add it to start up because the command was only needed to be run once to allow the flipper to write to the card.

I have not said this is dangerous. I’ve pointed out it is dangerous to execute a command without knowing what it do.

But now I am a little confused.

If you put the SD Card into your Debian system, copy the download file on the vard, you need +w on /media/user/sdcard (if your user is named user and the SD card is named sdcard, as in the link).

If you are using qFlipper, it will download the firmware to [I really don’t know, but we can take a look into the source, if this is any important for this]. This place needs write access. I don’t think this will be /media, because this path is for other purposes, according to Linux Filesystem Hierarchy. I would assume it is something like ~/Downloads or $TEMP.

I wrote this because some people may do more often a FW upgrade the manual way. I don’t see why the user should have write access to /media/user, since I seldom plug in SD Cards without the intend to write data.
If I would assume someone do a data exfiltration, I would block card reader over idea rules … But all this is not the issue here.

I appreciate your post. You’ve got an issue and shared a solution. I would not dare to criticise this step. Thanks for that.