summaryrefslogtreecommitdiffstats
path: root/updater/include/private (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-03-08Address the warnings in recovery codeTianjie Xu1-1/+1
The following warnngs generate when compile with WITH_TIDY=1 .../bootable/recovery/applypatch/imgdiff.cpp:968:7: warning: 'src_ranges' used after it was moved [bugprone-use-after-move] src_ranges.Clear(); ^ .../bootable/recovery/applypatch/imgdiff.cpp:966:27: note: move occurred here split_src_ranges->push_back(std::move(src_ranges)); The logic itself seems correct since the class is meant to be cleared after move. I feel the std::move in 966 is actually useful to call the move constructor in RangeSet. So I just modify L968 to suppress the warning. Less important ones: bootable/recovery/applypatch/applypatch_modes.cpp:79:34: warning: passing result of std::move() as a const reference argument; no move will actually happen [performance-move-const-arg] bootable/recovery/applypatch/imgdiff.cpp:1038:30: warning: passing result of std::move() as a const reference argument; no move will actually happen [performance-move-const-arg] bootable/recovery/applypatch/imgdiff.cpp:1054:48: warning: passing result of std::move() as a const reference argument; no move will actually happen [performance-move-const-arg] bootable/recovery/updater/include/private/commands.h:310:16: warning: std::move of the variable 'patch' of the trivially-copyable type 'PatchInfo' has no effect; remove std::move() [performance-move-const-arg] bootable/recovery/updater/install.cpp:663:43: warning: passing result of std::move() as a const reference argument; no move will actually happen [performance-move-const-arg] Bug: 150955971 Test: build Change-Id: Ieb75f0229c47d470d4f5ac93fab39c5698d3f914
2019-01-14updater: add functions to modify dynamic partition metadataYifan Hong1-0/+21
Test: sideload full OTA on cuttlefish Test: sideload incremental OTA on cuttlefish (that grows system, shrinks vendor, and move vendor to group foo) Test: verify that /cache/recovery/cc46ebfd04058569d0c6c1431c6af6c1328458e4 exists (sha1sum of "system") Bug: 111801737 Change-Id: Ibdf6565bc1b60f3665c01739b4c95a85f0261ae5
2018-08-17updater: Add TransferList class.Tao Bao1-0/+67
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
2018-08-16updater: Add SourceInfo::{ReadAll,DumpBuffer,Overlaps}.Tao Bao1-0/+26
Bug: 112151972 Test: Run recovery_unit_test on marlin. Change-Id: Ica2a7b3c768f5d8ca5d591a9560bca9f8ed847c5
2018-08-14Add the hash_tree_info class in CommandTianjie Xu1-0/+52
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
2018-08-06Add an updater function to compute hash treeTianjie Xu1-0/+5
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
2018-07-07updater: Add ABORT command.Tao Bao1-0/+12
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
2018-06-25updater: Add Command parsing codes.Tao Bao1-6/+284
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
2018-05-26updater: Add Commmand class to manage BBOTA commands.Tao Bao1-0/+35
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