exit instead of return if sideload file creation fails

A return here leaves adb sideload in a permanent loop. An exit is
more appropriate for this error.

Change-Id: I80fb8abae4f6378833aa75f9eaf7ec1acd44b274
Signed-off-by: Ethan Yonker <ethanayonker@gmail.com>
am b5bd4fb7: (-s ours) am 2f50df00: am c09444eb: am f91bd41c: am 1c302caf: (-s ours) am c14a7fbd: (-s ours) Reconcile with jb-mr1-release - do not merge

* commit 'b5bd4fb79544b1939e9f977a88a707bdc90cf66c':
am 4e21482d: Add liblog

* commit '4e21482d979f6f81b34f92e664adf137555d4504':
  Add liblog
verifier: update to support certificates using SHA-256

Change-Id: Ifd5a29d459acf101311fa1c220f728c3d0ac2e4e
Merge "verifier: update to support certificates using SHA-256"
recovery: turn on text display for install errors in debug builds

Hopefully this will reduce the number of OTA "bugs" reported that are
really just someone having changed their system partition,
invalidating future incremental OTAs.

Also fixes a longstanding TODO about putting LOGE() output in the
on-screen display.

Change-Id: I44e5be65b2dee7ebce2cce28ccd920dc3d6e522e
recovery: save logs from the last few invocations of recovery

Extends the last_log mechanism to save logs from the last six
invocations of recovery, so that we're more likely to have useful logs
even if the device has repeatedly booted into recovery.

Change-Id: I08ae7a09553ada45f9e0733fe1e55e5a22efd9f9
am 7c3ae45e: recovery: turn on text display for install errors in debug builds

* commit '7c3ae45ef9306d2ff4b491e0488c8849bf15ce90':
  recovery: turn on text display for install errors in debug builds
am da1ebaef: recovery: save logs from the last few invocations of recovery

* commit 'da1ebaef0aa8e38db6edf8bfc3d96290461a424f':
  recovery: save logs from the last few invocations of recovery
am 8cd12112: am d51bfc9b: Merge "Fix the potential segmentation fault"

* commit '8cd12112e444e01163526fe6ab237f6164b0018b':
  Fix the potential segmentation fault
start healthd in recovery

Change-Id: I16e3e0ddb8ca062431deb4be83c5be5eb786d76f
recovery: copy logs to cache more aggressively

Copy logs to /cache immediately upon a package installation failure;
don't wait for recovery to finish.  (If the user reboots without
exiting recovery the "right" way, the logs never get copied at all.)

Change-Id: Iee342944e7ded63da5a4af33d11ebc876f6c0835
recovery: init backgroundIcon properly to avoid recovery mode crash

We met factory issue that some devices would crash in recovery mode
because the backgroundIcon array did not reset to NULL when initializing.

Bug: 9568624
Change-Id: I13c7a7cc1053a7ffdbadd71740c1a2b4a2af6bba
Signed-off-by: yetta_wu <yetta_wu@asus.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
am 4d4b233e: am 2f6877a0: recovery: init backgroundIcon properly to avoid recovery mode crash

* commit '4d4b233eae51d5580b58cb00d3aa45ecbb1b255e':
  recovery: init backgroundIcon properly to avoid recovery mode crash
am 0ccaccf7: am 044a0b4d: recovery: try to write EMMC partitions more reliably

* commit '0ccaccf7d0f50bb9555ee13a841c246a1fea80f2':
  recovery: try to write EMMC partitions more reliably
recovery: move log output to stdout

Recovery currently has a random mix of messages printed to stdout and
messages printed to stderr, which can make logs hard to read.  Move
everything to stdout.

Change-Id: Ie33bd4a9e1272e731302569cdec918e0534c48a6
recovery: preserve recovery logs across cache wipes

When doing a cache wipe or a factory reset (which includes a cache
wipe), save any last* log files in the /cache/recovery directory and
write them back after reformatting the partition, so that wiping data
doesn't lose useful log information.

Change-Id: I1f52ae9131760b5e752e136645c19f71b7b166ee
Merge "recovery: preserve recovery logs across cache wipes"
am 2148133d: am c870a99c: recovery: write partitions more conservatively

* commit '2148133d46cb875316b01947dd5719ed995f7d67':
  recovery: write partitions more conservatively
am e352c88f: (-s ours) Reconcile with jb-mr2-release - do not merge

* commit 'e352c88fbcfd917f6614597364d2e550aa691e79':
  recovery: write partitions more conservatively
  recovery: try to write EMMC partitions more reliably