gsi_util: adding pull subcommand
'pull' command can pull a file from an image file, folder or adb. The patch includes a "mounter" framework to implement different source of the system/vendor image. And also includes several "mounter" implementations. CompositeMounter integrates all possible mounter implementations. Usually just using CompositeMounter is enough. With CompositeMounter, you could access files in different target with an unique interface, such files in an image file, a folder or a device with an unique interface. pull.py is an basic example to use CompositeMounter. Here are some example to use 'pull' command: $ ./gsi_util.py pull --system adb:AB0123456789 /system/manifest.xml $ ./gsi_util.py pull --vendor adb /vendor/compatibility_matrix.xml $ ./gsi_util.py pull --system system.img /system/build.prop $ ./gsi_util.py pull --system my/out/folder/system /system/build.prop As current implementation, accessing files in a the image file requires root permission. gsi_util will need user to input the password for sudo. For the detail usage, reference: $ ./gsi_util.py pull --help Bug: 71029338 Test: pull /system/build.prop from different targets Change-Id: Iaeb6352c14ebc24860ed79fc30edd314e225aef9
This commit is contained in:
@@ -28,7 +28,7 @@ class GsiUtil(object):
|
||||
|
||||
# Adds gsi_util COMMAND here.
|
||||
# TODO(bowgotsai): auto collect from gsi_util/commands/*.py
|
||||
_COMMANDS = ['flash_gsi', 'hello']
|
||||
_COMMANDS = ['flash_gsi', 'pull', 'hello']
|
||||
|
||||
_LOGGING_FORMAT = '%(message)s'
|
||||
_LOGGING_LEVEL = logging.WARNING
|
||||
|
||||
Reference in New Issue
Block a user