summaryrefslogtreecommitdiffstats
path: root/updater/commands.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* updater: Add TransferList class.Tao Bao2018-08-171-0/+51
| | | | | | | | | This would be the top-level class that represents and holds the info parsed from a transfer list file. Bug: 112151972 Test: Run recovery_unit_test and recovery_component_test on marlin. Change-Id: I83b54df9d1411542eeeb8ef4a2db167e97f989c3
* updater: Add SourceInfo::{ReadAll,DumpBuffer,Overlaps}.Tao Bao2018-08-161-0/+70
| | | | | | Bug: 112151972 Test: Run recovery_unit_test on marlin. Change-Id: Ica2a7b3c768f5d8ca5d591a9560bca9f8ed847c5
* Add the hash_tree_info class in CommandTianjie Xu2018-08-141-1/+41
| | | | | | | | | | Add hash_tree_info to represent the hash tree computation arguments in the transfer commands 'compute_hash_tree'. Also add its parsing code in the Command class. Bug: 25170618 Test: unit tests pass Change-Id: Ie8607968377968e8fb3e58d1af0b8ca315e145be
* Add an updater function to compute hash treeTianjie Xu2018-08-061-0/+3
| | | | | | | | | | | | | | | | The new command is part of the transfer.list and allows us to compute the hash tree on non-ab devices. The required arguments for the hash_tree computation are: hash_tree_ranges source_ranges hash_algorithm salt_hex root_hash Bug: 25170618 Test: unit tests pass; run simulator with compute_hash_tree Change-Id: I8ff0d582cc8adabb8a060db7845f38b35b28e62c
* updater: Add ABORT command.Tao Bao2018-07-071-1/+16
| | | | | | | | | | | This will be used for testing purpose only, replacing the previously used "fail", to intentionally abort an update. As we're separating the logic between commands parsing and execution, "abort" needs to be considered as a valid command during the parsing. Test: recovery_unit_test and recovery_component_test on marlin. Change-Id: I47c41c423e62c41cc8515fd92f3c5959be08da02
* updater: Check the number of args in Command::Parse.Tao Bao2018-06-251-9/+16
| | | | | | | | | Additionally checks for excess args when parsing ERASE, FREE, NEW, STASH and ZERO. Note that the check for MOVE, BSDIFF, IMGDIFF has been covered in Command::ParseTargetInfoAndSourceInfo. Test: Run recovery_unit_test on marlin. Change-Id: Ic8bc9b7a8dcf98f1f8db2e259607564508726857
* updater: Add Command parsing codes.Tao Bao2018-06-251-11/+236
| | | | | | | | The added codes are not used in the updater yet. The switch will happen in subsequent CLs. Test: Run recovery_unit_test and recovery_component_test on marlin. Change-Id: I1ae8a233280f02c2171b43ef028bdccdacb39c59
* updater: Add Commmand class to manage BBOTA commands.Tao Bao2018-05-261-0/+43
Move the commands map parsing out of PerformBlockImageUpdate(), as this can be done more easily by the caller. The goal (not done in this CL) is to decouple command parsing logic from the performers. This allows (a) focusing on the command logic in the performer; and (b) extending BBOTA commands syntax separately. Test: Run recovery_unit_test and recovery_component_test. Change-Id: Ife202398a7660b152d84a3ba17b90f93d19c55f2