Commit Graph

1366 Commits

Author SHA1 Message Date
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 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 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
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 1441a9654f Merge "Really don't use TEMP_FAILURE_RETRY with close in recovery." 2015-05-29 18:02:57 +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
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 9a5e2a2611 am f272b9e7: Merge "Clean up the sleep()\'s after poking init services"
* commit 'f272b9e777de92f96b9298889bf145e40c5db2e3':
  Clean up the sleep()'s after poking init services
2015-05-27 23:35:47 +00:00
Tao Bao f272b9e777 Merge "Clean up the sleep()'s after poking init services" 2015-05-27 23:17:13 +00:00
Tao Bao 752386319c Clean up the sleep()'s after poking init services
Change-Id: I77564fe5c59e604f1377b278681b7d1bff53a77a
2015-05-27 14:48:56 -07:00
Tao Bao 7b126d77e8 am 73151b51: Merge "recovery: change the way of rebooting when using power key combo"
* commit '73151b5101c132091d5853dd635b3fc941f242dc':
  recovery: change the way of rebooting when using power key combo
2015-05-27 20:25:45 +00:00
Tao Bao 73151b5101 Merge "recovery: change the way of rebooting when using power key combo" 2015-05-27 19:28:21 +00:00
Nick Kralevich 6f6e5bb89b am 41928ce6: Merge "Revert "recovery: change the way of rebooting when using power key combo""
* commit '41928ce61da9b4e328f361f8295f83bd1149d430':
  Revert "recovery: change the way of rebooting when using power key combo"
2015-05-27 13:48:36 +00:00
Gaelle Nassiet e5ce2a5a10 recovery: change the way of rebooting when using power key combo
The power key combo allow to reboot from recovery mode by pressing
power button 7 times in a row. It calls directly the function
android_reboot() and lead to permission denial errors because of SE
Linux rules enforcement.
The right way to reboot from recovery is to set the property
"sys.powerctl" and let init handle it.

Change-Id: Ic7b81e446c3ee13dfbad10cda13a6a1f93123b76
Signed-off-by: Gaelle Nassiet <gaellex.nassiet@intel.com>
2015-05-27 15:47:44 +02:00
Nick Kralevich 41928ce61d Merge "Revert "recovery: change the way of rebooting when using power key combo"" 2015-05-27 13:37:04 +00:00
Nick Kralevich 4e92ba4009 Revert "recovery: change the way of rebooting when using power key combo"
code doesn't compile:

  bootable/recovery/ui.cpp: In member function 'void RecoveryUI::ProcessKey(int, int)':
  bootable/recovery/ui.cpp:177:60: error: 'property_set' was not declared in this scope
                   property_set(ANDROID_RB_PROPERTY, "reboot,");
                                                            ^
  make: ***   [out/target/product/generic/obj/EXECUTABLES/recovery_intermediates/ui.o] Error 1

This reverts commit 074c1c2312.

Change-Id: I3e0a24279e202df29308ce41eaacc86bfde89e5a
2015-05-27 13:35:46 +00:00
Nick Kralevich 6d1d7ffa05 am b48bdbed: Merge "recovery: change the way of rebooting when using power key combo"
* commit 'b48bdbeda03af04ec8e0d52f6af680a9062eb916':
  recovery: change the way of rebooting when using power key combo
2015-05-27 13:19:10 +00:00
Nick Kralevich b48bdbeda0 Merge "recovery: change the way of rebooting when using power key combo" 2015-05-27 13:09:03 +00:00
Gaelle Nassiet 074c1c2312 recovery: change the way of rebooting when using power key combo
The power key combo allow to reboot from recovery mode by pressing
power button 7 times in a row. It calls directly the function
android_reboot() and lead to permission denial errors because of SE
Linux rules enforcement.
The right way to reboot from recovery is to set the property
"sys.powerctl" and let init handle it.

Change-Id: I5a6c3c49b27cef305815cef96da729390e19c9bc
Signed-off-by: Gaelle Nassiet <gaellex.nassiet@intel.com>
2015-05-27 15:03:06 +02:00
Dan Albert 0b1d15742f am a8cd96ad: Merge "Stop using libstdc++."
* commit 'a8cd96adeeb530eda74e435e626900a3a76844a7':
  Stop using libstdc++.
2015-05-20 20:54:49 +00:00
Dan Albert a8cd96adee Merge "Stop using libstdc++." 2015-05-20 20:39:57 +00:00
Dan Albert e49a9e527a Stop using libstdc++.
These are already getting libc++, so it isn't necessary. If any of the
other static libraries (such as adb) use new or delete from libc++,
there will be symbol collisions.

Change-Id: I55e43ec60006d3c2403122fa1174bde06f18e09f
2015-05-19 11:33:18 -07:00
Sami Tolvanen 6dc1e6a6ef am 6253753a: Merge "Add error and range checks to parse_range"
* commit '6253753ab9b8c8912f31aeb5cc2877a856ecfe82':
  Add error and range checks to parse_range
2015-05-18 08:38:44 +00:00
Sami Tolvanen 6253753ab9 Merge "Add error and range checks to parse_range" 2015-05-18 08:08:54 +00:00
Elliott Hughes 09050fc92e am cd7d9d83: Merge "Don\'t use TEMP_FAILURE_RETRY on close in recovery."
* commit 'cd7d9d8374f45c7e2eb14d8dbabf3cf7c221a5b8':
  Don't use TEMP_FAILURE_RETRY on close in recovery.
2015-05-16 01:17:48 +00:00
Elliott Hughes cd7d9d8374 Merge "Don't use TEMP_FAILURE_RETRY on close in recovery." 2015-05-16 01:08:55 +00:00
Elliott Hughes b47afedb42 Don't use TEMP_FAILURE_RETRY on close in recovery.
Bug: http://b/20501816
Change-Id: I35efcd8dcec7a6492ba70602d380d9980cdda31f
2015-05-15 16:19:20 -07:00
Sami Tolvanen f2bac04e1b Add error and range checks to parse_range
Only trusted input is passed to parse_range, but check for invalid
input to catch possible problems in transfer lists.

Bug: 21033983
Bug: 21034030
Bug: 21034172
Bug: 21034406
Change-Id: Ia17537a2d23d5f701522fbc42ed38924e1ee3366
2015-05-15 18:48:28 +01:00
Elliott Hughes 5bb8d55180 am 3badd563: Merge "init sets the default PATH itself, better."
* commit '3badd56326422a79b5b09a98fc0282d915cf5e32':
  init sets the default PATH itself, better.
2015-05-12 21:52:40 +00:00
Elliott Hughes 3badd56326 Merge "init sets the default PATH itself, better." 2015-05-12 21:43:15 +00:00
Elliott Hughes 4fd3446b4e init sets the default PATH itself, better.
This fixes 'su' and 'strace' in the recovery image.

Change-Id: I83c2664d32a15da92bb6092fbdfc772184013c88
2015-05-12 14:35:31 -07:00
Dan Albert cfe46542e4 am 3128176e: Merge "Fix build following adb change."
* commit '3128176e7d8f5cee4afdff3b5fdcadbe66ef97af':
  Fix build following adb change.
2015-05-08 18:03:40 +00:00
Dan Albert 3128176e7d Merge "Fix build following adb change." 2015-05-08 17:51:23 +00:00
Dan Albert cc08a90cab Fix build following adb change.
Change-Id: I2e0fb7e880e205b0bca324ff53ffdb5df9e34baf
2015-05-08 10:50:54 -07:00
Elliott Hughes 3257155e89 am 77a2c883: Merge "Add an alternate screen for viewing recovery logs."
* commit '77a2c8839f2de5947184605815015bc2696c3207':
  Add an alternate screen for viewing recovery logs.
2015-05-07 04:25:56 +00:00
Elliott Hughes 77a2c8839f Merge "Add an alternate screen for viewing recovery logs." 2015-05-07 04:17:46 +00:00