Commit Graph

7159 Commits

Author SHA1 Message Date
Hridya Valsaraju dcc5fa4d4f Merge "Move recovery from /sbin to /system/bin" am: 4c80768796
am: ed2480be9b

Change-Id: I91dadd30c1a96be668a5e3f295aa3f039f44d494
2018-07-27 13:48:29 -07:00
Hridya Valsaraju ed2480be9b Merge "Move recovery from /sbin to /system/bin"
am: 4c80768796

Change-Id: I543608d884f1cfe1fea59e78a4a47c6d6c3be4a1
2018-07-27 13:34:20 -07:00
Treehugger Robot 4c80768796 Merge "Move recovery from /sbin to /system/bin" 2018-07-27 20:25:53 +00:00
Josh Gao 038c4a11db minadbd: avoid overrriding services_to_fd.
Previously, we were relying on linker ordering pulling in minadbd's
copy of services_to_fd instead of libadbd's, which breaks when we
switch to dynamically linking. Separate out libadbd's services into a
separate function that's in a file that isn't built into libadbd, so
that we can provide our own here.

Bug: http://b/111831478
Test: mma
Change-Id: I2479947b2d81db5e750020fffc2c2c770cb31a78
2018-07-27 11:18:30 -07:00
Hridya Valsaraju cfb3c92302 Move recovery from /sbin to /system/bin
Executables should be in /system/bin
rather than sbin.

Bug: 78793464
Test: boot into recovery, try adb sideload
Change-Id: I194589119a099d29e56b0648f0906a5ae2aa6770
2018-07-26 17:12:40 -07:00
Tianjie Xu 6c086c4009 Merge "Add proto3 support for care_map" am: 8d9b3aec3d am: f3480024c2 am: 2a047b9ff3
am: 5612006f31

Change-Id: I48ffce296309d61eba7cc5710a8537d708ff68f3
2018-07-26 14:55:20 -07:00
Tianjie Xu 5612006f31 Merge "Add proto3 support for care_map" am: 8d9b3aec3d am: f3480024c2
am: 2a047b9ff3

Change-Id: Ie437e57634525c36087f5255934d02c49b42c37c
2018-07-26 13:26:46 -07:00
Tianjie Xu 2a047b9ff3 Merge "Add proto3 support for care_map" am: 8d9b3aec3d
am: f3480024c2

Change-Id: Id695d0d49b75c4f0a828bef01bedc36281e15939
2018-07-26 13:12:15 -07:00
Tianjie Xu f3480024c2 Merge "Add proto3 support for care_map"
am: 8d9b3aec3d

Change-Id: Ica2ffa3c1a8d7a9cc2c59a8d30d4dc95907a6882
2018-07-26 12:48:10 -07:00
Tianjie Xu 8d9b3aec3d Merge "Add proto3 support for care_map" 2018-07-26 17:57:58 +00:00
Tao Bao 388f687a29 Merge "bootloader_message: Build libbootloader_message as shared lib." am: 8515cd5f23 am: 39e5bdaedb am: f2e7b1757a
am: 0686aa454e

Change-Id: I4088e371e1f9fba960f1b32c15ed89450e9e1020
2018-07-25 22:09:27 -07:00
Tao Bao 0686aa454e Merge "bootloader_message: Build libbootloader_message as shared lib." am: 8515cd5f23 am: 39e5bdaedb
am: f2e7b1757a

Change-Id: Idfcb05b70c0d26672359ad5d17e0048573c4b353
2018-07-25 22:05:57 -07:00
Tao Bao f2e7b1757a Merge "bootloader_message: Build libbootloader_message as shared lib." am: 8515cd5f23
am: 39e5bdaedb

Change-Id: I73715616877c05f259f69e275816b1ad28dea818
2018-07-25 22:02:10 -07:00
Tao Bao 39e5bdaedb Merge "bootloader_message: Build libbootloader_message as shared lib."
am: 8515cd5f23

Change-Id: Ideed01697fa7f660fcf2ade93b2f55c55c142479
2018-07-25 21:58:08 -07:00
Tao Bao 8515cd5f23 Merge "bootloader_message: Build libbootloader_message as shared lib." 2018-07-26 04:48:46 +00:00
Tianjie Xu 4d9e62d8a0 Add proto3 support for care_map
Switching to the protobuf format helps to make the care_map more
extensible. As we have such plans in the future, add the support to
parse the protobuf message in the update_verifier.

Bug: 77867897
Test: unit tests pass, update_verifier successfully verifies a care_map.pb
Change-Id: I9fe83cb4dd3cc8d6fd0260f2a47338fe142d3938
2018-07-25 14:15:22 -07:00
Tao Bao 8ca3220bfe bootloader_message: Build libbootloader_message as shared lib.
And uses the shared lib version of libbase and libfs_mgr.

Bug: 78793464
Test: `m dist`
Test: Run recovery_{unit,component}_test on marlin.
Change-Id: I750c02d0bfccd6e58fb01f641de02532ace52e00
2018-07-25 13:42:33 -07:00
Tom Cherry b2fd16841a ueventd is now at /system/bin/ueventd
Bug: 79758715
Test: boot into recovery
Change-Id: I9bf47b2487993e275419befdc9718cc0ac8d3ea7
2018-07-24 15:58:29 -07:00
Xin Li 2e0f71a45d Merge "Merge pi-dev-plus-aosp-without-vendor into stage-dr1-aosp-master" into stage-dr1-aosp-master am: 85b714c876
am: 61a066ad36

Change-Id: If494a86cac3d76a2b7120d91b334ab76cda79bb9
2018-07-23 16:18:16 -07:00
Xin Li 61a066ad36 Merge "Merge pi-dev-plus-aosp-without-vendor into stage-dr1-aosp-master" into stage-dr1-aosp-master
am: 85b714c876

Change-Id: I91da2b1096a4600ad780e78e2e55e17b55a7069f
2018-07-23 14:06:25 -07:00
Xin Li 85b714c876 Merge "Merge pi-dev-plus-aosp-without-vendor into stage-dr1-aosp-master" into stage-dr1-aosp-master 2018-07-23 20:53:48 +00:00
Hridya Valsaraju ee5163cb1e Merge "Revert "Make recovery libraries shared / recovery_available"" into stage-aosp-master am: 5c9e580f4f am: 56ba447c57
am: 320a8ceb7c

Change-Id: I3abd9d8d28ca7eb6c85f0a17b8956d362275a177
2018-07-23 12:54:41 -07:00
Hridya Valsaraju 320a8ceb7c Merge "Revert "Make recovery libraries shared / recovery_available"" into stage-aosp-master am: 5c9e580f4f
am: 56ba447c57

Change-Id: I6edc5cac3a536a64f3ee5bff4de2392149735ee9
2018-07-23 12:37:31 -07:00
Hridya Valsaraju 56ba447c57 Merge "Revert "Make recovery libraries shared / recovery_available"" into stage-aosp-master
am: 5c9e580f4f

Change-Id: Ia92390634bc67f3cffbe3a2644af52abee2bd07f
2018-07-23 12:30:02 -07:00
TreeHugger Robot 5c9e580f4f Merge "Revert "Make recovery libraries shared / recovery_available"" into stage-aosp-master 2018-07-23 19:18:34 +00:00
Hridya Valsaraju b6b129b258 Revert "Make recovery libraries shared / recovery_available"
This reverts commit c936a69619.

Reason for revert: b/111734137

Change-Id: Ie9c1fdc75d6e87dba7019c4e6d1799af25c2f94a
2018-07-23 17:49:14 +00:00
Xin Li bdb8200aaf Merge pi-dev-plus-aosp-without-vendor into stage-dr1-aosp-master
Bug: 111615259
Change-Id: Ifee8c187c99abad5c496eca2b5bb6f8b8f857ceb
2018-07-22 22:10:17 -07:00
Tao Bao bfbe71e900 Merge "applypatch: Change applypatch command-line arguments." am: 860b457a15 am: 7d2962b942 am: 4ad9995b5b
am: f9289591f5

Change-Id: Ib1ecfb99dcffde5570fa9cb32feafc43827da208
2018-07-20 21:48:38 -07:00
Tao Bao f9289591f5 Merge "applypatch: Change applypatch command-line arguments." am: 860b457a15 am: 7d2962b942
am: 4ad9995b5b

Change-Id: I6a95f04ce99e8e53b749f7873ddf056e3d9dff3f
2018-07-20 21:17:37 -07:00
Tao Bao 4ad9995b5b Merge "applypatch: Change applypatch command-line arguments." am: 860b457a15
am: 7d2962b942

Change-Id: I299c3ee133280d7996574791fb150a1bab7ad8e2
2018-07-20 17:37:09 -07:00
Tao Bao 7d2962b942 Merge "applypatch: Change applypatch command-line arguments."
am: 860b457a15

Change-Id: Ie2d595dbcd8624b8a243f043d04f434d4cf00d5e
2018-07-20 17:12:08 -07:00
Tao Bao 860b457a15 Merge "applypatch: Change applypatch command-line arguments." 2018-07-20 23:04:33 +00:00
Karl Shaffer 5f6869ad20 Merge "Updates Wear UI to Display Localized Recovery Text." am: 6bc9d605f3 am: 393a97ff8b am: d275207d9d
am: 95588b8ff2

Change-Id: Iad5f5dbbc95d61f99690f09684024699fe8e9b05
2018-07-20 13:46:37 -07:00
Karl Shaffer 95588b8ff2 Merge "Updates Wear UI to Display Localized Recovery Text." am: 6bc9d605f3 am: 393a97ff8b
am: d275207d9d

Change-Id: I78df47b4349fba82b4c0153f7e713992c70c7b10
2018-07-20 13:43:05 -07:00
Karl Shaffer d275207d9d Merge "Updates Wear UI to Display Localized Recovery Text." am: 6bc9d605f3
am: 393a97ff8b

Change-Id: I1d51147f51130dd72c56421682a4a4dc2637212d
2018-07-20 13:37:56 -07:00
Karl Shaffer 393a97ff8b Merge "Updates Wear UI to Display Localized Recovery Text."
am: 6bc9d605f3

Change-Id: I2ee3cd560f729bb47fc66384f43533b34c4e1382
2018-07-20 13:33:45 -07:00
Treehugger Robot 6bc9d605f3 Merge "Updates Wear UI to Display Localized Recovery Text." 2018-07-20 20:24:45 +00:00
Jerry Zhang 84dc7c8d68 [automerger skipped] Make recovery libraries shared / recovery_available am: c936a69619 am: 3e8262d633
am: c11cd3ccb8  -s ours

Change-Id: I97b51ee4a8962814c52f65d0c6bd16947193f191
2018-07-20 13:24:37 -07:00
Jerry Zhang c11cd3ccb8 Make recovery libraries shared / recovery_available am: c936a69619
am: 3e8262d633

Change-Id: Ieed70605eaec3b703de9ae1112091cd559cf9103
2018-07-20 13:19:48 -07:00
Jerry Zhang 3e8262d633 Make recovery libraries shared / recovery_available
am: c936a69619

Change-Id: Ida8931378dab85f77b43cddee74c3faffa1e6f02
2018-07-20 13:14:52 -07:00
Karl Shaffer 633c01baca Updates Wear UI to Display Localized Recovery Text.
Updates Wear Recovery UI to fix bug. Recovery UI now will
display the proper Recovery Text during progress actions above the
ProgressBarBaseline as defined in device make files.

Change-Id: Idef0cb046dd06979042ca877ba0c61e9faaedec1
Bug: 64330124
(cherry picked from commit 19f6cccdafe53e14b9cd083e69da5887028070a0)
2018-07-20 11:31:53 -07:00
Tao Bao d34e6bc44b applypatch: Change applypatch command-line arguments.
This applies to the standalone applypatch executable
(/system/bin/applypatch on device). This executable is only used when
installing (via patching or flashing) a recovery image on non-A/B
device.

This CL removes the support for patching non-eMMC targets from
applypatch that has been deprecated as part of file-based OTA. For
patching eMMC targets, it also drops the support for accepting multiple
patches (not useful, since the source file must be fixed).

This CL needs the matching change in the same topic, which writes the
script of "/system/bin/install-recovery.sh". Note that this CL doesn't
chanage the applypatch API signatures, in order to minimize the CL size.

*BEFORE*

usage: /system/bin/applypatch [-b <bonus-file>] <src-file> <tgt-file> <tgt-sha1> <tgt-size> [<src-sha1>:<patch> ...]
   or  /system/bin/applypatch -c <file> [<sha1> ...]
   or  /system/bin/applypatch -l

Filenames may be of the form
  EMMC:<partition>:<len_1>:<sha1_1>:<len_2>:<sha1_2>:...
to specify reading from or writing to an EMMC partition.

*AFTER*

Usage:
check mode
  applypatch --check EMMC:<target-file>:<target-size>:<target-sha1>

flash mode
  applypatch --flash <source-file>
             --target EMMC:<target-file>:<target-size>:<target-sha1>

patch mode
  applypatch [--bonus <bonus-file>]
             --patch <patch-file>
             --target EMMC:<target-file>:<target-size>:<target-sha1>
             --source EMMC:<source-file>:<source-size>:<source-sha1>

show license
  applypatch --license

Bug: 110106408
Test: Run recovery_component_test and recovery_unit_test on marlin.
Test: Build a non-A/B target that has /system/bin/install-recovery.sh.
      Verify that it installs recovery image successfully.
Test: Build a non-A/B target that has /system/bin/install-recovery.sh in
      flashing mode. Verify that it installs recovery image successfully.
Change-Id: I71f9a71fb457e6f663e0b5511946949e65b4b78c
2018-07-20 11:26:17 -07:00
Jerry Zhang c936a69619 Make recovery libraries shared / recovery_available
Test: compiles
Bug: 78793464
Change-Id: Iff64bc1a597e70f749a9d825f7d386baa427be3d
Merged-In: Iff64bc1a597e70f749a9d825f7d386baa427be3d
(cherry picked from commit 92969c49dc)
2018-07-20 17:54:03 +00:00
Jerry Zhang 92969c49dc Make recovery libraries shared / recovery_available
Test: compiles
Bug: 78793464
Change-Id: Iff64bc1a597e70f749a9d825f7d386baa427be3d
2018-07-19 22:40:23 -07:00
Tao Bao 6e46cff9b2 Merge "Fix the arguments passed to getopt_long(3)." am: 29932e7bcc am: 2f9d61ad25
am: af80f51151

Change-Id: I77c4ab2fe08a293edf94004747e8b82f21d383ac
2018-07-17 15:14:50 -07:00
Tao Bao af80f51151 Merge "Fix the arguments passed to getopt_long(3)." am: 29932e7bcc
am: 2f9d61ad25

Change-Id: I679130a021dd11f3ec5a5ff450b1fa06d2527e66
2018-07-17 15:05:29 -07:00
Tao Bao 2f9d61ad25 Merge "Fix the arguments passed to getopt_long(3)."
am: 29932e7bcc

Change-Id: I985c5598ad9d9e4222849aff6177fa7e4f0e8820
2018-07-17 14:57:38 -07:00
Tao Bao 29932e7bcc Merge "Fix the arguments passed to getopt_long(3)." 2018-07-17 21:09:03 +00:00
Tao Bao 1700cc46b5 Fix the arguments passed to getopt_long(3).
The getopt_long(3) implementation in Android (upstream freebsd) expects
a null-terminated array while parsing long options with required args.

  if (long_options[match].has_arg == required_argument) {
    optarg = nargv[optind++];
  }
  ...
  if (long_options[match].has_arg == required_argument && optarg == NULL) {
    return (BADARG);
  }

This seems to make sense in practice, as getopt(3) takes the first two
arguments of argc and argv that are "as passed to the main() function on
program invocation", and both of C and C++ spec say "the value of
argv[argc] shall be 0".

Prior to the CL, we may run into undefined behavior on malformed input
command line (e.g. missing arg for an option that requires one). This CL
fixes the issue by always appending a nullptr to the argument list (but
without counting that into argc).

Test: Build and boot into recovery with commands.
Change-Id: Ic6c37548f4db2f30aeabd40f387ca916eeca5392
2018-07-17 12:16:53 -07:00
Tao Bao 399efe5806 Merge "applypatch: Consolidate CacheSizeCheck() and MakeFreeSpaceOnCache()." am: 624b6b6cd5 am: 603b7ed470
am: efe9100fb1

Change-Id: I9db9b5bcd72078909fd775b11ddd93352855bbe7
2018-07-13 13:05:21 -07:00