Commit graph

1660 commits

Author SHA1 Message Date
Sami Tolvanen
0a7b47397d Error correction: Use libfec in blockimg.cpp for recovery
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
2015-10-19 10:04:38 +01:00
Tao Bao
245b2da171 am 754ebaa9: Merge "updater: Skip empty lines in the transfer list file."
* commit '754ebaa90a3e11012e2456013e69b34a30272c4a':
  updater: Skip empty lines in the transfer list file.
2015-09-30 23:44:35 +00:00
Tao Bao
754ebaa90a Merge "updater: Skip empty lines in the transfer list file." 2015-09-30 23:29:11 +00:00
Yabin Cui
aa59a98988 am 4b66a280: Merge "minadbd: use strdup() to create argument for sideload thread."
* commit '4b66a280d314ab5aeb5027fe5b0023ae1f25ecca':
  minadbd: use strdup() to create argument for sideload thread.
2015-09-30 20:10:51 +00:00
Yabin Cui
4b66a280d3 Merge "minadbd: use strdup() to create argument for sideload thread." 2015-09-30 17:43:59 +00:00
Yabin Cui
c8a3c80603 minadbd: use strdup() to create argument for sideload thread.
So sideload thread will not use argument which is to be freed
in the main thread.

Bug: 23968770
Change-Id: I9d6dadc6c33cfbe4b5759382a80fe14cd0d54355
2015-09-29 18:09:34 -07:00
Tao Bao
6a47dffde5 updater: Skip empty lines in the transfer list file.
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
2015-09-25 17:12:28 -07:00
Tao Bao
f61eec3e2d am 2bdac629: Merge changes Ic769eafc,I63f28b3b
* commit '2bdac629f1d109dc79370edec8a31e20fbbe384c':
  updater: Use android::base::ParseInt() to parse integers.
  Suppress some compiler warnings due to signedness.
2015-09-25 18:32:55 +00:00
Tao Bao
2bdac629f1 Merge changes Ic769eafc,I63f28b3b
* changes:
  updater: Use android::base::ParseInt() to parse integers.
  Suppress some compiler warnings due to signedness.
2015-09-25 18:28:10 +00:00
Tao Bao
b15fd224ed updater: Use android::base::ParseInt() to parse integers.
Change-Id: Ic769eafc8d9535b1d517d3dcbd398c3fd65cddd9
2015-09-24 12:14:37 -07:00
Tao Bao
5701d5829d Suppress some compiler warnings due to signedness.
Change-Id: I63f28b3b4ba4185c23b972fc8f93517295b1672a
2015-09-24 11:06:58 -07:00
Yabin Cui
f7319f4dbd am 3317d501: Merge "minadbd: move from D() to VLOG()."
* commit '3317d5017963684cdbf4573d6cc6c0ff4cee0869':
  minadbd: move from D() to VLOG().
2015-09-23 23:11:11 +00:00
Yabin Cui
3317d50179 Merge "minadbd: move from D() to VLOG()." 2015-09-23 23:05:32 +00:00
Yabin Cui
7c913e5faa minadbd: move from D() to VLOG().
Change-Id: I542e2ae8f5ef18b2d6b3dbc1888b3ce1e02a7404
2015-09-23 16:04:41 -07:00
Tao Bao
cd3c8c4eac am b739a32b: Merge "recovery: Add timestamps in update logs."
* commit 'b739a32b7c32279da4d5ac55601f06bc5c81f1d5':
  recovery: Add timestamps in update logs.
2015-09-18 04:03:50 +00:00
Tao Bao
b739a32b7c Merge "recovery: Add timestamps in update logs." 2015-09-18 03:55:50 +00:00
Tao Bao
04ca426362 recovery: Add timestamps in update logs.
Fork a logger process and send over the log lines through a pipe.
Prepend a timestamp to each line for debugging purpose. Timestamps are
relative to the start of the logger.

Example lines with the change in this CL:

[  445.948393] Verifying update package...
[  446.279139] I:comment is 1738 bytes; signature 1720 bytes from end
[  449.463652] I:whole-file signature verified against RSA key 0
[  449.463704] I:verify_file returned 0

Change-Id: I139d02ed8f2e944c1618c91d5cc43282efd50b99
2015-09-17 10:57:31 -07:00
Tao Bao
f66e08a2a0 am a42a322d: Merge "updater: Manage buffers with std::vector."
* commit 'a42a322d8f6de0157625b518d12d1919f1e0dd7e':
  updater: Manage buffers with std::vector.
2015-09-16 21:01:19 +00:00
Tao Bao
a42a322d8f Merge "updater: Manage buffers with std::vector." 2015-09-16 19:12:14 +00:00
David Pursell
49a49e4f06 am ee17242f: Merge "minadbd: update service_to_fd() signature."
* commit 'ee17242f904730c759272b2576aafc59d764525b':
  minadbd: update service_to_fd() signature.
2015-09-14 18:49:41 +00:00
David Pursell
ee17242f90 Merge "minadbd: update service_to_fd() signature." 2015-09-14 18:39:37 +00:00
Tao Bao
605241984c am b83fd518: Merge "recovery: Remove redirect_stdio() when calling ShowFile()."
* commit 'b83fd518262853d42b5a73a61ec6fdfafe0f5564':
  recovery: Remove redirect_stdio() when calling ShowFile().
2015-09-12 01:15:45 +00:00
Tao Bao
b83fd51826 Merge "recovery: Remove redirect_stdio() when calling ShowFile()." 2015-09-12 01:09:49 +00:00
Tao Bao
9a7fd80d2d recovery: Remove redirect_stdio() when calling ShowFile().
When calling ScreenRecoveryUI::ShowFile(), the only thing that gets
inadequately logged is the progress bar. Replace the call to
ScreenRecoveryUI::Print() with ScreenRecoveryUI::PrintOnScreenOnly() for
the progress bar, so we can avoid calling redirect_stdio().

Change-Id: I4d7c5d5b39bebe0d5880a99d7a72cee4f0b8f325
2015-09-10 13:42:05 -07:00
Tao Bao
0cf19d9ba1 am 7a677807: Merge "updater: Fix the line breaks in ui_print commands."
* commit '7a6778078b2525c245869061366eb1f92942542a':
  updater: Fix the line breaks in ui_print commands.
2015-09-10 17:31:11 +00:00
Tao Bao
7a6778078b Merge "updater: Fix the line breaks in ui_print commands." 2015-09-10 17:23:26 +00:00
Tao Bao
1107d96746 updater: Fix the line breaks in ui_print commands.
When processing ui_print commands in the updater, it misses a line break
when printing to the recovery log.

Also clean up uiPrintf() and UIPrintFn() with std::string's.

Change-Id: Ie5dbbfbc40b024929887d3c3ccd3a334249a8c9d
2015-09-10 10:17:56 -07:00
Tao Bao
612336ddc1 updater: Manage buffers with std::vector.
Change-Id: Ide489e18dd8daf161b612f65b28921b61cdd8d8d
2015-09-09 17:44:23 -07:00
Tao Bao
50828f58ca am e520f1d4: Merge "updater: Replace the pointers in LoadSrcTgtVersion[1-3]() parameter."
* commit 'e520f1d4cddeca4208ccc385313d900581ff117c':
  updater: Replace the pointers in LoadSrcTgtVersion[1-3]() parameter.
2015-09-09 18:02:21 +00:00
Tao Bao
e520f1d4cd Merge "updater: Replace the pointers in LoadSrcTgtVersion[1-3]() parameter." 2015-09-09 17:54:40 +00:00
Tao Bao
34847b2c70 updater: Replace the pointers in LoadSrcTgtVersion[1-3]() parameter.
And inline the call to LoadSrcTgtVersion1() into SaveStash().

Change-Id: Ibf4ef2bfa2cc62df59c4e8de99fd7d8039e71ecf
2015-09-08 11:08:00 -07:00
Tao Bao
e5571a0ff8 am 585a50ce: Merge "imgdiff: fix file descriptor leak"
* commit '585a50cecbccf59666dd65e9fc4320eaa3511634':
  imgdiff: fix file descriptor leak
2015-09-08 17:46:31 +00:00
Tao Bao
585a50cecb Merge "imgdiff: fix file descriptor leak" 2015-09-08 17:40:27 +00:00
Jeremy Compostella
a91c66d7c1 imgdiff: fix file descriptor leak
mkstemp() allocates a file description that is never released.  If
MakePatch() is called too many time, imgdiff reaches the Operating
System EMFILE (too many open files) limit.

Change-Id: Icbe1399f6f6d32cfa1830f879cacf7d75bbd9fc3
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Signed-off-by: Gaelle Nassiet <gaellex.nassiet@intel.com>
2015-09-08 19:15:09 +02:00
Tom Cherry
cf11a16015 am f8c303f9: Merge "move uncrypt from init.rc to uncrypt.rc"
* commit 'f8c303f9c197ed9247dbc88a5bf392f1f2c65639':
  move uncrypt from init.rc to uncrypt.rc
2015-09-04 17:56:28 +00:00
Tom Cherry
f8c303f9c1 Merge "move uncrypt from init.rc to uncrypt.rc" 2015-09-04 16:51:30 +00:00
David Pursell
c3d4d53546 minadbd: update service_to_fd() signature.
No functional change, just matching the signature to an adb change. See
https://android-review.googlesource.com/#/c/169601/.

Change-Id: Ic826864e126054849b3a4d193ded8acc5ee5269c
2015-09-03 16:41:42 -07:00
Tom Cherry
daa6d04434 move uncrypt from init.rc to uncrypt.rc
Move uncrypt from /init.rc to /system/etc/init/uncrypt.rc using the
LOCAL_INIT_RC mechanism

Bug 23186545

Change-Id: Ib8cb6dffd2212f524298279787fd557bc84aa7b9
2015-09-03 16:32:54 -07:00
David Zeuthen
1b3195cb91 am 4c223f4e: Merge "Add slot_suffix field to struct bootloader_message."
* commit '4c223f4e396e1b66a945601561fce4cd63fc31ae':
  Add slot_suffix field to struct bootloader_message.
2015-09-03 15:17:39 +00:00
David Zeuthen
4c223f4e39 Merge "Add slot_suffix field to struct bootloader_message." 2015-09-03 15:10:55 +00:00
Tao Bao
6f1f20622e am 6997c287: Merge "updater: Clean up C codes."
* commit '6997c287bedbd32fb5ffb84fc2efd081e6f56d3e':
  updater: Clean up C codes.
2015-09-03 00:32:04 +00:00
Tao Bao
6997c287be Merge "updater: Clean up C codes." 2015-09-02 21:45:36 +00:00
David Zeuthen
d85ae79dc9 Add slot_suffix field to struct bootloader_message.
This is needed by fs_mgr for certain A/B implementations.

Change-Id: I7bb404d61198eb7a962c2b693911f5156745daae
2015-09-02 15:49:58 -04:00
Tao Bao
0940fe17b0 updater: Clean up C codes.
Replace C-string with std::string, pointers with references, and
variable-size arrays in struct with std::vector.

Change-Id: I57f361a0e58286cbcd113e9be225981da56721b2
2015-09-01 12:57:35 -07:00
Tao Bao
73468ee8fb am 5a16eba2: am eef99138: Merge "updater: Remove the unused isunresumable in SaveStash()."
* commit '5a16eba2c323ecb4f1dd1ecb2ecea7a0ac8bdbb5':
  updater: Remove the unused isunresumable in SaveStash().
2015-08-26 21:17:50 +00:00
Tao Bao
5a16eba2c3 am eef99138: Merge "updater: Remove the unused isunresumable in SaveStash()."
* commit 'eef991389c7f739dd80bbe6e4a3699322c12dcfb':
  updater: Remove the unused isunresumable in SaveStash().
2015-08-26 21:10:23 +00:00
Tao Bao
eef991389c Merge "updater: Remove the unused isunresumable in SaveStash()." 2015-08-26 21:03:01 +00:00
Tao Bao
304c65b8fc am dc61d17d: am 50c17f9d: Merge "GOOGLEGMS-749 Fix integer overflow while applying block based OTA package"
* commit 'dc61d17d5b3c9e85a2863ec461170263325f1466':
  GOOGLEGMS-749 Fix integer overflow while applying block based OTA package
2015-08-26 01:14:31 +00:00
Tao Bao
9739a2920c updater: Remove the unused isunresumable in SaveStash().
Change-Id: I6a8d9bea4c1cd8ea7b534682061b90e893b227a2
2015-08-25 18:05:38 -07:00
Tao Bao
dc61d17d5b am 50c17f9d: Merge "GOOGLEGMS-749 Fix integer overflow while applying block based OTA package"
* commit '50c17f9da69ed3de0cd3ed032c50af067c1dc1f1':
  GOOGLEGMS-749 Fix integer overflow while applying block based OTA package
2015-08-26 01:05:09 +00:00