dakhnod / fzfs Goto Github PK
View Code? Open in Web Editor NEWFlipper Zero filesystem driver
Flipper Zero filesystem driver
foul@Foulnux:/mnt/2To/home/Hack/Flipper_Zero/fzfs$ python3 -m venv venv
foul@Foulnux:/mnt/2To/home/Hack/Flipper_Zero/fzfs$ . venv/bin/activate
(venv) foul@Foulnux:/mnt/2To/home/Hack/Flipper_Zero/fzfs$ venv/bin/python3 fzfs.py /dev/ttyACM0 /mnt/2To/Tmp/
Traceback (most recent call last):
File "fzfs.py", line 6, in
import flipper_api
File "/mnt/2To/home/Hack/Flipper_Zero/fzfs/flipper_api.py", line 7, in
from flipperzero_protobuf_py.flipperzero_protobuf_compiled import application_pb2, flipper_pb2, storage_pb2
ModuleNotFoundError: No module named 'flipperzero_protobuf_py.flipperzero_protobuf_compiled'
(venv) foul@Foulnux:/mnt/2To/home/Hack/Flipper_Zero/fzfs$
folder "flipperzero_protobuf_py" empty when cloning/downloading
Trying to run this Python script on Windows results in the following:
(venv) PS C:\Users\xxx\Downloads\fzfs-main> .\fzfs.py -d COM5 -m .\flipper_sd\
Traceback (most recent call last):
File "C:\Users\xxx\Downloads\fzfs-main\fzfs.py", line 11, in <module>
import flipper_api
File "C:\Users\xxx\Downloads\fzfs-main\flipper_api.py", line 12, in <module>
from flipperzero_protobuf_py.flipper_protobuf import ProtoFlipper
File "C:\Users\xxx\Downloads\fzfs-main\flipperzero_protobuf_py\flipper_protobuf.py", line 3, in <module>
from nis import match
ModuleNotFoundError: No module named 'nis'
❯ python3 fzfs.py -a MACADDR -m /home/user/fzmount
Traceback (most recent call last):
File "/home/user/src/fzfs/fzfs.py", line 63, in <module>
main()
File "/home/user/src/fzfs/fzfs.py", line 42, in main
if not os.path.exists(args.serial_device):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen genericpath>", line 19, in exists
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
I tried the following to troubleshoot a bit
import serial
import serial.tools.list_ports
import serial_ble
bluetooth = serial_ble.BLESerial(MACADDR, '19ed82ae-ed21-4c9d-4145-228e61fe0000', '19ed82ae-ed21-4c9d-4145-228e62fe0000')
print(bluetooth)
which yielded the following
Traceback (most recent call last):
File "/home/user/src/fzfs/t.py", line 5, in <module>
print(bluetooth)
File "/home/user/.virtualenvs/fzfs/lib/python3.11/site-packages/serial/serialutil.py", line 532, in __repr__
'rtscts={p.rtscts!r}, dsrdtr={p.dsrdtr!r})'.format(
^^^^^^^
AttributeError: 'BLESerial' object has no attribute 'is_open'. Did you mean: 'isOpen'?
Using the cable with my FZ works fine.
Please let me know if there's anything I can try to help debug this.
Thought I'd drop in and say that I added an AUR package for this repo:
https://aur.archlinux.org/packages/fzfs-git
The fzfs.py
Python script has been made executable in this package, and I added a /usr/bin/fzfs
symlink, so you can simply call fzfs
:
$ fzfs
usage: fzfs [-h] [-d SERIAL_DEVICE] [-a BLE_ADDRESS] -m MOUNTPOINT
fzfs: error: the following arguments are required: -m/--mount
Hi,
Thanks for this project, it make thing easier.
Would you be interested by an other PR that lint the code and some code refactorisation ? To make things easier to maintain.
Thanks
Sorry if iam to stupid but idk where to put the codes for it if you can help me because idk what to do
Thanks for your answers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.