Commit Graph

7860 Commits

Author SHA1 Message Date
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 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 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 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
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 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 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
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 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 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 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 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 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 74b0f7cce0 Implement the TargetFile and BuildInfo
The TargetFile class parses a target-file and provides functions to read
its contents. And the BuildInfo tries to simulate the device with files
on host. Some work it does includes parsing the build properties,
and extracting the image files for partitions specified in the fstab.

Bug: 131911365
Test: unit tests pass, run simulator with cuttlefish, wear devices and from extracted TF.
Change-Id: Iefe4a96d619d2e4b3d038e31480f11a0f9a70afa
2019-05-31 17:55:36 -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