Commit Graph

2106 Commits

Author SHA1 Message Date
The Android Automerger ffb4b284cf merge in nyc-release history after reset to nyc-dev 2016-03-06 00:00:35 -08:00
Alex Deymo 1731f2980b Merge "Restore labels on /postinstall during recovery." into nyc-dev 2016-03-05 00:03:47 +00:00
Alex Deymo 080f522fb9 Restore labels on /postinstall during recovery.
This patch mirrors what was done in the main init.rc to relabel
/postinstall.

Bug: 27178350
Bug: 27177071

(cherry picked from commit 6bcc8af6e5)

Change-Id: I8320559f014cfb14216dcc350e016fc1db05cb14
2016-03-04 15:50:27 -08:00
Tao Bao ae6408d1a2 recovery: Handle devices without /cache partition.
Since we may not have /cache partition on A/B devices, let recovery
handle /cache related operations gracefully if /cache doesn't exist.

(1) Disable the wipe for /cache partition.

(2) Skip wiping /cache while wiping /data (i.e. factory reset).

(3) Disable logging-related features, until we figure out better
ways / places to store recovery logs (mainly for factory resets on A/B
devices).

Bug: 27176738
Change-Id: I7b14e53ce18960fe801ddfc15380dac6ceef1198
(cherry picked from commit 26112e5870)
2016-03-04 12:23:10 -08:00
Tao Bao 3a2bb594df uncrypt: Communicate via /dev/socket/uncrypt.
We used to rely on files (e.g. /cache/recovery/command and
/cache/recovery/uncrypt_status) to communicate between uncrypt and its
caller (i.e. system_server). Since A/B devices may not have /cache
partitions anymore, we switch to socket communication instead.

We will keep the use of /cache/recovery/uncrypt_file to indicate the OTA
package to be uncrypt'd though. Because there is existing logic in
ShutdownThread.java that depends on the existence of the file to
detect pending uncrypt works. This part won't affect A/B devices without
/cache partitions, because such devices won't need uncrypt service (i.e
the real de-encrypt work) anyway.

Bug: 27176738
Change-Id: I481406e09e3ffc7b80f2c9e39003b9fca028742e
2016-03-02 23:23:32 -08:00
The Android Automerger c2a6d98328 merge in nyc-release history after reset to nyc-dev 2016-03-01 00:00:39 -08:00
Prashant Malani 9db7964834 Merge "Fixes to wear recovery for N" into nyc-dev 2016-02-29 22:56:30 +00:00
The Android Automerger 44dfc6d2e3 merge in nyc-release history after reset to nyc-dev 2016-02-29 00:00:12 -08:00
Tao Bao 65f35b5c35 Merge "uncrypt: Retire pre-recovery service." into nyc-dev 2016-02-28 18:44:38 +00:00
Prashant Malani 0eb41c3f37 Fixes to wear recovery for N
Bug: 27336841

Change-Id: If4632e9791cce2c39590a4012687271f59a60af1
2016-02-26 17:01:37 -08:00
Paul Lawrence ddcbb8ec9c Move recovery's convert_fbe folder to /tmp
The cache folder is no longer available at this time

Bug: 27355824
Change-Id: I74e33266c1ff407364981b186613f81319dd22dc
2016-02-25 14:27:45 -08:00
Paul Lawrence 661f8a69f2 Move recovery's convert_fbe folder to /tmp
The cache folder is no longer available at this time

Bug: 27355824
Change-Id: I74e33266c1ff407364981b186613f81319dd22dc
2016-02-25 13:07:16 -08:00
The Android Automerger ef5c401126 merge in nyc-release history after reset to nyc-dev 2016-02-24 00:00:40 -08:00
Josh Gao 0757a093c1 Merge "minadbd: update for adb_thread_create signature change." into nyc-dev 2016-02-24 00:50:36 +00:00
Yabin Cui 99281df8e2 recovery: check battery level before installing package.
Bug: 26879394

Change-Id: I63dce5bc50c2e104129f1bcab7d3cad5682bf45d
(cherry picked from commit 53e7a0628f)
2016-02-23 11:03:10 -08:00
The Android Automerger 14b04449e6 merge in nyc-release history after reset to nyc-dev 2016-02-23 00:00:35 -08:00
Yabin Cui 089fe38ac5 Fix integer overflows in recovery procedure. am: 1273956e69 am: 5978a71d29 am: 877dcba47a am: f4ee1720f3 am: cae056f219 am: 682d691052 am: ae68f02272
am: a3604da6e1

* commit 'a3604da6e17afbf5b98f1eb2c5fc16bde1731b85':
  Fix integer overflows in recovery procedure.
2016-02-23 06:56:27 +00:00
Yabin Cui a3604da6e1 Fix integer overflows in recovery procedure. am: 1273956e69 am: 5978a71d29 am: 877dcba47a am: f4ee1720f3 am: cae056f219 am: 682d691052
am: ae68f02272

* commit 'ae68f0227262d08f250e4cccda6f03b9981bf56d':
  Fix integer overflows in recovery procedure.
2016-02-23 06:53:47 +00:00
Yabin Cui ae68f02272 Fix integer overflows in recovery procedure. am: 1273956e69 am: 5978a71d29 am: 877dcba47a am: f4ee1720f3 am: cae056f219
am: 682d691052

* commit '682d6910526a55e6a20e27cde3cf7515fa07a97b':
  Fix integer overflows in recovery procedure.
2016-02-23 06:50:58 +00:00
Yabin Cui 682d691052 Fix integer overflows in recovery procedure. am: 1273956e69 am: 5978a71d29 am: 877dcba47a am: f4ee1720f3
am: cae056f219

* commit 'cae056f21908173bcf2fa9a1724e46f16abb3258':
  Fix integer overflows in recovery procedure.
2016-02-23 06:47:37 +00:00
Yabin Cui cae056f219 Fix integer overflows in recovery procedure. am: 1273956e69 am: 5978a71d29 am: 877dcba47a
am: f4ee1720f3

* commit 'f4ee1720f33a01518f79a2bf8df4664dab3564d4':
  Fix integer overflows in recovery procedure.
2016-02-23 06:44:46 +00:00
Yabin Cui f4ee1720f3 Fix integer overflows in recovery procedure. am: 1273956e69 am: 5978a71d29
am: 877dcba47a

* commit '877dcba47ac311aa65b27e42b3625bcb58d84e47':
  Fix integer overflows in recovery procedure.
2016-02-23 06:42:07 +00:00
Yabin Cui 877dcba47a Fix integer overflows in recovery procedure. am: 1273956e69
am: 5978a71d29

* commit '5978a71d2954c7df02cbd0c51582ce4063346f77':
  Fix integer overflows in recovery procedure.
2016-02-23 06:35:46 +00:00
Yabin Cui 5978a71d29 Fix integer overflows in recovery procedure.
am: 1273956e69

* commit '1273956e69a7d1d5b636f269050b446e0ced3f9b':
  Fix integer overflows in recovery procedure.
2016-02-23 06:33:20 +00:00
Yabin Cui 0d28ba452f resolve merge conflicts of e5d3d15cd2 to nyc-dev
Change-Id: Ie8b30e6b114b648e8c03866456c64cf8b740d1e3
2016-02-22 22:16:44 -08:00
Yabin Cui e5d3d15cd2 Fix integer overflows in recovery procedure. am: 4f2df162c6
am: 2800876140

* commit '2800876140425749d8d3fd8339f5c4b55ee0e185':
  Fix integer overflows in recovery procedure.
2016-02-23 02:39:21 +00:00
Yabin Cui 2800876140 Fix integer overflows in recovery procedure.
am: 4f2df162c6

* commit '4f2df162c6ab4a71ca86e4b38735b681729c353b':
  Fix integer overflows in recovery procedure.
2016-02-23 02:33:18 +00:00
Yabin Cui 1273956e69 Fix integer overflows in recovery procedure.
Bug: 26960931
Change-Id: Ieae45caccfb4728fcf514f0d920976585d8e6caf
(cherry picked from commit 4f2df162c6)
2016-02-22 17:42:02 -08:00
Tao Bao 5b3b373a49 uncrypt: Retire pre-recovery service.
The framework CL in [1] removes the use of "pre-recovery" service which
is basically to trigger a reboot into the recovery.

[1] commit e8a403d57c8ea540f8287cdaee8b90f0cf9626a3

Bug: 26830925
Change-Id: I131f31a228df59e4f9c3024b238bbdee0be2b157
2016-02-22 17:33:41 -08:00
Josh Gao cd324766ab minadbd: update for adb_thread_create signature change.
Change-Id: Ifa0b4d8c1cf0bb39abac61984ff165e82e41222c
(cherry picked from commit cc07b35565)
2016-02-22 15:44:53 -08:00
Yabin Cui 4f2df162c6 Fix integer overflows in recovery procedure.
Bug: 26960931
Change-Id: Ieae45caccfb4728fcf514f0d920976585d8e6caf
(cherry picked from commit a029c9a458)
2016-02-22 11:02:08 -08:00
Jed Estep e1305768f6 Fix verifier test base testdata directory after merge conflict
Change-Id: I7ffba0be5a6befc875ce59b51a008c1892e7d34b
2016-02-22 10:59:37 -08:00
Tao Bao a4436f7b25 DO NOT MERGE ANYWHERE Use synchronous writes when setting up BCB. am: 8559bbfb3b -s ours
am: 52991c4639  -s ours

* commit '52991c4639347a2e2b098949fdf91c305f8d41dd':
  DO NOT MERGE ANYWHERE Use synchronous writes when setting up BCB.
2016-02-19 17:33:52 +00:00
Tao Bao 52991c4639 DO NOT MERGE ANYWHERE Use synchronous writes when setting up BCB.
am: 8559bbfb3b  -s ours

* commit '8559bbfb3b988b1b8790702d277715fc429cc1d8':
  DO NOT MERGE ANYWHERE Use synchronous writes when setting up BCB.
2016-02-19 17:29:34 +00:00
Tao Bao 8559bbfb3b DO NOT MERGE ANYWHERE Use synchronous writes when setting up BCB.
Commit [1] made similar changes into AOSP code, but it requires multiple
CLs to cherry-pick into cw-e branch. So we make a separate CL to fix the
issue.

[1] commit bd82b27341

Bug: 27247370
Change-Id: Id5c08a6a29284353f891cdbaa224feee891f3807
2016-02-19 08:39:25 -08:00
The Android Automerger 6c081d1a5e merge in nyc-release history after reset to master 2016-02-07 00:00:43 -08:00
Yabin Cui ca78c9f035 resolve merge conflicts of 715d8a203a to master.
Change-Id: Ic868ee9b27ef7251aa49ac814de7355ecd9c7d37
2016-02-05 15:27:52 -08:00
Yabin Cui 715d8a203a Merge "applypatch: fix memory leaks reported by static analysis."
am: 6b89aa7662

* commit '6b89aa7662186f940f2ae35d479598601dc28a07':
  applypatch: fix memory leaks reported by static analysis.
2016-02-05 22:58:47 +00:00
Yabin Cui 6b89aa7662 Merge "applypatch: fix memory leaks reported by static analysis." 2016-02-05 22:54:36 +00:00
Tao Bao e284cd58c8 Merge "Refactor existing tests to use gtest" am: 38b02cc6a0
am: 9865c55254

* commit '9865c55254a1583e18a7e8ac502f2c2143ed8b82':
  Refactor existing tests to use gtest
2016-02-05 18:47:14 +00:00
Tao Bao 9865c55254 Merge "Refactor existing tests to use gtest"
am: 38b02cc6a0

* commit '38b02cc6a097e6356f2369fc2b23c8c8a893e3ff':
  Refactor existing tests to use gtest
2016-02-05 18:44:55 +00:00
Tao Bao 38b02cc6a0 Merge "Refactor existing tests to use gtest" 2016-02-05 18:41:01 +00:00
Yabin Cui 6ab3c817ff Merge "updater: fix memory leak based on static analysis." am: e50d447692
am: 66b02c4ce5

* commit '66b02c4ce5b175451e723c463e6e9d19ab7872fa':
  updater: fix memory leak based on static analysis.
2016-02-05 17:25:49 +00:00
Yabin Cui 66b02c4ce5 Merge "updater: fix memory leak based on static analysis."
am: e50d447692

* commit 'e50d447692764cdb18107965c3ff3476d63b68ec':
  updater: fix memory leak based on static analysis.
2016-02-05 02:50:26 +00:00
Yabin Cui e50d447692 Merge "updater: fix memory leak based on static analysis." 2016-02-05 02:46:23 +00:00
Yabin Cui d483c20a7e applypatch: fix memory leaks reported by static analysis.
Bug: 26906416
Change-Id: I163df5a8f3abda3ba5d4ed81dfc8567054eceb27
2016-02-04 15:42:02 -08:00
Yabin Cui 64be2135d8 updater: fix memory leak based on static analysis.
Bug: 26907377
Change-Id: I384c0131322b2d12f0ef489735e70e86819846a4
2016-02-04 14:49:06 -08:00
Tao Bao 50aa63f9bd resolve merge conflicts of 7b6027dde4 to master.
Change-Id: I1d5232f61744bb18ca5de3a16a340bc3afd110bb
2016-02-04 11:26:29 -08:00
Tao Bao 7b6027dde4 Merge "Switch from mincrypt to BoringSSL in applypatch and updater."
am: 6e71c90fad

* commit '6e71c90fadbae68824116276d4dd536d962838f8':
  Switch from mincrypt to BoringSSL in applypatch and updater.
2016-02-04 19:22:39 +00:00
Tao Bao 6e71c90fad Merge "Switch from mincrypt to BoringSSL in applypatch and updater." 2016-02-04 19:16:20 +00:00