Commit Graph

7887 Commits

Author SHA1 Message Date
Tianjie Xu fe52eb7869 Merge "Support starting fuse from a block map" am: 090b62832f am: b96f2bf618
am: a51a41101a

Change-Id: I0e71e89b2cf9d81fe30db5666e5dfec4282fb221
2019-06-21 10:59:16 -07:00
Tianjie Xu a51a41101a Merge "Support starting fuse from a block map" am: 090b62832f
am: b96f2bf618

Change-Id: I2a201ebe2a2bdcdfac1a2ffbf8c948b9df1b8c76
2019-06-21 10:51:22 -07:00
Tianjie Xu b96f2bf618 Merge "Support starting fuse from a block map"
am: 090b62832f

Change-Id: I7f90b15d7ab0cf00b66ac242954490112cbd661d
2019-06-21 10:41:10 -07:00
Tianjie Xu 090b62832f Merge "Support starting fuse from a block map" 2019-06-21 17:14:10 +00:00
Tianjie Xu e63ebce76d Merge "Implement the TargetFile and BuildInfo" am: 9b76970e9a am: 75c4b32e3a
am: 252f3d3392

Change-Id: Ic1ac9fbe30b125271c48d14db60e50b3cc15293b
2019-06-20 17:40:07 -07:00
Tianjie Xu 252f3d3392 Merge "Implement the TargetFile and BuildInfo" am: 9b76970e9a
am: 75c4b32e3a

Change-Id: I2eec826e00d4a9fbe2660c76d49d78be886406c8
2019-06-20 17:29:04 -07:00
Tianjie Xu 75c4b32e3a Merge "Implement the TargetFile and BuildInfo"
am: 9b76970e9a

Change-Id: I2d188eae7305bb82c7407bcbb04282b65768dde1
2019-06-20 17:17:56 -07:00
Tianjie Xu 9b76970e9a Merge "Implement the TargetFile and BuildInfo" 2019-06-20 22:39:42 +00:00
Tianjie Xu f6158eb918 Support starting fuse from a block map
Factor out a new function from ApplyFromSdcard that installs a package
from a local path. Inside this function, we start the fuse and choose the
type of data provider depending on the path string. And similar to the
existing logic, we treat the package as a block map if the path starts
with a '@'.

This is part of the effort to install larger than 2GiB packages on ILP32
devices.

Bug: 127071893
Test: Build a 32 bit sailfish and create a 3GiB OTA package. Sideload
the package, uncrypt and install the package from sdcard.

Change-Id: I328ea34fa530731acbce7554bfc3059313ad6ece
2019-06-20 13:53:40 -07:00
Android Build Merger (Role) 3e11398da0 Merge "Revert "libprocessgroup users use libcutils" am: cdbd84de26 am: 81e341f224" into qt-r1-dev-plus-aosp 2019-06-19 06:06:23 +00:00
Zhijun He 7226135d9a Revert "libprocessgroup users use libcutils" am: cdbd84de26
am: 2b40105c43

Change-Id: Id10eb470b897d8dcd4442716a29c6522b084294d
2019-06-18 23:04:03 -07:00
Zhijun He 2312849a7e Revert "libprocessgroup users use libcutils" am: cdbd84de26
am: 81e341f224

Change-Id: I7c6a47d1116cca31da994635a764ad6c486f96cc
2019-06-18 23:02:06 -07:00
Zhijun He 2b40105c43 Revert "libprocessgroup users use libcutils"
am: cdbd84de26

Change-Id: I83e2eb9e4961141389d7c8d90fd70363985b9855
2019-06-18 22:50:40 -07:00
Zhijun He 81e341f224 Revert "libprocessgroup users use libcutils"
am: cdbd84de26

Change-Id: Ie511de7ec122730be63bca07eb4f3eda9bff266b
2019-06-18 22:50:33 -07:00
Zhijun He cdbd84de26 Revert "libprocessgroup users use libcutils"
This reverts commit 46ec20b692.

Reason for revert: breaks all camera use cases

Bug: 135568875
Change-Id: I86747c0df5489f80d1966dd07669637597fb2b00
2019-06-19 04:44:04 +00:00
Steven Moreland b671af8de0 libprocessgroup users use libcutils am: 46ec20b692
am: 60f68c7862

Change-Id: I2eb4c4a485861f93579483d4dc2322346cc319cf
2019-06-18 17:20:38 -07:00
Steven Moreland e9520c1057 libprocessgroup users use libcutils am: 46ec20b692
am: f1532a9655

Change-Id: I96e90a97c66bd2c625d3aa84e4b9c05ff92a5190
2019-06-18 17:17:16 -07:00
Steven Moreland f1532a9655 libprocessgroup users use libcutils
am: 46ec20b692

Change-Id: I39a19e98437e210aa14bee4f03c1c69e8f2faa34
2019-06-18 16:48:47 -07:00
Steven Moreland 60f68c7862 libprocessgroup users use libcutils
am: 46ec20b692

Change-Id: If70f26c1294fb892eb517e945a76a120b7b4c324
2019-06-18 16:48:39 -07:00
Steven Moreland 46ec20b692 libprocessgroup users use libcutils
libprocessgroup symbols are being moved into libcutils in order to
optimize linking/memory usage. libprocessgroup will no longer be
required in the future (however removing references to it will come
separately).

Since libcutils is used statically here, the dependencies of
libprocessgroup need to be explicitly listed.

Bug: 135145426
Test: boot
Change-Id: I91c082f0fa2f5f5c52751065cd5f50f5cb965b23
2019-06-18 16:25:23 +00:00
Tianjie Xu 9951cd77ce Merge "InstallPackage now takes a package as parameter" am: 87e2275970 am: a927a16841
am: f7498516ca

Change-Id: I904eb7a84395e676f5ec4bddcdc393949524774f
2019-06-13 20:45:17 -07:00
Tianjie Xu f7498516ca Merge "InstallPackage now takes a package as parameter" am: 87e2275970
am: a927a16841

Change-Id: If7c3d8d99bfba0490f2717aef3cedc2cafef4e1a
2019-06-13 19:34:47 -07:00
Tianjie Xu a927a16841 Merge "InstallPackage now takes a package as parameter"
am: 87e2275970

Change-Id: I0ab60eb96946d57f681e9ee2dac87019c57eac5f
2019-06-13 18:47:45 -07:00
Tianjie Xu 87e2275970 Merge "InstallPackage now takes a package as parameter" 2019-06-14 00:24:49 +00:00
Elliott Hughes 18ff27119d Merge "Use the new ziparchive Next std::string_view overload." am: 053ea111a7 am: a3211f0ecb
am: e242d87430

Change-Id: I8ff8cb1640f86224395570d84f68c16b4c2c4618
2019-06-13 13:42:14 -07:00
Tianjie Xu 980f92ec00 InstallPackage now takes a package as parameter
Therefore InstallPackage() doesn't need to worry about the details of a
given Package.

Bug: 127071893
Test: run update from /bin/recovery --update_package=@path, sideload a package
Change-Id: I0caa36785b43924f884ee398e7ea640d7472a92e
2019-06-13 13:36:56 -07:00
Elliott Hughes e242d87430 Merge "Use the new ziparchive Next std::string_view overload." am: 053ea111a7
am: a3211f0ecb

Change-Id: Idfd053e738ab840c4bbdee3b469cbaaa94143c2f
2019-06-13 13:26:27 -07:00
Elliott Hughes a3211f0ecb Merge "Use the new ziparchive Next std::string_view overload."
am: 053ea111a7

Change-Id: I9a7074ffe49d0dd9f81cadc35c74d2dd946e586a
2019-06-13 13:18:28 -07:00
Elliott Hughes 053ea111a7 Merge "Use the new ziparchive Next std::string_view overload." 2019-06-13 19:59:18 +00:00
Zhang, GaofengX 90ced9877c Merge "Avoid key_queue_mutex deadlock in waitkey()" am: eb33356544 am: 6a550f518e
am: 7d453edf34

Change-Id: I32845dfaddb1bdfea68f0861c0d37b478d84a9e7
2019-06-12 17:32:53 -07:00
Zhang, GaofengX 7d453edf34 Merge "Avoid key_queue_mutex deadlock in waitkey()" am: eb33356544
am: 6a550f518e

Change-Id: Id3f87e0a660fbbb9cc87b653c2c894d3b6132eaf
2019-06-12 17:25:25 -07:00
Zhang, GaofengX 6a550f518e Merge "Avoid key_queue_mutex deadlock in waitkey()"
am: eb33356544

Change-Id: I77a49758aefeb521cab18aa66942fa80f6752135
2019-06-12 17:19:43 -07:00
Treehugger Robot eb33356544 Merge "Avoid key_queue_mutex deadlock in waitkey()" 2019-06-13 00:01:49 +00:00
Elliott Hughes 39ac1c013c Use the new ziparchive Next std::string_view overload.
Bug: http://b/129068177
Test: treehugger
Change-Id: Ieec83126e36b330da33092a172e365376cd04dfe
2019-06-12 12:20:37 -07:00
Zhang, GaofengX 852d9fec6d Avoid key_queue_mutex deadlock in waitkey()
Waitkey() is designed to obtain lock "key_queue_mutex" in
the very beginning of function.

  int RecoveryUI::WaitKey() {
    std::unique_lock<std::mutex> lk(key_queue_mutex);
    ...
  }

However, there's case "key_queue_mutex" being applied again in
waitkey(), thus cause deadlock. There are two reproduce
scenario:
1.Executing "fastboot reboot recovery" in userspace
  fastboot
2.Executing "adb reboot fastboot" in recovery os

When entering userspace fastboot/recovery, waitkey()
will wait there for user action. fastboot/adb commands
will trigger ui->interruptkey() to notify the thread
waitkey() in. In the next, waitkey() will move on and call
SetScreenSaveState(), which do LOG(ERROR) in fail case of
brightness set. LOG(ERROR) is designed to print log on
UI. Unfortunately, UI->print() applies lock "key_queue_mutex"
too, so deadlock happen.

Note:
Here is details how lock "key_queue_mutex" applied in
UI->print():
Function Print() call
   Function PrintV() call
      Function update_screen_locked() call
         Function draw_screen_locked() call
            Function draw_menu_and_test_buffer_locked() call
               Function IsLongPress()

  bool RecoveryUI::IsLongPress() {
    std::lock_guard<std::mutex> lg(key_queue_mutex);
    bool result = key_long_press;
    return result;
  }

Bug: 135078366
Test: no errors when running "fastboot reboot recovery" in userspace
      fastboot & "adb reboot fastboot" in recovery os

Change-Id: Ida6b3c4ba9896a70021373f02a94954f0a60cf31
Signed-off-by: Zhang, GaofengX <gaofengx.zhang@intel.com>
Signed-off-by: Xihua Chen <xihua.chen@intel.com>
2019-06-12 14:48:37 +08:00
Tao Bao e3a45f93ab [automerger skipped] minadbd: adb rescue getprop returns newline-terminated result.
am: e3cc180d31 -s ours
am skip reason: change_id I5af47f8ea4d569b8507e259daef87749c0945f47 with SHA1 57a27890ce is in history

Change-Id: I6e660702e7a7880bf709777bce1423e1ab9c145e
2019-06-11 15:49:52 -07:00
Tao Bao e3cc180d31 minadbd: adb rescue getprop returns newline-terminated result.
This change addresses the comment in [1], which makes the results of
`adb shell getprop foo` and `adb rescue getprop foo` more consistent.
That is, both will return newline-terminated results now.

[1] https://r.android.com/c/platform/bootable/recovery/+/976340/3/minadbd/minadbd_services.cpp#188

Fixes: 134027350
Test: Run the following commands on taimen (under rescue mode):
    `adb rescue getprop ro.build.fingerprint`
    `adb rescue getprop ro.nonexistent`
    `adb rescue getprop`
Change-Id: I5af47f8ea4d569b8507e259daef87749c0945f47
Merged-In: I5af47f8ea4d569b8507e259daef87749c0945f47
(cherry picked from commit 57a27890ce)
2019-06-11 12:55:34 -07:00
Tao Bao fe097f0253 [automerger skipped] minadbd: Support adb rescue getprop.
am: 5359d777e6 -s ours
am skip reason: change_id Ic0864ca0fb51505ec1e4f38af2464591aa576201 with SHA1 d8db81a014 is in history

Change-Id: I2c4e8c7af45c56315d9a7e0637813862a9c066b3
2019-06-11 12:03:18 -07:00
Tao Bao da1b196145 [automerger skipped] minadbd: More allowed properties.
am: 7a31ab675e -s ours
am skip reason: change_id Id4667fcaf0e908c391085b22e22c957acd01d9c4 with SHA1 3b9ef341be is in history

Change-Id: Ide33c9019fd42d5d44601f6517db945e8e1514ad
2019-06-11 12:03:13 -07:00
Tao Bao c6b382bd09 Merge "minadbd: adb rescue getprop returns newline-terminated result." am: cb930939a4 am: d401ed099e
am: 4721ced095

Change-Id: I07ad9075ef536532477091672d72f2b98f191e80
2019-06-10 17:31:07 -07:00
Tao Bao 4721ced095 Merge "minadbd: adb rescue getprop returns newline-terminated result." am: cb930939a4
am: d401ed099e

Change-Id: I6dee78abeb9ae1fb07e3809a2acc4c4d6ad31fff
2019-06-10 17:27:56 -07:00
Tao Bao d401ed099e Merge "minadbd: adb rescue getprop returns newline-terminated result."
am: cb930939a4

Change-Id: Ie2a79b2d6254e11f2e419e6fcd799e271a4ebc6a
2019-06-10 17:22:04 -07:00
Tao Bao cb930939a4 Merge "minadbd: adb rescue getprop returns newline-terminated result." 2019-06-10 23:43:09 +00:00
Tao Bao 57a27890ce minadbd: adb rescue getprop returns newline-terminated result.
This change addresses the comment in [1], which makes the results of
`adb shell getprop foo` and `adb rescue getprop foo` more consistent.
That is, both will return newline-terminated results now.

[1] https://r.android.com/c/platform/bootable/recovery/+/976340/3/minadbd/minadbd_services.cpp#188

Test: Run the following commands on taimen (under rescue mode):
    `adb rescue getprop ro.build.fingerprint`
    `adb rescue getprop ro.nonexistent`
    `adb rescue getprop`
Change-Id: I5af47f8ea4d569b8507e259daef87749c0945f47
2019-06-10 13:08:03 -07:00
Tao Bao 5359d777e6 minadbd: Support adb rescue getprop.
It dumps all the allowed properties, similar to `adb shell getprop`.

Bug: 134027350
Test: Run the command under rescue mode.
Change-Id: Ic0864ca0fb51505ec1e4f38af2464591aa576201
Merged-In: Ic0864ca0fb51505ec1e4f38af2464591aa576201
(cherry picked from commit d8db81a014)
2019-06-05 23:28:25 -07:00
Tao Bao 7a31ab675e minadbd: More allowed properties.
Most of these properties are already part of the fingerprint. This CL
allows querying them directly, instead of encouraging users to decode
from fingerprints.

Bug: 134027350
Test: Boot into rescue mode on taimen. Run `adb rescue getprop` with new
      props.
Change-Id: Id4667fcaf0e908c391085b22e22c957acd01d9c4
Merged-In: Id4667fcaf0e908c391085b22e22c957acd01d9c4
(cherry picked from commit 3b9ef341be)
2019-06-05 23:28:10 -07:00
Tao Bao dc51048181 Merge "minadbd: Support adb rescue getprop." am: 533a12c71e am: 0d00c1bf12
am: 024b53abe3

Change-Id: Ie3a7543b5fe48b80566b02dcd760173f799fb9bc
2019-06-05 14:18:52 -07:00
Tao Bao 024b53abe3 Merge "minadbd: Support adb rescue getprop." am: 533a12c71e
am: 0d00c1bf12

Change-Id: I124c643a9aff253e65c5ad81c5f941d6bc697e40
2019-06-05 14:13:00 -07:00
Tao Bao 0d00c1bf12 Merge "minadbd: Support adb rescue getprop."
am: 533a12c71e

Change-Id: Iea0f637a9c1a19d2e2d1edd68c0a86d482ce506a
2019-06-05 14:05:42 -07:00
Tao Bao 533a12c71e Merge "minadbd: Support adb rescue getprop." 2019-06-05 20:43:55 +00:00