gsi_util: adding dump subcommand

'dump' command can dump information from given image, which could
be a image file, folder or device by adb.

Use $./gsi_util.py dump --help for the detail.

The patch also includes a "dump" framework, to implement some
dumpers to dump information. This patch also includes PropDumper to
dump information from property files, and XmlDumper to dump
information from XML files.

There is an initial dump info list in dump_info_list.py.
Use subcommand 'list_dump' could output the list.

Usually using Dumper is enough to dump information. dump.py is an
example to use Dumper.

Bug: 70253764
Test: dump from different mounter
Change-Id: I7c05f8f24d44d3c7429f2c428963f64191f49a53
This commit is contained in:
SzuWei Lin
2017-12-26 17:49:20 +08:00
parent e3658bd0c1
commit 18d5e919fe
8 changed files with 388 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ class GsiUtil(object):
# Adds gsi_util COMMAND here.
# TODO(bowgotsai): auto collect from gsi_util/commands/*.py
_COMMANDS = ['flash_gsi', 'pull', 'hello']
_COMMANDS = ['flash_gsi', 'pull', 'dump', 'hello']
_LOGGING_FORMAT = '%(message)s'
_LOGGING_LEVEL = logging.WARNING