Commit Graph

1947 Commits

Author SHA1 Message Date
Tao Bao 4458d3e552 Merge "updater: Don\'t zero out CommandParameters with memset(3)."
am: df59cee

* commit 'df59ceecfb939c02593425a89757b54c50cc91cf':
  updater: Don't zero out CommandParameters with memset(3).

Change-Id: I36d1395257da1d122e76f8552bb3a2a8f96f60b7
2016-04-28 04:36:12 +00:00
Tao Bao df59ceecfb Merge "updater: Don't zero out CommandParameters with memset(3)." 2016-04-28 04:28:19 +00:00
Tao Bao 730646199b updater: Don't zero out CommandParameters with memset(3).
[1] switched a few things to android::base::unique_fd including
CommandParameters.fd. However, we were using memset(3) to zero out the
struct, which effectively assigned unique_fd(0) to fd. When it called
fd.reset(), file descriptor 0 was unintentionally closed. When FD 0 was
later reassigned via open(2), it led to lseek(2) errors: "Bad file
descriptor".

This CL switches to using braced-init (i.e. '= {}') instead, so that the
default constructor unique_fd(-1) would be called.

[1]: commit bcabd09293

Bug: 28391985
Change-Id: If1f99932b15552714c399e65c8b80550344b758a
2016-04-26 17:36:13 -07:00
Chih-Hung Hsieh bcad1d1ced Merge "Fix google-runtime-int warnings."
am: a1f4a1e

* commit 'a1f4a1ec3319ee1ab869a46805bff63550b56ca7':
  Fix google-runtime-int warnings.

Change-Id: If924b2e1b1e7e7bb4317fdca0c583b7de45db397
2016-04-18 22:29:19 +00:00
Chih-hung Hsieh a1f4a1ec33 Merge "Fix google-runtime-int warnings." 2016-04-18 22:19:06 +00:00
Chih-Hung Hsieh 54a2747ef3 Fix google-runtime-int warnings.
Bug: 28220065
Change-Id: Ida199c66692a1638be6990d583d2ed42583fb592
2016-04-18 12:29:30 -07:00
David Benjamin 405db92b6e Merge "Fix IWYU errors."
am: 51dcd0d

* commit '51dcd0da37dd10238017bae03fc708dc6e05bb56':
  Fix IWYU errors.

Change-Id: I9dd499afab1d5bf5e6f30a424bd70a016194124d
2016-04-16 01:55:32 +00:00
Treehugger Robot 51dcd0da37 Merge "Fix IWYU errors." 2016-04-16 01:46:25 +00:00
David Benjamin a86392ea92 Fix IWYU errors.
This fixes build errors with BoringSSL master. (The cpp file uses functions
from bn.h and neither it nor the header includes it.)

Change-Id: If7f38aa0b931aa7940079bc006c7283b31f3b774
2016-04-15 20:27:44 -04:00
Jeremy Compostella b30c6f690a Merge "Define the Bootloader Control A/B structure"
am: e6af522

* commit 'e6af5228aa47300e4fe96a0f5068bb344c4b268d':
  Define the Bootloader Control A/B structure

Change-Id: I8a66fe124a0c18818485a9e73e742108b3c9d80a
2016-04-15 16:55:02 +00:00
Tao Bao e6af5228aa Merge "Define the Bootloader Control A/B structure" 2016-04-15 16:51:14 +00:00
Mattias Nissler 2bf95acf7a Merge "Convert recovery to use BoringSSL instead of mincrypt."
am: 62e6637

* commit '62e6637f8bfad588ff0b3c72beacab5c079db203':
  Convert recovery to use BoringSSL instead of mincrypt.

Change-Id: Id4e95bb85866b65998c44312afc444dd29a3103d
2016-04-12 23:30:02 +00:00
Elliott Hughes 62e6637f8b Merge "Convert recovery to use BoringSSL instead of mincrypt." 2016-04-12 23:12:35 +00:00
Mattias Nissler 452df6d99c Convert recovery to use BoringSSL instead of mincrypt.
This changes the verification code in bootable/recovery to use
BoringSSL instead of mincrypt.

Change-Id: I37b37d84b22e81c32ac180cd1240c02150ddf3a7
2016-04-06 15:54:17 +02:00
Jeremy Compostella b3bf958d4f Define the Bootloader Control A/B structure
Define the A/B structure for implementation using the misc partition
as storage.  The bootloader_control structure is designed to be put in
the bootloader_message slot_suffix field.

Change-Id: I158bdf3e69b3f327a1dde4c6eb1f907dbaf8939c
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
2016-04-06 09:56:10 +02:00
Mark Salyzyn 419538869d Merge "recovery-persist: pick up both pstore console files"
am: 901f315

* commit '901f31531ba7b7e40e8a9c915467892997d176da':
  recovery-persist: pick up both pstore console files

Change-Id: I7febc439147995adc06b75d1b0de3d30f55719a9
2016-04-05 14:35:53 +00:00
Mark Salyzyn 901f31531b Merge "recovery-persist: pick up both pstore console files" 2016-04-05 14:29:05 +00:00
Mark Salyzyn 5f7111ff4d recovery-persist: pick up both pstore console files
- Volantis console-ramoops-0 (upstream correct)
- Angler console-ramoops
- Bullhead console-ramoops
- Shamu console-ramoops

NB: Shamu also has kernel crashes in other pstore files,
    not merging them in.

Bug: 27176738
Change-Id: Ib6eef3e25475935b89252f51c960719c7860511a
2016-04-04 16:24:48 -07:00
Elliott Hughes dc91161a56 Merge "Move selinux dependencies out of header files."
am: 8124750

* commit '81247500d535dac714fad657860b67474e1f6e42':
  Move selinux dependencies out of header files.

Change-Id: If8fde7a64334327a2b0880a742d784642481ceeb
2016-04-02 16:01:25 +00:00
Elliott Hughes 81247500d5 Merge "Move selinux dependencies out of header files." 2016-04-02 15:53:11 +00:00
Elliott Hughes 4bbd5bf8a6 Move selinux dependencies out of header files.
Bug: http://b/27764900
Change-Id: Ib62a59edcb13054f40f514c404d32b87b14ed5f1
2016-04-01 18:24:39 -07:00
Mark Salyzyn 6f83130d7a Merge "recovery: use __android_log_pmsg_file_write for log files"
am: 75da771

* commit '75da77105f329f5d6c1b4dc46ce02377ec4afd6a':
  recovery: use __android_log_pmsg_file_write for log files

Change-Id: I3da18530294ec71cd24b5ad8c720ab16c3e47dab
2016-03-31 20:57:51 +00:00
Mark Salyzyn 75da77105f Merge "recovery: use __android_log_pmsg_file_write for log files" 2016-03-31 20:49:56 +00:00
Yabin Cui ecc068c2f8 Merge "uncrypt: remove --read-bcb option."
am: ebd22be

* commit 'ebd22be4f742f5eeb32b2eeaf212b34e7605da50':
  uncrypt: remove --read-bcb option.

Change-Id: I06ed6c0a36246041d03c57bc03f532de414c926f
2016-03-30 01:29:42 +00:00
Yabin Cui ebd22be4f7 Merge "uncrypt: remove --read-bcb option." 2016-03-30 01:19:25 +00:00
Yabin Cui 6507265906 uncrypt: remove --read-bcb option.
Bug: 27897241
Change-Id: I4f52ada58e8f204dba8c974ea0ae03876411ecf0
(cherry picked from commit 61799baba3)
2016-03-29 18:14:44 -07:00
Tianjie Xu 2e2189728b Merge "Add string for Installing_security_update"
am: 3568004

* commit '3568004cba740a466bd9731a4bb5c8a1475e6d2d':
  Add string for Installing_security_update

Change-Id: I11a147726cd535e574690e01df35ec961888c5c6
2016-03-30 00:05:54 +00:00
Tianjie Xu 3568004cba Merge "Add string for Installing_security_update" 2016-03-29 23:58:31 +00:00
Tianjie Xu 1c95c97e55 Add string for Installing_security_update
Bug: 27837319
Change-Id: I037158697a294c3e03f186f3b4207ea700321a8a
(cherry picked from commit 1ee0ff3d78)
2016-03-29 13:59:22 -07:00
Elliott Hughes 5cf4701d66 Merge "Switch to <android-base/unique_fd.h>."
am: 5d73735

* commit '5d73735552b3eca103830bd1433ce4b74b54b2b3':
  Switch to <android-base/unique_fd.h>.

Change-Id: I2f03ba036160376f03516eb7ede62229bb8e20ba
2016-03-29 18:00:38 +00:00
Elliott Hughes 5d73735552 Merge "Switch to <android-base/unique_fd.h>." 2016-03-29 17:55:47 +00:00
Elliott Hughes bcabd09293 Switch to <android-base/unique_fd.h>.
Change-Id: I13ba3f40bd52b5f3e3fe9002a45a9a8630040129
2016-03-29 08:18:34 -07:00
Mark Salyzyn a4f701af93 recovery: use __android_log_pmsg_file_write for log files
- Add call to __android_log_pmsg_file_write for recovery logging.
- Add call to refresh pmsg if we reboot back into recovery and then
  allow overwrite of those logs.
- Add a new one-time executable recovery-refresh that refreshes pmsg
  in post-fs phase of init. We rely on pmsg eventually scrolling off
  to age the content after recovery-persist has done its job.
- Add a new one-time executable recovery-persist that transfers from
  pmsg to /data/misc/recovery/ directory if /cache is not mounted
  in post-fs-data phase of init.
- Build and appropriately trigger the above two as required if
  BOARD_CACHEIMAGE_PARTITION_SIZE is undefined.
- Add some simple unit tests

NB: Test failure is expected on systems that do not deliver either
the recovery-persist or recovery-refresh executables, e.g. systems
with /cache. Tests also require a timely reboot sequence of test
to truly verify, tests provide guidance on stderr to direct.

Bug: 27176738
Change-Id: I17bb95980234984f6b2087fd5941b0a3126b706b
2016-03-28 11:07:00 -07:00
Elliott Hughes 2dbd06c7ed Merge "Move recovery_l10n here from development/tools." 2016-03-26 15:45:24 +00:00
Elliott Hughes 3d0153a807 Move recovery_l10n here from development/tools.
Bug: http://b/27837319
Change-Id: I116fc13ae108a59b657f5c9f7efe971de72ac743
2016-03-26 08:42:49 -07:00
Tianjie Xu 3123e5ad94 Merge "Skip stashing source blocks in verify mode" 2016-03-25 22:09:34 +00:00
Tianjie Xu 7eca97e75d Skip stashing source blocks in verify mode
Currently block_image_verify() stashes source blocks to /cache and
in some case triggers I/O errors. To avoid this risk, We create
a map from the hash value to the source blocks' range_set. When
executing stash command in verify mode, source range is saved but block
contents aren't stashed. And load_stash could get its value from
either the stashed file from the previous update, or the contents on
the source partition specified by the saved range.

Bug: 27584487
Bug: 25633753
Change-Id: I775baf4bee55762b6e7b204f8294afc597afd996
(cherry picked from commit 0188935d55)
2016-03-25 14:56:21 -07:00
Tianjie Xu 7e18ce221f Merge "Clean up intent_file related code in recovery.cpp" 2016-03-25 21:03:00 +00:00
Tao Bao 9afbf2af4c Merge "Correct caching behavior for should_inject_cache" 2016-03-25 19:03:28 +00:00
Jed Estep e326b22446 Correct caching behavior for should_inject_cache
Bug: 27800498
Change-Id: I5255283c1d04a385ed719c5bc2be461cae9f3648
(cherry picked from commit 88dd7796a1)
2016-03-25 11:21:12 -07:00
Tianjie Xu c14d95da58 Clean up intent_file related code in recovery.cpp
No one in recovery or framework is utilizing intent file. Clean
up the code.

Bug:27725880
Change-Id: I78b37ff94261793e0d6a86a0fa6d27dcfe3f4783
2016-03-24 12:49:46 -07:00
Elliott Hughes 4cb68121b8 Merge "Remove dead tools." 2016-03-23 19:52:56 +00:00
Elliott Hughes 57eb4fd6e2 Remove dead tools.
None of these have been touched since cupcake, except to keep them building.

Change-Id: I5ed13849e6842e755c62da05f1a8a6da2583b1ee
2016-03-22 21:08:39 -07:00
Tao Bao 867e60db16 Merge "Fix: full ota package larger than 2GB fails to upgrade" 2016-03-21 18:59:31 +00:00
caozhiyuan 2584f9c24d Fix: full ota package larger than 2GB fails to upgrade
Change-Id: I45d9fab8739cc6fa8a0bacaca9238896118d9d7f
Signed-off-by: diruomeng <di.ruomeng@zte.com.cn>
Signed-off-by: caozhiyuan <cao.zhiyuan@zte.com.cn>
2016-03-21 10:21:03 -07:00
Alex Deymo 38234f4bef Merge "Add include/ to the Makefile include path." 2016-03-14 21:48:52 +00:00
Alex Deymo 82f8c82046 Add include/ to the Makefile include path.
The applypatch heaaders were recently moved to the include/ directory.
This patch reflects that change in the Makefile.

Bug: None
TEST=sudo emerge imgdiff

Change-Id: I0bf3f991b5e0c98054033c5939ed69b3e3c827a9
2016-03-14 14:25:33 -07:00
Sen Jiang 5593342575 Merge "applypatch: add -fPIC for libimgpatch in Chrome OS." 2016-03-09 01:28:09 +00:00
Sen Jiang ef2016f711 applypatch: add -fPIC for libimgpatch in Chrome OS.
To make the static library position independent.

Bug: 26866274
Test: emerge-peppy imgdiff; sudo emerge imgdiff; emerge nyan imgdiff

Change-Id: I319e721ccfb6a51f63d31afa49f54aa7f607f4bf
2016-03-08 17:02:50 -08:00
Tianjie Xu 90f01a4203 Merge "Reboot and retry on I/O errors"
am: 94dc34148c

* commit '94dc34148c117fd3cfb442a348a69dbbb676a5c5':
  Reboot and retry on I/O errors
2016-03-07 23:57:03 +00:00