Commit Graph

7902 Commits

Author SHA1 Message Date
Tao Bao cc849967ee Merge "recovery_ui: Remove redundant menu creation." am: 0ad3ec03e4 am: 9b57172706
am: 18de138abd

Change-Id: Ic584d1b5a8fb8cb29b439472d6ec945a582a7d46
2019-06-27 15:57:52 -07:00
Tao Bao 18de138abd Merge "recovery_ui: Remove redundant menu creation." am: 0ad3ec03e4
am: 9b57172706

Change-Id: Iafb11e2631ffb889c12293f82a9fce2af00e8f7c
2019-06-27 15:38:36 -07:00
Tao Bao 9b57172706 Merge "recovery_ui: Remove redundant menu creation."
am: 0ad3ec03e4

Change-Id: Ied20e2cb3b6eb91cc819242b3782cf2fd5021e83
2019-06-27 15:27:33 -07:00
Treehugger Robot 0ad3ec03e4 Merge "recovery_ui: Remove redundant menu creation." 2019-06-27 21:46:14 +00:00
Tao Bao fa8e02af7c recovery_ui: Remove redundant menu creation.
Test: Boot into recovery and "Run graphics test".
Change-Id: Icbf1c230b4af57cf32b3c7a4b30ddbabc21d5618
2019-06-27 09:07:51 -07:00
Tianjie Xu eaacfc1362 Merge "Implement updater runtime for dynamic partitions" am: db0a68e6b7 am: 3aaf87cf4e
am: a2a500381a

Change-Id: I9a82bd762e22a1bc6868084912b4d54217709429
2019-06-24 14:36:30 -07:00
Tianjie Xu a2a500381a Merge "Implement updater runtime for dynamic partitions" am: db0a68e6b7
am: 3aaf87cf4e

Change-Id: I66feb637884013458816bb89e766aedb39bef990
2019-06-24 14:32:30 -07:00
Tianjie Xu 3aaf87cf4e Merge "Implement updater runtime for dynamic partitions"
am: db0a68e6b7

Change-Id: I3de90cb6730b05cb1d238131a5d474e20d48890c
2019-06-24 14:28:55 -07:00
Treehugger Robot db0a68e6b7 Merge "Implement updater runtime for dynamic partitions" 2019-06-24 20:24:49 +00:00
Tianjie Xu d118833f3e Implement updater runtime for dynamic partitions
The simulator skips executing the operations for dynamic partitions, and
will use the logical images under target_files/IMAGES directly. (Similar
to the targets without DAP enabled)

Bug: 131911365
Test: run update on cuttlefish, run simulator
Change-Id: Id318d97ece4560df9f20dc5cabeb8b2e261bdf9c
2019-06-24 12:46:28 -07:00
Tao Bao c467b32bdb Merge "updater_sample: Build SystemUpdaterSample as non-privileged app by default." am: b87520077b am: b50f855396
am: 00d4092790

Change-Id: I46235b57a1845503698e280452b55a87e3d29842
2019-06-24 10:17:16 -07:00
Tao Bao 00d4092790 Merge "updater_sample: Build SystemUpdaterSample as non-privileged app by default." am: b87520077b
am: b50f855396

Change-Id: If1cc36794ce4dd4a14b6e1225c025305a95d793e
2019-06-24 09:24:31 -07:00
Tao Bao b50f855396 Merge "updater_sample: Build SystemUpdaterSample as non-privileged app by default."
am: b87520077b

Change-Id: I1098551642eda063cc2c0c19cc36ce10cbf58804
2019-06-24 08:57:34 -07:00
Treehugger Robot b87520077b Merge "updater_sample: Build SystemUpdaterSample as non-privileged app by default." 2019-06-24 15:41:27 +00:00
Tao Bao 061267eee9 updater_sample: Build SystemUpdaterSample as non-privileged app by default.
Prior to the change, SystemUpdaterSample was built as privileged app.
It must be installed along with the matching privapp-permissions
whitelist change (as noted in updater_sample/README.md), otherwise would
block device booting if installed unintentionally (e.g. with `mm` or
`mmma`).

This CL avoids putting the device in a bad state due to a sample app.

Fixes: 135703777
Test: `lunch aosp_taimen-userdebug && m -j installclean &&
          mmma -j bootable/recovery && m -j`
      Flash on device and boot successfully.
Test: Run the tests per instructions in updater_sample/README.md.
Change-Id: Ib8b587c77570f05f7db748fad84744fa45016aab
2019-06-21 12:10:36 -07:00
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