Commit Graph

1503 Commits

Author SHA1 Message Date
Sami Tolvanen 8754c36641 am 1692fc8b: am 2fd12979: am 69608fe7: Merge "Zero blocks before BLKDISCARD"
* commit '1692fc8bcba768cedd8bd5cc2a9875d354df1fcd':
  Zero blocks before BLKDISCARD
2015-06-09 21:54:10 +00:00
Sami Tolvanen 1692fc8bcb am 2fd12979: am 69608fe7: Merge "Zero blocks before BLKDISCARD"
* commit '2fd12979eac8987d4aaa89b56c508a710450c33d':
  Zero blocks before BLKDISCARD
2015-06-09 21:38:58 +00:00
Sami Tolvanen 2fd12979ea am 69608fe7: Merge "Zero blocks before BLKDISCARD"
* commit '69608fe7548727ee765c89f69a6861479f391487':
  Zero blocks before BLKDISCARD
2015-06-09 21:28:46 +00:00
Sami Tolvanen 69608fe754 Merge "Zero blocks before BLKDISCARD" 2015-06-09 21:17:20 +00:00
Sami Tolvanen 96392b97f6 Zero blocks before BLKDISCARD
Due to observed BLKDISCARD flakiness, overwrite blocks that we want
to discard with zeros first to avoid later issues with dm-verity if
BLKDISCARD is not successful.

Bug: 20614277
Bug: 20881595
Change-Id: I0280fe115b020dcab35f49041fb55b7f8e793da3
2015-06-09 21:57:06 +01:00
Tao Bao a0f4278d95 am db553d5d: am 7baa13f6: am 3f9db6af: Merge "recovery: Switch to clang"
* commit 'db553d5d5a3b413bf37339f735b3e8f2ad6d93b8':
  recovery: Switch to clang
2015-06-03 23:05:01 +00:00
Tao Bao db553d5d5a am 7baa13f6: am 3f9db6af: Merge "recovery: Switch to clang"
* commit '7baa13f6d6ffa77e35e3596018efa5ca9a1febf7':
  recovery: Switch to clang
2015-06-03 22:52:08 +00:00
Tao Bao 7baa13f6d6 am 3f9db6af: Merge "recovery: Switch to clang"
* commit '3f9db6af3d8f8659637da7288e9e2bceda4366d0':
  recovery: Switch to clang
2015-06-03 22:38:50 +00:00
Tao Bao 3f9db6af3d Merge "recovery: Switch to clang" 2015-06-03 22:30:40 +00:00
Tao Bao 2b3d8b3acb am 3ed20cff: am 028d216c: am 227069d7: Merge "Fix build: fprintf without modifier"
* commit '3ed20cffa685e4f89cdfdf71cd19058aa4137a08':
  Fix build: fprintf without modifier
2015-06-03 19:23:26 +00:00
Tao Bao 9343488cd7 am 5393149d: am d107e6dc: am a69e608a: Merge "Log update outputs in order"
* commit '5393149d53785cc8a690b93ca4f0db490d216937':
  Log update outputs in order
2015-06-03 19:23:25 +00:00
Tao Bao 3ed20cffa6 am 028d216c: am 227069d7: Merge "Fix build: fprintf without modifier"
* commit '028d216c83f80673a125d946d555d43418307c81':
  Fix build: fprintf without modifier
2015-06-03 18:36:27 +00:00
Tao Bao 5393149d53 am d107e6dc: am a69e608a: Merge "Log update outputs in order"
* commit 'd107e6dc104dfb6e5043cedaf348f354f7cd46cc':
  Log update outputs in order
2015-06-03 18:36:16 +00:00
Tao Bao 80e46e08de recovery: Switch to clang
And a few trival fixes to suppress warnings.

Change-Id: I38734b5f4434643e85feab25f4807b46a45d8d65
2015-06-03 11:30:03 -07:00
Tao Bao 028d216c83 am 227069d7: Merge "Fix build: fprintf without modifier"
* commit '227069d77f90aa7965d4cd5ab4f4a5302194fc73':
  Fix build: fprintf without modifier
2015-06-03 17:17:50 +00:00
Tao Bao 227069d77f Merge "Fix build: fprintf without modifier" 2015-06-03 17:06:50 +00:00
Tao Bao 1eb9003b77 Fix build: fprintf without modifier
Change-Id: I66ae21a25a25fa3c70837bc54a7d406182d4cf37
2015-06-03 09:55:38 -07:00
Tao Bao d107e6dc10 am a69e608a: Merge "Log update outputs in order"
* commit 'a69e608a521f7818cc0f17ba86710bd5b18137f2':
  Log update outputs in order
2015-06-03 16:28:46 +00:00
Tao Bao a69e608a52 Merge "Log update outputs in order" 2015-06-03 16:15:50 +00:00
Tao Bao b6918c7c43 Log update outputs in order
Although stdout and stderr are both redirected to log file with no
buffering, we are seeing some outputs are mixed in random order.
This is because ui_print commands from the updater are passed to the
recovery binary via a pipe, which may interleave with other outputs
that go to stderr directly.

In recovery, adding ui::PrintOnScreenOnly() function to handle
ui_print command, which skips printing to stdout. Meanwhile, updater
prints the contents to stderr in addition to piping them to recovery.

Change-Id: Idda93ea940d2e23a0276bb8ead4aa70a3cb97700
2015-06-02 22:15:40 -07:00
Tao Bao 497aef84d5 am 2c51ec95: am 02b64725: Merge "uncrypt: Write status when it reboots to factory reset" into mnc-dev
* commit '2c51ec953c434992ea4d64001a54ec08f8543984':
  uncrypt: Write status when it reboots to factory reset
2015-06-01 16:16:15 +00:00
Tao Bao 2c51ec953c am 02b64725: Merge "uncrypt: Write status when it reboots to factory reset" into mnc-dev
* commit '02b6472546b899ebc16029371eb75364059871d2':
  uncrypt: Write status when it reboots to factory reset
2015-06-01 16:03:51 +00:00
Elliott Hughes ae579dd5ce am 7132e792: am b5dabd25: Really don\'t use TEMP_FAILURE_RETRY with close in recovery.
* commit '7132e79266f827b5420f6a6df399e890e0501a62':
  Really don't use TEMP_FAILURE_RETRY with close in recovery.
2015-06-01 15:48:59 +00:00
Sami Tolvanen bf8c00ab59 am 07ec625a: am 92eea1bc: Handle BLKDISCARD failures
* commit '07ec625a61263ea760db93c106d966d4406fbc54':
  Handle BLKDISCARD failures
2015-06-01 15:48:59 +00:00
Elliott Hughes 7132e79266 am b5dabd25: Really don\'t use TEMP_FAILURE_RETRY with close in recovery.
* commit 'b5dabd25e1d04ce134837b49fbef889e511d4d35':
  Really don't use TEMP_FAILURE_RETRY with close in recovery.
2015-06-01 15:26:54 +00:00
Sami Tolvanen 07ec625a61 am 92eea1bc: Handle BLKDISCARD failures
* commit '92eea1bc414a7b6faedaf812c33ede17403fcaf7':
  Handle BLKDISCARD failures
2015-06-01 15:26:53 +00:00
Tao Bao 02b6472546 Merge "uncrypt: Write status when it reboots to factory reset" into mnc-dev 2015-05-29 22:02:27 +00:00
Tao Bao 2c2cae8a4a uncrypt: Write status when it reboots to factory reset
When it reboots into recovery for a factory reset, it still needs to
write the uncrypt status (-1) to the pipe.

Bug: 21511893
Change-Id: I1a725820f1e1875146e49b5a6f28af2fbf284fc7
2015-05-29 14:24:02 -07:00
Elliott Hughes cbff4f36eb am 8339bc67: am 5944bcd8: am 1441a965: Merge "Really don\'t use TEMP_FAILURE_RETRY with close in recovery."
* commit '8339bc672a0c5a31d286fb55ff22341d73efc119':
  Really don't use TEMP_FAILURE_RETRY with close in recovery.
2015-05-29 18:50:49 +00:00
Elliott Hughes 8339bc672a am 5944bcd8: am 1441a965: Merge "Really don\'t use TEMP_FAILURE_RETRY with close in recovery."
* commit '5944bcd8eba6f012c1439972c050a2dc874765ae':
  Really don't use TEMP_FAILURE_RETRY with close in recovery.
2015-05-29 18:30:30 +00:00
Elliott Hughes 5944bcd8eb am 1441a965: Merge "Really don\'t use TEMP_FAILURE_RETRY with close in recovery."
* commit '1441a9654feee7e32ec6b39b1992c27635feb50f':
  Really don't use TEMP_FAILURE_RETRY with close in recovery.
2015-05-29 18:16:47 +00:00
Elliott Hughes b5dabd25e1 Really don't use TEMP_FAILURE_RETRY with close in recovery.
I missed one last time.

Bug: http://b/20501816
Change-Id: I9896ee2704237d61ee169f898680761e946e0a56
(cherry picked from commit b3ac676192)
2015-05-29 11:03:44 -07:00
Elliott Hughes 1441a9654f Merge "Really don't use TEMP_FAILURE_RETRY with close in recovery." 2015-05-29 18:02:57 +00:00
Sami Tolvanen 92eea1bc41 Handle BLKDISCARD failures
In the block updater, if BLKDISCARD fails, the error is silently
ignored and some of the blocks may not be erased. This means the
target partition will have inconsistent contents.

If the ioctl fails, return an error and abort the update.

Bug: 20614277
Change-Id: I33867ba9337c514de8ffae59f28584b285324067
(cherry picked from commit cc2428c818)
2015-05-29 09:02:14 +01:00
Tao Bao fe47833b09 am f827034f: am eec204be: am 74f5e0e0: Merge "Use f_bavail to calculate free space"
* commit 'f827034fe191b02fd25bd605cdb57816d023446a':
  Use f_bavail to calculate free space
2015-05-29 06:54:30 +00:00
Tao Bao f827034fe1 am eec204be: am 74f5e0e0: Merge "Use f_bavail to calculate free space"
* commit 'eec204be63ed115f6a8fec941224fad3d5b6a720':
  Use f_bavail to calculate free space
2015-05-29 06:41:07 +00:00
Tao Bao eec204be63 am 74f5e0e0: Merge "Use f_bavail to calculate free space"
* commit '74f5e0e09e16ba38d007fdc4aeede20129c817bc':
  Use f_bavail to calculate free space
2015-05-29 06:32:54 +00:00
Tao Bao 74f5e0e09e Merge "Use f_bavail to calculate free space" 2015-05-29 06:21:07 +00:00
Elliott Hughes b3ac676192 Really don't use TEMP_FAILURE_RETRY with close in recovery.
I missed one last time.

Bug: http://b/20501816
Change-Id: I9896ee2704237d61ee169f898680761e946e0a56
2015-05-28 23:06:17 -07:00
caozhiyuan 3b4977638f Use f_bavail to calculate free space
Failures are seen on devices with
Linux 3.10. And they are mainly due to this change:
https://lwn.net/Articles/546473/
The blocks reserved in this change is not the same thing as what we
think are reserved for common usage of root user. And this part is
included in free blocks but not in available blocks.

Change-Id: Ib29e12d775b86ef657c0af7fa7a944d2b1e12dc8
2015-05-29 13:32:49 +08:00
Tao Bao 921e3c3104 am 127ab1fc: resolved conflicts for merge of 158e11d6 to mnc-dev-plus-aosp
* commit '127ab1fc2d6eab382d4464bc1b5b6cbd30bbc6d1':
  Separate uncrypt into two modes
2015-05-29 01:23:55 +00:00
Tao Bao 127ab1fc2d resolved conflicts for merge of 158e11d6 to mnc-dev-plus-aosp
Change-Id: I164cdc4915b6ca1b623b206c0ccbb12e0fc3fa77
2015-05-28 16:25:37 -07:00
Tao Bao 158e11d673 Separate uncrypt into two modes
uncrypt needs to be triggered to prepare the OTA package before
rebooting into the recovery. Separate uncrypt into two modes. In
mode 1, it uncrypts the OTA package, but will not reboot the
device. In mode 2, it wipes the /misc partition and reboots.

Needs matching changes in frameworks/base, system/core and
external/sepolicy to work properly.

Bug: 20012567
Bug: 20949086
Change-Id: I14d25cb62770dd405cb56824d05d649c3a94f315
2015-05-28 14:44:52 -07:00
Sami Tolvanen dfcaf47351 am e938682e: am cd391c23: am aa4df5c4: Merge "Handle BLKDISCARD failures"
* commit 'e938682e0ed9bc326b940bba31dc0c8472e81848':
  Handle BLKDISCARD failures
2015-05-28 17:39:33 +00:00
Sami Tolvanen e938682e0e am cd391c23: am aa4df5c4: Merge "Handle BLKDISCARD failures"
* commit 'cd391c23882cfa876c06fdf26146469489f41e8b':
  Handle BLKDISCARD failures
2015-05-28 17:19:37 +00:00
Sami Tolvanen cd391c2388 am aa4df5c4: Merge "Handle BLKDISCARD failures"
* commit 'aa4df5c45b99438282db3a94cb7682c480e0eccd':
  Handle BLKDISCARD failures
2015-05-28 16:21:04 +00:00
Sami Tolvanen aa4df5c45b Merge "Handle BLKDISCARD failures" 2015-05-28 16:12:25 +00:00
Sami Tolvanen cc2428c818 Handle BLKDISCARD failures
In the block updater, if BLKDISCARD fails, the error is silently
ignored and some of the blocks may not be erased. This means the
target partition will have inconsistent contents.

If the ioctl fails, return an error and abort the update.

Bug: 20614277
Change-Id: I33867ba9337c514de8ffae59f28584b285324067
2015-05-28 09:09:02 +01:00
Tao Bao 0b78610085 am d026a28c: am 9a5e2a26: am f272b9e7: Merge "Clean up the sleep()\'s after poking init services"
* commit 'd026a28c22dfb15728b6db88d5b8e9b093de2fd7':
  Clean up the sleep()'s after poking init services
2015-05-28 00:09:06 +00:00
Tao Bao d026a28c22 am 9a5e2a26: am f272b9e7: Merge "Clean up the sleep()\'s after poking init services"
* commit '9a5e2a2611997d7803f079b8adb3535b6abc80fb':
  Clean up the sleep()'s after poking init services
2015-05-27 23:49:09 +00:00