Commit Graph

7929 Commits

Author SHA1 Message Date
Zhang, GaofengX 1285390323 Merge "Avoid key_queue_mutex deadlock in waitkey()" am: eb33356544 am: 6a550f518e am: 7d453edf34
am: 90ced9877c

Change-Id: I5f8b6cc3f4801f14dfc45b15fdc2d10b05b1a2fe
2019-06-12 18:01:16 -07: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
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 f13f3bdaff [automerger skipped] minadbd: adb rescue getprop returns newline-terminated result. am: e3cc180d31 -s ours
am: e3a45f93ab -s ours
am skip reason: change_id I5af47f8ea4d569b8507e259daef87749c0945f47 with SHA1 57a27890ce is in history

Change-Id: Ic0709af5e24a965e1e076f6c99aaab01e6d4f033
2019-06-11 15:58:02 -07: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 a431f30259 [automerger skipped] minadbd: Support adb rescue getprop. am: 5359d777e6 -s ours
am: fe097f0253 -s ours
am skip reason: change_id Ic0864ca0fb51505ec1e4f38af2464591aa576201 with SHA1 d8db81a014 is in history

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

Change-Id: I368ff9c2d3da5e0b4d24de42c9f48969a1dce015
2019-06-11 12:08:14 -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 860448ffec Merge "minadbd: adb rescue getprop returns newline-terminated result." am: cb930939a4 am: d401ed099e am: 4721ced095
am: c6b382bd09

Change-Id: If8c606108f20e1552640281e083d72d43b5ea984
2019-06-10 17:52:27 -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 7ba4739546 Merge "minadbd: Support adb rescue getprop." am: 533a12c71e am: 0d00c1bf12 am: 024b53abe3
am: dc51048181

Change-Id: I843bb6771692c61b36b15570a8c9f8c7fe8f9e53
2019-06-05 14:23:49 -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
Tao Bao 1182bcdc66 Merge "minadbd: More allowed properties." am: 1ef7f92871 am: 6c37304201 am: 9b2cfec8dd
am: 5726cbc184

Change-Id: I3b0a12a7d7eb19112a8049dadc2c3d563feddbaf
2019-06-04 20:59:04 -07:00
Tao Bao 5726cbc184 Merge "minadbd: More allowed properties." am: 1ef7f92871 am: 6c37304201
am: 9b2cfec8dd

Change-Id: I9f8a5adacd97e02a893924b8d450ac994df37015
2019-06-04 19:56:00 -07:00
Tao Bao 9b2cfec8dd Merge "minadbd: More allowed properties." am: 1ef7f92871
am: 6c37304201

Change-Id: I8295063fd81b0cdc7625410c1482c9bab538ebbc
2019-06-04 19:30:29 -07:00
Tao Bao 6c37304201 Merge "minadbd: More allowed properties."
am: 1ef7f92871

Change-Id: I2e663ae4d334f40bf688b70630ad823c1eb92444
2019-06-04 17:53:25 -07:00
Tao Bao d8db81a014 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
2019-06-04 15:09:41 -07:00
Tao Bao 1ef7f92871 Merge "minadbd: More allowed properties." 2019-06-04 22:01:36 +00:00
Paul Duffin 334fd5f2b1 Merge "Use icu4j instead of its deprecated legacy alias icu4j-host" am: 14bc5e1feb am: af4d1dda03 am: 2f8626c3f7
am: 8b733c3e84

Change-Id: I2377549c690dd10572f828457f44522b3951f77b
2019-06-04 03:02:00 -07:00
Paul Duffin 8b733c3e84 Merge "Use icu4j instead of its deprecated legacy alias icu4j-host" am: 14bc5e1feb am: af4d1dda03
am: 2f8626c3f7

Change-Id: Ide1d3e178054a2dbd87fc9d3dac0bd14ef519a85
2019-06-04 02:49:59 -07:00
Paul Duffin 2f8626c3f7 Merge "Use icu4j instead of its deprecated legacy alias icu4j-host" am: 14bc5e1feb
am: af4d1dda03

Change-Id: I4e11f19fa992ea7b8cc23437a041edf709356d39
2019-06-04 02:44:46 -07:00
Paul Duffin af4d1dda03 Merge "Use icu4j instead of its deprecated legacy alias icu4j-host"
am: 14bc5e1feb

Change-Id: Ic7dd97abecd668ee087c37a2130360bf44dbbe02
2019-06-04 02:38:27 -07:00
Paul Duffin 14bc5e1feb Merge "Use icu4j instead of its deprecated legacy alias icu4j-host" 2019-06-04 09:24:01 +00:00
Tao Bao 3b9ef341be 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
2019-06-03 12:14:18 -07:00
Paul Duffin eb586b7baf Use icu4j instead of its deprecated legacy alias icu4j-host
Bug: 134379140
Test: m droid
Change-Id: I71c2ac392361b3c6dfa693194c05116422335e55
2019-06-03 16:14:35 +01:00
Tianjie Xu 1e28fd0bc2 Merge "Disable building simulator for mac" am: f3dd821f76 am: 3489b274d0 am: b93dc08bc6
am: 0f379730f2

Change-Id: I8cd1a622d26916a79d70a79855caa3b2c2427640
2019-05-30 14:58:31 -07:00
Tianjie Xu 0f379730f2 Merge "Disable building simulator for mac" am: f3dd821f76 am: 3489b274d0
am: b93dc08bc6

Change-Id: I1b191e246349299a381ee5cec9bf15fad99bea5c
2019-05-30 14:28:26 -07:00
Tianjie Xu b93dc08bc6 Merge "Disable building simulator for mac" am: f3dd821f76
am: 3489b274d0

Change-Id: Idfe10693ecc07e4721bf32e1a7a914feb69f2dec
2019-05-30 14:17:05 -07:00
Tianjie Xu 3489b274d0 Merge "Disable building simulator for mac"
am: f3dd821f76

Change-Id: Iccdde0099a51184fce6f86f9b7ad3f62ce33b36e
2019-05-30 14:08:32 -07:00
Treehugger Robot f3dd821f76 Merge "Disable building simulator for mac" 2019-05-30 20:45:28 +00:00
Tianjie Xu 76e165d143 Disable building simulator for mac
Disable building the simulator and its support libraries to resolve the breakage
on mac host targets. Because the simulator is not intended to use on mac anyway.

Bug: 134047992
Test: mma
Change-Id: I488ab50cab1282f03250010b5334f1895d44f98b
2019-05-30 10:49:18 -07:00
Tianjie Xu 96fa6831f4 Merge "Implement an update simulator to verify BB OTA packages on host" am: 65d7d5b8cf am: 29d9d7bbbe am: 55e82e2fc5
am: 36ca5abd94

Change-Id: Ia4e28377354bc96256ff24c6de8a853f3d4442e7
2019-05-29 11:18:30 -07:00
Tianjie Xu 36ca5abd94 Merge "Implement an update simulator to verify BB OTA packages on host" am: 65d7d5b8cf am: 29d9d7bbbe
am: 55e82e2fc5

Change-Id: I67b8152c41b2e92a67f935488f631bff7f5cf6ee
2019-05-29 10:48:39 -07:00
Tianjie Xu 55e82e2fc5 Merge "Implement an update simulator to verify BB OTA packages on host" am: 65d7d5b8cf
am: 29d9d7bbbe

Change-Id: Id0152ae0ef3b12501e67e9f3404bd2a379b79c7e
2019-05-29 10:44:17 -07:00
Tianjie Xu 29d9d7bbbe Merge "Implement an update simulator to verify BB OTA packages on host"
am: 65d7d5b8cf

Change-Id: Ie3d3af1442c75563c10a9c6c2991426f1054305d
2019-05-29 10:37:34 -07:00
Tianjie Xu 65d7d5b8cf Merge "Implement an update simulator to verify BB OTA packages on host" 2019-05-29 17:20:36 +00:00