ubidump icon indicating copy to clipboard operation
ubidump copied to clipboard

Add dump to file option

Open MatthewTingum opened this issue 2 years ago • 2 comments

I can enumerate files in a ubi archive with: ubidump -l bar.ubi

Then I can try to extract a binary file with: ubidump -c foo.bin bar.ubi > foo.bin

But I end up with three lines of text preceding the binary. These lines are output of the program itself. The lines have to be manually stripped out. Perhaps an -o option for outputting to a file?

Over-scoping a little bit, but I'd like to see an "extract all" option too.

Mounting doesn't work great on WSL 1 (If one were to get at the contents that way). binwalk doesn't seem to extract the ubi format IIRC. This could be a great addition to binwalk with a little work.

I'll be glad to make a pull request if there's an active maintainer.

MatthewTingum avatar Mar 22 '22 05:03 MatthewTingum

Ah, I see this option now:

  --savedir DIRECTORY, -s DIRECTORY
                        save files in all volumes to the specified directory

Maybe a simple README update is in order.

MatthewTingum avatar Mar 23 '22 02:03 MatthewTingum

I have opened a pull request that updates the README.

Still, extracting a single file is not particularly convenient. Consider making the cat option only output file contents to stdout. No informational text in the stdout. Only errors in stderr. Just a thought.

MatthewTingum avatar Mar 23 '22 05:03 MatthewTingum