Commit graph

9163 commits

Author SHA1 Message Date
Kelvin Zhang
e32c9f728e Do not call exit() immediately after serving sideload
Wait for socket to close before exit(), so that last "DONEDONE" message
is correctly sent.

Test: enter recovery, sideload an OTA, verify that no read error occured
      on client side. Repeat 5 times.
Bug: 155158483
Change-Id: Ibb02548d8c03fb77f8f60cb69cff84c33903adc0
2020-12-14 17:22:16 -05:00
Bill Yi
b1b27d1113 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ic32d018d3999147ef0a9ef625006cf069e46bc74
2020-12-03 19:27:57 -08:00
Xin Li
ade32af710 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: Idc15c7280ab625d015801313ae71bf04a5abdf81
Change-Id: I2d3ec29aa5b0c162c70e7712025eaa22ec769dcc
2020-11-23 13:12:20 -08:00
Will Coster
923cdf3db1 Merge "Add a fuzzer for OTA package verification" am: 6a4dbdf088
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1495296

Change-Id: I35603bcb3178373414b19bbaca94d270e88b827c
2020-11-16 22:59:34 +00:00
Will Coster
6a4dbdf088 Merge "Add a fuzzer for OTA package verification" 2020-11-16 22:43:19 +00:00
Will Coster
de455707e6 Add a fuzzer for OTA package verification
This is a pretty simplistic approach, it just shoves random data at the
verifier. The OTA format isn't too complicated so this should hopefully
be sufficient to let the fuzzer exercise the potentially interesting
parsing code.

Test: Let the fuzzer run on device for awhile:
      1) FUZZ=libinstall_verify_package_fuzzer
      2) SANITIZE_TARGET=hwaddress make ${FUZZ}
      3) cd ${ANDROID_PRODUCT_OUT} && adb root && adb sync data
      4) adb shell /data/fuzz/arm64/${FUZZ}/${FUZZ}
Change-Id: Icac6bde017b497d9f92c06191eb29e107ba9c0a7
2020-11-10 14:26:17 -08:00
Treehugger Robot
6ab06e1de6 Merge "Expose EthernetDevice to custom UIs" am: 0feaf90f92
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1491198

Change-Id: I3bf249a154df6cbdc3a39212e537ff96ad694c3f
2020-11-10 04:05:16 +00:00
Treehugger Robot
0feaf90f92 Merge "Expose EthernetDevice to custom UIs" 2020-11-10 03:43:33 +00:00
Alistair Delva
f7b547171e Expose EthernetDevice to custom UIs
Make it possible to build a custom UI which uses EthernetRecoveryUI.

Since EthernetRecoveryUI must be used with EthernetDevice, but the
make_device() function is the only place a custom UI can be specified,
we need to move the common EthernetDevice to the recovery_ui core and
make a new "default_ethernet_device" which looks like the other
default device library stubs, for backwards compatibility.

This makes it possible to use EthernetRecoveryUI on cuttlefish.

Bug: 172693524
Change-Id: I6a66bb949ef97d06f532adb286d2db4c002d2924
2020-11-06 16:35:46 -08:00
Baligh Uddin
7f4a3daee5 Merge "Migrate system/core/adb to packages/modules/adb" am: 7bc92050e3
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1465385

Change-Id: I3596c39c29e7837a5ccc3850c1e6cb3d5177c365
2020-10-23 16:39:25 +00:00
Baligh Uddin
7bc92050e3 Merge "Migrate system/core/adb to packages/modules/adb" 2020-10-23 16:16:32 +00:00
Baligh Uddin
0e313c1c2c Migrate system/core/adb to packages/modules/adb
BUG: 167963357
Test: TH
Merged-In: Ied3afa5d19d814155c5ecbe2363ba544f2ab96b7
Change-Id: Ied65135d7c635d1675af591ccc64c26632935161
2020-10-23 03:42:07 +00:00
Xin Li
4177367a4a Skip ab/6749736 in stage.
Merged-In: Iee28a5365320f99997d4ac528655786d49316373
Change-Id: If76f2e034d87760c588f3b9fd35f9ff517c20a40
2020-10-08 17:19:20 -07:00
Tianjie Xu
366ae2cc60 Merge "Add test config for recovery_host_test" am: aa5993ef96
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1452035

Change-Id: Ia2aeab90cbdb438b1f43c7ac9f2d7bde1d7b2a6b
2020-10-07 07:56:30 +00:00
Tianjie Xu
aa5993ef96 Merge "Add test config for recovery_host_test" 2020-10-07 02:29:18 +00:00
Tianjie
581a824401 Add test config for recovery_host_test
Bump the timeout as we see some flakiness in b/170178152. The other
part of the config is copied from the auto-generated config in
out/host/linux-x86/testcases/recovery_host_test/recovery_host_test.config

Bug: 170178152
Test: treehugger
Change-Id: Ia84c90ba6a686c47ecc7d8331c7e8c7cb4b78292
2020-10-06 23:31:04 +00:00
Tianjie Xu
4a242eddd4 Merge "Revert "Link to libsnapshot_cow everywhere libsnapshot is linked."" am: 577f6c2cf6
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1447799

Change-Id: I6e082e5995b6c97b53f607dad161d3b423f85fc4
2020-10-03 20:11:09 +00:00
Tianjie Xu
577f6c2cf6 Merge "Revert "Link to libsnapshot_cow everywhere libsnapshot is linked."" 2020-10-03 19:27:32 +00:00
Tianjie Xu
00e91ff8b9 Revert "Link to libsnapshot_cow everywhere libsnapshot is linked."
Revert submission 1433573-vab-libsnapshot-linkage

Reason for revert: b/169981170, update crash for droidfooders.
Reverted Changes:
Ie75bba98c:Link to libsnapshot_cow where libsnapshot is linke...
Ieedfadc55:libsnapshot: Partially implement OpenSnapshotWrite...
I28a5d4a88:Link to libsnapshot_cow everywhere libsnapshot is ...

Change-Id: I8c774ca4a8dec21dd308694bb8205861a19c3e12
2020-10-03 07:27:00 +00:00
Treehugger Robot
1c87c957f5 Merge "Link to libsnapshot_cow everywhere libsnapshot is linked." am: dd11d217a0 am: 2e37499b96 am: 6f74ef440d am: 3a9d4528f6
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1434951

Change-Id: Idc15c7280ab625d015801313ae71bf04a5abdf81
2020-09-30 00:06:59 +00:00
Treehugger Robot
3a9d4528f6 Merge "Link to libsnapshot_cow everywhere libsnapshot is linked." am: dd11d217a0 am: 2e37499b96 am: 6f74ef440d
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1434951

Change-Id: Ic0b6172ff565fab42aa3cbefaacf56835f09e749
2020-09-29 23:28:59 +00:00
Treehugger Robot
6f74ef440d Merge "Link to libsnapshot_cow everywhere libsnapshot is linked." am: dd11d217a0 am: 2e37499b96
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1434951

Change-Id: Ib5fd4e74c7522da2e76bab09f37ee6e5f1d64227
2020-09-29 23:10:32 +00:00
Treehugger Robot
2e37499b96 Merge "Link to libsnapshot_cow everywhere libsnapshot is linked." am: dd11d217a0
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1434951

Change-Id: I0064853f6081407f08519e42bf440d2e41b67b06
2020-09-29 22:41:55 +00:00
Treehugger Robot
dd11d217a0 Merge "Link to libsnapshot_cow everywhere libsnapshot is linked." 2020-09-29 21:52:07 +00:00
David Anderson
6943dfe9ad Link to libsnapshot_cow everywhere libsnapshot is linked.
Bug: 168554689
Test: recovery builds
Change-Id: I28a5d4a88914b10db1ca8298947afc2314a9ae8a
2020-09-22 15:49:44 -07:00
Kelvin Zhang
6e970758e1 Merge "Check for overflow before allocating memory fore decompression." am: c1d2c15785 am: 115a017218 am: 701b8d660d am: a5c4d3c016
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1430148

Change-Id: I3814239267cda434266f163854c453abe22ec3b5
2020-09-19 08:58:59 +00:00
Bill Yi
602f36a0a5 [automerger skipped] Merge "Merge mainline-release 6664920 to master - DO NOT MERGE" am: 7a899bb461 am: d3865b7a63 -s ours am: c4eabe78c5 -s ours am: c00dfe5d95 -s ours
am skip reason: Change-Id I58a59150174f298ff6e2fae9cd5b4a761279458f with SHA-1 5bb0917365 is in history

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1431509

Change-Id: I42caf6fa0e5a430001a3097eb4f57bcf267daaa4
2020-09-19 08:01:51 +00:00
Bill Yi
b75d08ff2c [automerger skipped] Merge mainline-release 6664920 to master - DO NOT MERGE am: 0139ad11a5 am: 76a81f920b -s ours am: 77fc5fd4ef -s ours am: ca1ba9ee45 -s ours
am skip reason: Change-Id I58a59150174f298ff6e2fae9cd5b4a761279458f with SHA-1 5bb0917365 is in history

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1431509

Change-Id: I59c039abdffd70427d8848204d461b31a2d2fa67
2020-09-19 08:01:00 +00:00
Kelvin Zhang
a5c4d3c016 Merge "Check for overflow before allocating memory fore decompression." am: c1d2c15785 am: 115a017218 am: 701b8d660d
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1430148

Change-Id: If58d53fef580810a9553a71298281e38f45798e8
2020-09-19 07:04:48 +00:00
Bill Yi
c00dfe5d95 [automerger skipped] Merge "Merge mainline-release 6664920 to master - DO NOT MERGE" am: 7a899bb461 am: d3865b7a63 -s ours am: c4eabe78c5 -s ours
am skip reason: Change-Id I58a59150174f298ff6e2fae9cd5b4a761279458f with SHA-1 5bb0917365 is in history

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1431509

Change-Id: I104d03755da300ba9149ef9836cc488d658aed54
2020-09-19 07:01:18 +00:00
Bill Yi
ca1ba9ee45 [automerger skipped] Merge mainline-release 6664920 to master - DO NOT MERGE am: 0139ad11a5 am: 76a81f920b -s ours am: 77fc5fd4ef -s ours
am skip reason: Change-Id I58a59150174f298ff6e2fae9cd5b4a761279458f with SHA-1 5bb0917365 is in history

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1431509

Change-Id: Ia16f9953063b682ac7be51eb1def7c4c3df8bf8f
2020-09-19 07:00:55 +00:00
Kelvin Zhang
701b8d660d Merge "Check for overflow before allocating memory fore decompression." am: c1d2c15785 am: 115a017218
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1430148

Change-Id: I6b01d5d4c208b5e16320c83ddbb8eea008dd78dd
2020-09-19 06:16:32 +00:00
Bill Yi
c4eabe78c5 [automerger skipped] Merge "Merge mainline-release 6664920 to master - DO NOT MERGE" am: 7a899bb461 am: d3865b7a63 -s ours
am skip reason: Change-Id I58a59150174f298ff6e2fae9cd5b4a761279458f with SHA-1 5bb0917365 is in history

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1431509

Change-Id: Ia407d049114e49a25cb0b4d1d4722d2c1a34a339
2020-09-19 05:51:23 +00:00
Bill Yi
77fc5fd4ef [automerger skipped] Merge mainline-release 6664920 to master - DO NOT MERGE am: 0139ad11a5 am: 76a81f920b -s ours
am skip reason: Change-Id I58a59150174f298ff6e2fae9cd5b4a761279458f with SHA-1 5bb0917365 is in history

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1431509

Change-Id: I64353b100715073be826edd7b15c9dcffa90006e
2020-09-19 05:50:32 +00:00
Kelvin Zhang
115a017218 Merge "Check for overflow before allocating memory fore decompression." am: c1d2c15785
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1430148

Change-Id: I80c6ebef9c311c0a97e1b4d57a54d457a24c4115
2020-09-19 05:35:04 +00:00
Bill Yi
d3865b7a63 Merge "Merge mainline-release 6664920 to master - DO NOT MERGE" am: 7a899bb461
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1431509

Change-Id: I0a9763656107b95ca90e40e7243190868a31337c
2020-09-19 05:23:05 +00:00
Bill Yi
76a81f920b Merge mainline-release 6664920 to master - DO NOT MERGE am: 0139ad11a5
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1431509

Change-Id: I82d51c31e6b05c04d068f6ff2695206707c02b75
2020-09-19 05:22:30 +00:00
Kelvin Zhang
c1d2c15785 Merge "Check for overflow before allocating memory fore decompression." 2020-09-19 00:51:22 +00:00
Kelvin Zhang
d1ba38f7c9 Check for overflow before allocating memory fore decompression.
On 32bit devices, an ZipEntry64 may have size > 2^32, we should check
for such cases before attempting to allocate memory.

Test: mm -j
Change-Id: I0f916ef4b2a692f167719a74bd6ff2e887c6c2ce
2020-09-18 17:41:51 -04:00
Bill Yi
7a899bb461 Merge "Merge mainline-release 6664920 to master - DO NOT MERGE" 2020-09-18 18:47:53 +00:00
Bill Yi
0139ad11a5 Merge mainline-release 6664920 to master - DO NOT MERGE
Merged-In: I58a59150174f298ff6e2fae9cd5b4a761279458f
Change-Id: Ieec93fb9ffc33c022e7c7896675dc62b9f8a09ff
2020-09-17 21:56:55 -07:00
Kelvin Zhang
df4c28991b Merge "Switch to zip64 in recovery" am: a35202befd am: a973d68fcb am: 5bb0917365 am: 805e3a983f
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1429048

Change-Id: Id0990957f4cdf47e6e2ea004180246f9d64ce700
2020-09-17 05:19:51 +00:00
Kelvin Zhang
805e3a983f Merge "Switch to zip64 in recovery" am: a35202befd am: a973d68fcb am: 5bb0917365
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1429048

Change-Id: Id448c6291c026c25534bc682563b9ab505bc46bf
2020-09-17 04:40:01 +00:00
Kelvin Zhang
5bb0917365 Merge "Switch to zip64 in recovery" am: a35202befd am: a973d68fcb
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1429048

Change-Id: I58a59150174f298ff6e2fae9cd5b4a761279458f
2020-09-17 01:13:41 +00:00
Kelvin Zhang
a973d68fcb Merge "Switch to zip64 in recovery" am: a35202befd
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1429048

Change-Id: If3de6e828aaff1953a5adc43a786f04d527667c0
2020-09-17 00:50:21 +00:00
Kelvin Zhang
a35202befd Merge "Switch to zip64 in recovery" 2020-09-17 00:19:41 +00:00
Kelvin Zhang
4f81130039 Switch to zip64 in recovery
There's already library support for zip64 in libziparchive. We just need
to start using the new APIs.

Bug: 167951876
Test: Sideload a large ota package in recovery
Change-Id: I652741965f28de079d873c6822317ee9fa855201
2020-09-16 14:21:37 -04:00
Bill Yi
73f4ba0967 [automerger skipped] Merge mainline-release 6664920 to stage-aosp-master - DO NOT MERGE am: b3896c679e -s ours am: 7428812159 -s ours am: d757c4c90d -s ours
am skip reason: Change-Id I0181ce6e0a8271fcfdfbfb5b8e5c64791693d07f with SHA-1 4b028fac0b is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bootable/recovery/+/12578853

Change-Id: Id72ff8c1be02e9a18c13d5380bcdd9f768ec0e24
2020-09-14 22:20:13 +00:00
Bill Yi
d757c4c90d [automerger skipped] Merge mainline-release 6664920 to stage-aosp-master - DO NOT MERGE am: b3896c679e -s ours am: 7428812159 -s ours
am skip reason: Change-Id I0181ce6e0a8271fcfdfbfb5b8e5c64791693d07f with SHA-1 4b028fac0b is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bootable/recovery/+/12578853

Change-Id: I4adddd8fc32af1a6891083a57e987759e3e1f1b5
2020-09-14 21:50:52 +00:00
Bill Yi
7428812159 [automerger skipped] Merge mainline-release 6664920 to stage-aosp-master - DO NOT MERGE am: b3896c679e -s ours
am skip reason: Change-Id I0181ce6e0a8271fcfdfbfb5b8e5c64791693d07f with SHA-1 4b028fac0b is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/bootable/recovery/+/12578853

Change-Id: Id8104464c62a01be2b0db3e56c515b91015f7578
2020-09-14 21:18:48 +00:00