Commit Graph

2 Commits

Author SHA1 Message Date
Bowgo Tsai
b510ae3a33 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
2018-01-03 12:44:10 +08:00
Bowgo Tsai
73fec9375d gsi_util: adding subcommand framework
With this CL, new command can be easily added:
  1. Add a new file: gsi/gsi_util/gsi_util/commands/hello.py
     And implements a function to register parsers into gsi_util's main parser.

     def setup_command_args(subparsers)

  2. In gsi/gsi_util/gsi_util.py, add the new command into GsiUtil():
     _COMMANDS = ['hello']

Bug: 70588453
Test: make gsi_util
Test: gsi_util --help
Test: gsi_util hello --foo
Test: gsi_util --debug hello --bar

Change-Id: I54fa6d1dea5afed724d9ac4a99f88bf78da82732
2017-12-28 17:11:40 +08:00