summaryrefslogtreecommitdiffstats
path: root/updater/blockimg.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* resolve merge conflicts of 7b6027dde4 to master.Tao Bao2016-02-041-10/+9
|\ | | | | | | Change-Id: I1d5232f61744bb18ca5de3a16a340bc3afd110bb
| * Switch from mincrypt to BoringSSL in applypatch and updater.Sen Jiang2016-02-041-10/+9
| | | | | | | | | | Bug: 18790686 Change-Id: I7d2136fb39b2266f5ae5be24819c617b08a6c21e
| * updater: Add a function to check first blockTianjie Xu2016-01-071-0/+55
| | | | | | | | | | | | | | | | | | | | Add and register a function to check if the device has been remounted since last update during incremental OTA. This function reads block 0 and executes before partition recovery for version >= 4. Bug: 21124327 Change-Id: I8b915b9f1d4736b3609daa9d16bd123225be357f (cherry picked from commit 30bf4765593e639966df9f460df22c3fe912e7bf)
| * updater: Output msg when recovery is calledTianjie Xu2015-12-111-1/+4
| | | | | | | | | | | | | | | | Output messages in log when recovery is attempted or succeeded during incremental OTA update. Change-Id: I4033df7ae3aaecbc61921d5337eda26f79164fda (cherry picked from commit b686ba211443490111729ba9d82eb0c0b305e185)
* | Merge "IO fault injection for OTA packages"Jed Estep2016-01-091-6/+7
|\ \
| * | IO fault injection for OTA packagesJed Estep2016-01-061-6/+7
| | | | | | | | | | | | | | | Bug: 25951086 Change-Id: I31c74c735eb7a975b7f41fe2b2eff042e5699c0c
* | | updater: Add a function to check first blockTianjie Xu2015-12-181-0/+55
|/ / | | | | | | | | | | | | | | | | Add and register a function to check if the device has been remounted since last update during incremental OTA. This function reads block 0 and executes before partition recovery for version >= 4. Bug: 21124327 Change-Id: I8b915b9f1d4736b3609daa9d16bd123225be357f
* | Merge "updater: Output msg when recovery is called"Tianjie Xu2015-12-111-1/+4
|\ \ | |/ |/|
| * updater: Output msg when recovery is calledTianjie Xu2015-12-101-1/+4
| | | | | | | | | | | | | | Output messages in log when recovery is attempted or succeeded during incremental OTA update. Change-Id: I4033df7ae3aaecbc61921d5337eda26f79164fda
* | updater: Replace strtok() with android::base::Split().Tao Bao2015-12-071-133/+144
|/ | | | Change-Id: I36346fa199a3261da1ae1bc310b3557fe1716d96
* Track rename from base/ to android-base/.Elliott Hughes2015-12-051-2/+2
| | | | Change-Id: I354a8c424d340a9abe21fd716a4ee0d3b177d86f
* updater: Bump up the BBOTA version to 4.Tao Bao2015-10-231-1/+1
| | | | | | | | | To accommodate new changes in N release, such as error correction [1] and other potential changes to the updater. [1]: commit 0a7b47397db3648afe6f3aeb2abb175934c2cbca Change-Id: I4dd44417d07dd0a31729894628635a0aa1659008
* Error correction: Use libfec in blockimg.cpp for recoverySami Tolvanen2015-10-191-0/+76
| | | | | | | | | | | | Add block_image_recover function to rewrite corrupted blocks on the partition. This can be attempted if block_image_verify fails. Note that we cannot use libfec during block_image_update as it may overwrite blocks required for error correction. A separate recovery pass in case the image is corrupted is the only viable option. Bug: 21893453 Change-Id: I6ff25648fff68d5f50b41a601c95c509d1cc5bce
* updater: Skip empty lines in the transfer list file.Tao Bao2015-09-261-0/+4
| | | | | | | | | We have the last line being empty as a result of android::base::Split("a\nb\n"), which leads to "missing command" warnings in the update. Just skip all the empty lines. Bug: 24373789 Change-Id: I5827e4600bd5cf0418d95477e4592fec47bbd3a9
* updater: Use android::base::ParseInt() to parse integers.Tao Bao2015-09-241-40/+25
| | | | Change-Id: Ic769eafc8d9535b1d517d3dcbd398c3fd65cddd9
* updater: Manage buffers with std::vector.Tao Bao2015-09-101-228/+168
| | | | Change-Id: Ide489e18dd8daf161b612f65b28921b61cdd8d8d
* updater: Replace the pointers in LoadSrcTgtVersion[1-3]() parameter.Tao Bao2015-09-081-29/+26
| | | | | | And inline the call to LoadSrcTgtVersion1() into SaveStash(). Change-Id: Ibf4ef2bfa2cc62df59c4e8de99fd7d8039e71ecf
* updater: Clean up C codes.Tao Bao2015-09-011-602/+429
| | | | | | | Replace C-string with std::string, pointers with references, and variable-size arrays in struct with std::vector. Change-Id: I57f361a0e58286cbcd113e9be225981da56721b2
* updater: Remove the unused isunresumable in SaveStash().Tao Bao2015-08-261-3/+3
| | | | Change-Id: I6a8d9bea4c1cd8ea7b534682061b90e893b227a2
* GOOGLEGMS-749 Fix integer overflow while applying block based OTA packageShrinivas Sahukar2015-08-221-46/+48
| | | | | | | There is an integer overflow when the size of system goes beyond the signed int limits. Hence changing pos to size_t. Change-Id: I6e5e1b2f0e72030b30a6df09a01642f4c82abc79
* updater: Clean up char* with std::string.Tao Bao2015-08-061-261/+141
| | | | | | | So we can remove a few free()s. And also replace a few pointers with references. Change-Id: I4b6332216704f4f9ea4a044b8d4bb7aa42a7ef26
* udpater: Call fsync() after rename().Tao Bao2015-08-041-0/+20
| | | | | | | We need to ensure the renamed filename reaches the underlying storage. Bug: 22840552 Change-Id: Ide2e753a2038691d472b6ee173cbf68ac998a084
* updater: Hoist fsync() to outer loop.Tao Bao2015-07-271-6/+5
| | | | | | | | | | Currently the fsync() inside write_all() may be called multiple times when performing a command. Move that to the outer loop and call it only after completing the command. Also remove the O_SYNC flag when writing a stash. Change-Id: I71e51d76051a2f7f504eef1aa585d2cb7a000d80
* recovery: Switch applypatch/ and updater/ to cpp.Tao Bao2015-07-141-0/+1991
Mostly trivial changes to make cpp compiler happy. Change-Id: I69bd1d96fcccf506007f6144faf37e11cfba1270