aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2016-12-13 23:53:31 -0600
committerTao Bao2016-12-15 14:36:26 -0600
commit2292db819bacc74a38334dc7da543856ac14de4e (patch)
tree92da6e8d0b0d4a799a8849d99c17a10b108378f6 /bootloader_message/include
parent07d985b75b1cba2f3f79216c83aaa0f927d6683d (diff)
downloadplatform-bootable-recovery-2292db819bacc74a38334dc7da543856ac14de4e.tar.gz
platform-bootable-recovery-2292db819bacc74a38334dc7da543856ac14de4e.tar.xz
platform-bootable-recovery-2292db819bacc74a38334dc7da543856ac14de4e.zip
Add update_bootloader_message() to fix two-step OTAs.
This is a retry of commit 7e31f421a514da09b90e46dbd642a5e9b16e0003. Commit bd56f1590c967205dc45eb2ec298aa8d2aacb740 switches to calling write_bootloader_message(<options>) in get_args(), which unintentionally resets the stage field thus breaks two-step OTAs. This CL adds update_bootloader_message(<options>), which only sets the command field (to "boot-recovery") and the recovery field (with the specified options). Bug: 33534933 Test: Apply a two-step package. Test: recovery_component_test passes. Change-Id: Ie0b1ed4053d2d3c97d9cb84310d616b28fcfc72e
Diffstat (limited to 'bootloader_message/include')
-rw-r--r--bootloader_message/include/bootloader_message/bootloader_message.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/bootloader_message/include/bootloader_message/bootloader_message.h b/bootloader_message/include/bootloader_message/bootloader_message.h
index ec47facf..bc5104dd 100644
--- a/bootloader_message/include/bootloader_message/bootloader_message.h
+++ b/bootloader_message/include/bootloader_message/bootloader_message.h
@@ -194,9 +194,14 @@ bool write_bootloader_message(const bootloader_message& boot, std::string* err);
194bool write_bootloader_message_to(const bootloader_message& boot, 194bool write_bootloader_message_to(const bootloader_message& boot,
195 const std::string& misc_blk_device, std::string* err); 195 const std::string& misc_blk_device, std::string* err);
196 196
197// Write bootloader message (boots into recovery with the options) to BCB. 197// Write bootloader message (boots into recovery with the options) to BCB. Will
198// set the command and recovery fields, and reset the rest.
198bool write_bootloader_message(const std::vector<std::string>& options, std::string* err); 199bool write_bootloader_message(const std::vector<std::string>& options, std::string* err);
199 200
201// Update bootloader message (boots into recovery with the options) to BCB. Will
202// only update the command and recovery fields.
203bool update_bootloader_message(const std::vector<std::string>& options, std::string* err);
204
200// Clear BCB. 205// Clear BCB.
201bool clear_bootloader_message(std::string* err); 206bool clear_bootloader_message(std::string* err);
202 207