-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USB Mass Storage emulation (DRAFT) #1060
Conversation
Unfortunately, this is exactly the case, SD cards are very slow when connected via SPI, and the maximum theoretical speed is around 500 kbps. That is why we have abandoned the idea of mass storage emulation. |
There are couple things that can improve speed:
|
Maybe it can be usable for tiny stuff like one file linux https://github.com/zhovner/OneFileLinux |
+1 This would be amazing... I really hope this will get implemented |
The best would be to use Ventoy (https://www.ventoy.net) on it... but don't absolutely know if it's possible... (i'm just a user..) |
For booting a full ISO it's too slow, but maybe could be just enough to boot rEFInd when your bootloader is broken. Also maybe small payloads 🤔 |
I would say even if it's slow it can be useful. Would be also nice if the data flipper collects could be accessed - that's typically small but might be useful to view from the PC. |
Just as a potential use case for even very slow mass storage emulation: I stumbled across this PR when looking to see if the Flipper Zero might be able to do one of the things that I want, which is to scan an RFID card and present its ID as a text file over USB. |
Closing, subsumed by flipperdevices/flipperzero-good-faps#1 |
What's new
I created this hoping that I would be able to put a bunch of bootable ISOs on a microSD card, then emulate and boot off of them using my Flipper Zero. It turns out that it's WAY too slow for this to be usable (120~180kBps in my testing), but probably still fast enough for some uses of "Twin Duck" mode requested in #1040. Presenting this as a draft PR to get people's thoughts on integrating it with BadUSB.
Open questions:
applications/mass_storage/helpers/
instead oftargets/f7/furi_hal/
like the other USB modes. Should it be moved there? SCSI code, too?usb_device_descriptor
and set ofFuriHalUsbInterface
functions that delegate to existing unmodified HID and Mass Storage functions, or it might be more involved. Haven't attempted this yet.If someone is interested in taking this code, polishing it up, and integrating it with BadUSB -- or just using it as a starting point for their own independent implementation -- I would be thrilled. My personal use case didn't pan out, and I'm not likely to need "Twin Duck" myself, but it would be a shame to throw this out since it could be useful to others, and given the trial, error, blood, sweat, and tears it took to get to this point.
Here I am booting Debian off of my Flipper. GRUB took several minutes to load. :)
Verification
mass_storage/
dir on SD card and place disk images in it.Checklist (For Reviewer)