Skip to content
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

Update README to show all options #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 47 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,59 @@ with the second modprobe line.
Usage
=====

View the contents of the `/etc/passwd` file in the filesystem image `image.ubi`:

python ubidump.py -c /etc/passwd image.ubi
```
usage: ubidump.py [-h] [--savedir DIRECTORY] [--preserve] [--cat FILE]
[--listfiles] [--dumptree] [--verbose] [--debug]
[--encoding ENCODING] [--masteroffset MASTEROFFSET]
[--root ROOT] [--rawdump] [--volume VOLUME]
[--hexdump LEB:OFF:N] [--nodedump LEB:OFF]
FILES [FILES ...]

UBIFS dumper.

positional arguments:
FILES list of ubi images to use

optional arguments:
-h, --help show this help message and exit
--savedir DIRECTORY, -s DIRECTORY
save files in all volumes to the specified directory
--preserve, -p preserve permissions and timestamps
--cat FILE, -c FILE extract a single file to stdout
--listfiles, -l list directory contents
--dumptree, -d dump the filesystem b-tree contents
--verbose, -v print extra info
--debug abort on exceptions
--encoding ENCODING, -e ENCODING
filename encoding, default=utf-8
--masteroffset MASTEROFFSET, -m MASTEROFFSET
Which master node to use.
--root ROOT, -R ROOT Which Root node to use (hexlnum:hexoffset).
--rawdump Raw hexdump of entire volume.
--volume VOLUME which volume to hexdump
--hexdump LEB:OFF:N hexdump part of a volume/leb[/ofs[/size]]
--nodedump LEB:OFF dump specific node at volume/leb[/ofs]
```

Usage Examples
--------------

Print the contents of the `/etc/passwd` file in the filesystem image `image.ubi` to `STDOUT`:

python ubidump.py -c /etc/passwd image.ubi

Extract contents of the filesystem image `image.ubi` to directory `/tmp/foo`:

python ubidump.py -s /tmp/foo

List the files in all the volumes in `image.ubi`:

python ubidump.py -l image.ubi
python ubidump.py -l image.ubi

View the contents of b-tree database from the volumes in `image.ubi`:

python ubidump.py -d image.ubi
python ubidump.py -d image.ubi



Install
Expand Down