gsi_util: adding flash_gsi subcommand

This change implements the flash_gsi subcommand:
  1. Erase userdata/cache partition
  2. Erase metadata partition (optional)
  3. Flash generic system image
  4. Disable Android Verified Boot (optional)
  5. Reboot the device

Bug: 70253882
Test: make gsi_util
Test: gsi_util flash_gsi
Test: gsi_util --debug flash_gsi --image system.img
Change-Id: I552c04aaf227c6fca2e5c3caab26d713e2f6f5d0
This commit is contained in:
Bowgo Tsai
2017-12-18 14:59:59 +08:00
parent ac3ee581a8
commit b510ae3a33
4 changed files with 112 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 = ['hello']
_COMMANDS = ['flash_gsi', 'hello']
_LOGGING_FORMAT = '%(message)s'
_LOGGING_LEVEL = logging.WARNING