Unable to use ampy to write file to the board's filesystem

I want to use the ampy tool to write a script to the OPenMV Camera board’s filesystem, to save it in the main.py so that the script runs when the board is powered on. I have installed ampy tool and tested it, its working well. However, when testing reading from and writing to the board, it throws an error. I am working on Ubuntu 20.04.
When I run this command,

sudo ampy --port /serial/dev/ttyACM0 get boot.py

I will get the following error

Traceback (most recent call last):
File “/usr/local/bin/ampy”, line 8, in
sys.exit(cli())
File “/usr/lib/python3/dist-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/lib/python3/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/lib/python3/dist-packages/click/core.py”, line 1134, in invoke
Command.invoke(self, ctx)
File “/usr/lib/python3/dist-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib/python3/dist-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.8/dist-packages/ampy/cli.py”, line 99, in cli
_board = pyboard.Pyboard(port, baudrate=baud, rawdelay=delay)
File “/usr/local/lib/python3.8/dist-packages/ampy/pyboard.py”, line 147, in init
raise PyboardError('failed to access ’ + device)
ampy.pyboard.PyboardError: failed to access /serial/dev/ttyACM0

I maybe doing something obviously wrong since I am new to Ubuntu, I will appreciate any help on how to get this working. I simply just want to be able to read from and write to the board using the ampy tool.

You can’t use the serial port if the IDE is connected, but even then that tool might not work with our firmware.

Thanks for your response.
Yeah, the IDE was not connected during the testing.
Okay I see, so which tool will work well with your firmware?
Or since what I want to do is pretty clear, what other way(s) can I simply do it that is supported by your firmware.

Not sure why it’s not working with our firmware it could be using something that we disabled. There’s no other tool to do that, but you can just use the storage device to copy files.

EDIT: mpremote might work.

Thanks.
I was checking on the mpremote tool, I do not seems to see proper documentation on how to use it. Maybe not a commonly used tool? If you have any link to any proper documentation on how to use it, I will appreciate.

It’s the official tool for connect to MicroPython boards from the cli and serial port, there must be a help option (mpremote help) and I see some options documented here: mpremote · PyPI