Commit Graph

7911 Commits

Author SHA1 Message Date
Tianjie Xu 79e4e39be6 Merge "Drop the device specific support for update host simulator"
am: fc2ad88770

Change-Id: I2d0b32a139ac02952e1c365849b2036d74fad1bf
2019-07-14 16:13:05 -07:00
Tianjie Xu fc2ad88770 Merge "Drop the device specific support for update host simulator" 2019-07-14 22:49:59 +00:00
David Anderson d3d51e5066 Merge "Fix build for API change to DestroyLogicalPartition()."
am: 4c8e6eae28

Change-Id: Ifdc9b9560114d89c53ba99e5dc360769e157cdab
2019-07-13 11:18:02 -07:00
David Anderson 4c8e6eae28 Merge "Fix build for API change to DestroyLogicalPartition()." 2019-07-13 18:02:05 +00:00
Tianjie Xu b42281a423 Drop the device specific support for update host simulator
The device specific libs prevent us from building an universal simulator to add
to the otatools. Drop the support since there is currently no active users of the
simulator extension; plus we will unlikely to implement the device specific simulator
runtime.

As a alternation, we will add the commandline arguments to skip certain unsupported
functions, and move the simulator build to the bp file.

Bug: 131911365
Test: mma
Change-Id: I3ff0f45dbebe3ed72d5f4670a869b40e6cfd5a7c
2019-07-12 11:55:59 -07:00
Tianjie Xu 36385bd9ee Merge "Remove libimgpatch"
am: ed96da6664

Change-Id: Id263dad2ce56b5268af5e65ee8d1cc55d2967e56
2019-07-10 18:04:27 -07:00
Treehugger Robot ed96da6664 Merge "Remove libimgpatch" 2019-07-11 00:38:02 +00:00
Tao Bao d9ec0bbd06 Merge "minadbd sends heartbeat to rescue service for getprop command."
am: 89cc79cbb6

Change-Id: Ia150b81bbb224db0fd6293d6a95bcc788e62cc49
2019-07-10 13:49:01 -07:00
Tianjie Xu e99f4e88a2 Merge "Add a new key_pressed_mutex"
am: 33bb113af2

Change-Id: Ic9de2f770616aade4de13061b38540ed480f73f6
2019-07-10 13:48:44 -07:00
Tianjie Xu 0c666e3d5d Merge "Create a fallback to install from fuse if mmap fails"
am: 5f408dd48a

Change-Id: Ie8a54863426bb3558600b96c2ef7338eb0171cd3
2019-07-10 13:41:30 -07:00
Tao Bao 89cc79cbb6 Merge "minadbd sends heartbeat to rescue service for getprop command." 2019-07-10 19:52:44 +00:00
Tianjie Xu 45c40ec876 Remove libimgpatch
Stop building libimgpatch as it's merely a subset of libapplypatch.

Test: unit tests pass

Change-Id: I0735ec053344404434a50e53a36e3f55964c2e4f
2019-07-10 12:41:45 -07:00
Tianjie Xu 33bb113af2 Merge "Add a new key_pressed_mutex" 2019-07-10 17:46:27 +00:00
Tianjie Xu 5f408dd48a Merge "Create a fallback to install from fuse if mmap fails" 2019-07-10 17:40:37 +00:00
Justin Yun 29adb8f0f2 Merge "Change the symlink to system_ext"
am: c992962503

Change-Id: I3dcd6e9acd6d661eea7c20fbd362761fd7a5011e
2019-07-09 22:05:14 -07:00
Treehugger Robot c992962503 Merge "Change the symlink to system_ext" 2019-07-10 04:39:52 +00:00
Tianjie Xu b8a959b00f Add a new key_pressed_mutex
The following variables in recovery ui were protected by
key_queue_mutex. But the purpose of key_queue_mutex is to protect the
key_queue, which will be changed after we already have a key code. So
getting the key pressed should be orthogonal to the key queue. And
adding a mutex will help to avoid deadlocks in b/135078366.

Variables include:
  char key_pressed[KEY_MAX + 1];
  int key_last_down;
  bool key_long_press;
  int key_down_count;
  bool enable_reboot;

Bug: 135078366
Test: boot into recovery and press keys
Change-Id: Ie2cfcf1f2fec49b53f8fac97aa9a2c60f15b84f9
2019-07-09 16:47:07 -07:00
Justin Yun ea3c4a4948 Change the symlink to system_ext
As system_ext partition will be linked to system/system_ext, update
the path to system/system_ext.

Bug: 134359158
Test: build
Change-Id: I5a49adfe7e045e24bf6dfbf6990a965b8a5e1ce1
2019-07-09 23:33:26 +00:00
Tao Bao 4324e07a29 Merge "recovery_ui: Remove RecoveryUI::last_key."
am: 04b4ff695d

Change-Id: If9f78bd849948a80eaadfbfedc81c4ee3d94ff05
2019-07-09 16:27:30 -07:00
Tao Bao 04b4ff695d Merge "recovery_ui: Remove RecoveryUI::last_key." 2019-07-09 22:04:33 +00:00
Tianjie Xu e521861508 Create a fallback to install from fuse if mmap fails
We may fail to memory map the package on 32 bit builds for packages with
2GiB+ size. This cl tries to install the package with fuse when memory map
fails in such cases.

Bug: 127071893
Test: build 32 bit version sailfish, push package and block.map, reboot into recovery with
the corresponding update_package argument.

Change-Id: I5dae4f3e27ccaf8d64ff3657d36f0e75db2330b0
2019-07-09 14:15:18 -07:00
Josh Gao 32aeca8e78 Merge "minadbd: delete unnecessary fdevent.h include."
am: e1701454b2

Change-Id: Iaca242da9406d1d30e8e9ec4b7958bc11485e9d8
2019-07-09 13:34:38 -07:00
Josh Gao e1701454b2 Merge "minadbd: delete unnecessary fdevent.h include." 2019-07-09 20:02:29 +00:00
Tao Bao 1df3ce7ea8 recovery_ui: Remove RecoveryUI::last_key.
It's a private member, and the last user has been removed in [1] in
2015.

[1] commit ec28340cf3,
https://android-review.googlesource.com/c/platform/bootable/recovery/+/146330

Test: mmma -j bootable/recovery
Change-Id: I65a2370cb20a7b296888425a44a42c8b90abc766
2019-07-09 11:21:18 -07:00
Tao Bao 2223e6a9f8 minadbd sends heartbeat to rescue service for getprop command.
We start minadbd and rescue services in two processes. In particular,
minadbd handles the requests from host, then communicates with rescue
service to do install/wipe works. When resuce service doesn't see any
request in a pre-defined timeout (currently 300s), rescue service will
exit to avoid endless waiting.

This CL changes minadbd to additionally send a no-op command to rescue
service as a heartbeat signal, so that host side can finish
time-consuming operations (e.g. downloading over network) while keeping
rescue service alive.

Bug: 136457446
Test: Enter resuce mode on blueline. Send `adb rescue getprop
      ro.build.fingerprint` and check that rescue service doesn't exit.
Test: Stop sending the getprop command. Check that rescue service exits
      after 300s.
Change-Id: Ib9d5ed710cfa94ecfe6cf393a71a0b67b2539531
2019-07-09 11:09:34 -07:00
Robin Lee 254e5c940b Merge "Add a GetMappedPackageLength to Updater"
am: 5135d1f095

Change-Id: I8368d36e84ba29f5f0bc88e89bcb606932d47a7a
2019-07-08 17:11:35 -07:00
Treehugger Robot 5135d1f095 Merge "Add a GetMappedPackageLength to Updater" 2019-07-08 23:12:38 +00:00
Josh Gao 290322b060 minadbd: delete unnecessary fdevent.h include.
Test: treehugger
Change-Id: I09e9850dabbd71bffbe568f240f9fde8b3743e5e
2019-07-08 15:54:33 -07:00
Robin Lee 1cf8eb7559 Add a GetMappedPackageLength to Updater
Corresponds to GetMappedPackageAddress.

There is at least one custom device recovery with an extension to copy
the package somewhere else as a backup. Ability to do this was removed
in change ag/955273.

Test: lunch cf_x86_tv-eng; make
Test: atest recovery_unit_test recovery_component_test
Change-Id: I0e61d8a8839c47721874526504ea03b9ca7bafa9
2019-07-08 19:30:11 +02:00
TreeHugger Robot 317fc9a2f1 Merge "DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master" into stage-aosp-master 2019-07-02 07:41:03 +00:00
Tianjie Xu b84b6422fa Merge "Build libimgdiff as a host only library"
am: 9341e970ba

Change-Id: I3b3a58f37469b07cc3f6e9eec801eec61e6d897f
2019-07-01 22:06:37 -07:00
Tianjie Xu 9341e970ba Merge "Build libimgdiff as a host only library" 2019-07-02 04:27:44 +00:00
Xin Li 457f7ea2fa DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master
Bug: 134405016
Change-Id: Ie6d14269d9c86a85ff9e3ef4fc242edd48a58b1b
2019-07-01 20:58:36 +00:00
Tianjie Xu ce2b33231e Merge "Add unit tests for simulator" am: 4955648c4c
am: 143b1d9aed

Change-Id: I8e77038c2b51751f6b2670aeb898d621a3d4a519
2019-06-28 11:29:26 -07:00
Tianjie Xu 165fd3916e Merge "Rename product_services to system_ext" am: b9f356f581
am: b8e68bf831

Change-Id: Ica5c92b3fc0d5b5aa4546ea64d845fe00b4a2c25
2019-06-28 11:29:06 -07:00
Tianjie Xu 378dda080b Merge "Implement ShowMenu for StubRecoveryUI" am: 6f114c72db
am: 116152d738

Change-Id: Ic56b3a6926e13b97863d6bca684d45c75a279b7f
2019-06-28 11:28:47 -07:00
Tianjie Xu 143b1d9aed Merge "Add unit tests for simulator"
am: 4955648c4c

Change-Id: Ibf7c9092ea71f166c38f7feb644892d96f1da64c
2019-06-28 11:20:51 -07:00
Tianjie Xu b8e68bf831 Merge "Rename product_services to system_ext"
am: b9f356f581

Change-Id: I3b423d58a295b2cc5f9e2a57bf0e1c97a91e39ad
2019-06-28 11:20:14 -07:00
Tianjie Xu 116152d738 Merge "Implement ShowMenu for StubRecoveryUI"
am: 6f114c72db

Change-Id: Id179a3a82c8d953d62dffc17b6d6d3307a0b9a44
2019-06-28 11:19:43 -07:00
Tianjie Xu 42d7779caf Build libimgdiff as a host only library
Stop building libimgdiff on device because we are only running
patching there.

Test: unit tests pass
Change-Id: I4225c6b52a536617301a64c405e325799a303b40
2019-06-28 11:04:07 -07:00
Tianjie Xu 4955648c4c Merge "Add unit tests for simulator" 2019-06-28 17:47:23 +00:00
Tianjie Xu b9f356f581 Merge "Rename product_services to system_ext" 2019-06-28 17:45:16 +00:00
Tianjie Xu 6f114c72db Merge "Implement ShowMenu for StubRecoveryUI" 2019-06-28 17:45:01 +00:00
Justin Yun 7ba8f18590 Rename product_services to system_ext
Bug: 134359158
Test: build and boot
Change-Id: I2ea21a0e528bdbab7d2479b48c73e7f2274ecca5
2019-06-28 16:17:26 +09:00
Tianjie Xu c3a161e2b8 Add unit tests for simulator
Make sure the simulator succeeds executing common non-A/B update
functions.

Bug: 131911365
Test: run unit tests
Change-Id: I520ce6a8827539b88a9e36f9e67eec30d8b586d4
2019-06-27 16:17:05 -07:00
Tianjie Xu 09a8f76ac2 Implement ShowMenu for StubRecoveryUI
The ShowMenu in StubRecoveryUI used to return initial selection
immediately. This leads to an immediate reboot if we enter recovery
with a stub UI and wait for user's input. This cl changes the behavior
of stub UI's ShowMenu so that it waits keys in loop, and only returns in
the case of interruption or time out.

Bug: 130535924
Test: start recovery with a stub UI, wait for the timeout
Change-Id: I96ad8aad8930756b09101bb98ba5fbe7b53bcb37
2019-06-27 15:54:59 -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