Commit Graph

7307 Commits

Author SHA1 Message Date
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
Treehugger Robot f3dd821f76 Merge "Disable building simulator for mac" 2019-05-30 20:45:28 +00:00
Tianjie Xu 76e165d143 Disable building simulator for mac
Disable building the simulator and its support libraries to resolve the breakage
on mac host targets. Because the simulator is not intended to use on mac anyway.

Bug: 134047992
Test: mma
Change-Id: I488ab50cab1282f03250010b5334f1895d44f98b
2019-05-30 10:49:18 -07:00
Tianjie Xu 65d7d5b8cf Merge "Implement an update simulator to verify BB OTA packages on host" 2019-05-29 17:20:36 +00:00
Tianjie Xu c1a5e26fd9 Implement an update simulator to verify BB OTA packages on host
Implement the simulator runtime and build the updater simulator as a host
executable. The code to parse the target-files and mocks the block devices
will be submitted in the follow-up.

Bug: 131911365
Test: unit tests pass

Change-Id: Ib1ba939aec8333ca68a45139514d772ad7a27ad8
2019-05-28 15:18:25 -07:00
Treehugger Robot c0a51a01ce Merge "recovery: report compliant reboot reason (Part Deux)" 2019-05-28 15:57:24 +00:00
Tianjie Xu 52e61f6995 Merge "Some clean ups to the updater" 2019-05-24 04:45:43 +00:00
Mark Salyzyn 488cc05c96 recovery: report compliant reboot reason (Part Deux)
shutdown and reboot should have a corresponding sub-reason.

Adding:
    "reboot,userrequested,fastboot"
    "reboot,userrequested,recovery"
    "reboot,userrequested,recovery,ui"
    "shutdown,userrequested,fastboot"
    "shutdown,userrequested,recovery"
    "reboot,unknown#" (Can't happen, debug)

Test: manual, multiple targets, enter recovery, be able to exit recovery
Bug: 133326470
Change-Id: Ibfcb2a23158e8e99922e8053edd815fb592150f2
2019-05-23 13:58:53 -07:00
Elliott Hughes 7b67d28518 Merge "Move off the Next ZipString overload." 2019-05-23 17:55:27 +00:00
Elliott Hughes 88d8001e75 Move off the Next ZipString overload.
Bug: http://b/129068177
Test: treehugger
Change-Id: I3c8f70b0d8cc5dc6b3b4439dbe0b9a5bd85003c4
2019-05-22 18:52:29 -07:00
Tianjie Xu 27556d089f Some clean ups to the updater
Remove some unnecessary includes or forward declarations. And include
the correct headers to build host executables.

Bug: 131911365
Test: unit tests pass
Change-Id: I62e75f60678159fe24619a4bd386b1416f1a5b5d
2019-05-22 14:58:28 -07:00
Treehugger Robot 44f6b182dd Merge "Revert "recovery: report compliant reboot reason"" 2019-05-22 21:55:38 +00:00
Tao Bao feefbf2f56 Revert "recovery: report compliant reboot reason"
This reverts commit 6f4e4db4f9.

Reason for revert: Booting out of recovery (choose `Reboot system now`)
on taimen is broken. Device keeps booting back into recovery.

Bug: 133326470
Test: Choose `Reboot system now` from recovery menu. Deivce attempts
      normal boot.
Change-Id: I6e85fc248e18953a6fb94513c3abc7e7e0fb0477
2019-05-22 11:06:26 -07:00
Mark Salyzyn d31fb2e7fc Merge "recovery: report compliant reboot reason" 2019-05-21 17:44:14 +00:00
Tianjie Xu e7b3c5698e Merge "Add UpdaterRuntime class" 2019-05-21 17:07:30 +00:00
Tao Bao 962f7e0c0c Merge "Add misc_writer." 2019-05-21 13:41:07 +00:00
Tianjie Xu 1536db887f Add UpdaterRuntime class
This class adds a wrapper to the runtime dependent functions. Therefore,
the behavior of update on device stays the same, while simulators can
have their own implementations. Also change the caller side of the
registered updater functions to call these runtime wrappers.

Bug: 131911365
Test: unit tests pass, sideload an update on cuttlefish
Change-Id: Ib3ab67132991d67fc132f27120e4152439d16ac5
2019-05-20 18:03:27 -07:00
Tao Bao 7ae0169842 Add misc_writer.
bootloader_message.h currently divides /misc into four segments. The
space between 2K and 16K is reserved for vendor use (e.g. bootloader
persists flags). This CL adds a vendor tool "misc_writer", to allow
writing data to the vendor space in /misc, before getting a dedicated
HAL for accessing /misc partition (b/131775112).

Targets need to explicitly include the module, then invoke the
executable to write data. For example, the following command will write
3-byte data ("0xABCDEF") to offset 4 in vendor space (i.e. 2048 + 4 in
/misc).
$ /vendor/bin/misc_writer --vendor-space-offset 4 --hex-string 0xABCDEF

Bug: 132906936
Test: Run recovery_unit_test on crosshatch.
Test: Call the command via init.hardware.rc on crosshatch. Check that
      the call finishes successfully. Then check the contents written to
      /misc (`dd bs=1 skip=2048 if=/dev/block/sda2 count=32 | xxd`).
Change-Id: I79548fc63fc79b705a0320868690569c3106949f
2019-05-20 15:51:26 -07:00
Mark Salyzyn 6f4e4db4f9 recovery: report compliant reboot reason
shutdown and reboot should have a corresponding sub-reason.

Adding:
    "reboot,fastboot_menu"
    "reboot,recovery_menu"
    "reboot,recovery_ui"
    "shutdown,fastboot"
    "shutdown,recovery"
    "reboot,unknown#"

Test: none
Change-Id: Icf1ab0d462ec2de2272914a36994a095998d6186
2019-05-20 13:52:10 -07:00
Xin Li e7a0262c14 DO NOT MERGE - Skip pi-platform-release (PPRL.190505.001) in stage-aosp-master
Bug: 132622481
Change-Id: Ic07faa9aa968d11ae8f6b44d548d724fd194e047
2019-05-13 15:56:57 -07:00
Tao Bao c53856dca7 Merge "roots: Remove get_system_root and logical_partitions_mapped."
am: ba8f38d741

Change-Id: I7bc0a5ff9e7709f91fe28f4c9b8d20f5c8d20cf8
2019-05-10 17:40:31 -07:00
Tao Bao ba8f38d741 Merge "roots: Remove get_system_root and logical_partitions_mapped." 2019-05-10 23:58:32 +00:00
Tao Bao f90d9a102f roots: Remove get_system_root and logical_partitions_mapped.
Test: TreeHugger
Test: Boot into recovery on blueline. Choose "Mount system partition".
Change-Id: Iac475d18ce2415de09dc0bf009ad4cf0383ffede
2019-05-10 10:42:56 -07:00
Xin Li 8e7be1faeb [automerger skipped] Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master."
am: 343a7dcdd2 -s ours
am skip reason: subject contains skip directive

Change-Id: Iea7679752ae74ce0d026fe3e58d3d3df88b21739
2019-05-09 15:48:46 -07:00
Xin Li 343a7dcdd2 Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master." 2019-05-09 22:05:46 +00:00
Elliott Hughes 46fa74623a Merge "Track libziparchive API change."
am: 6da27adb0b

Change-Id: Ib261d224fe4b57ead972987466dc30411505aa30
2019-05-09 14:46:26 -07:00
Tianjie Xu e945763a5d Merge "Skip hashtree computation during block image verify"
am: c046a61d97

Change-Id: If5934f92768248c79029c3e7e0934b7a2a37c88d
2019-05-09 14:43:49 -07:00
Elliott Hughes 6da27adb0b Merge "Track libziparchive API change." 2019-05-09 21:32:52 +00:00
Tianjie Xu c046a61d97 Merge "Skip hashtree computation during block image verify" 2019-05-09 20:47:57 +00:00
Tianjie Xu 3fda5d6508 Skip hashtree computation during block image verify
The hashtree computation is designed to execute after we write all the
bytes to the target block device. And executing the command during block
image verify will almost always fail since we are still on the source
build.

Test: run simulator
Change-Id: If8ebb66739969520367a0815f5f8f89f6fae47cf
2019-05-09 10:58:10 -07:00
Tianjie Xu 93667742fe Merge "Add Updater class and remove UpdaterInfo"
am: 19737a5b38

Change-Id: If5ec40a583441f54b6bb012cd9f501f14d4f3b86
2019-05-09 10:51:05 -07:00
Tianjie Xu 19737a5b38 Merge "Add Updater class and remove UpdaterInfo" 2019-05-09 17:33:52 +00:00
Xin Li a5741b06ef DO NOT MERGE - Merge Pie Bonito/Sargo into master.
Bug: 131756210
Change-Id: Ia8a170576e6473ec4dae90d481e17aa216223e97
2019-05-09 09:27:02 -07:00
Tianjie Xu 58d59129e1 Add Updater class and remove UpdaterInfo
The UpdaterInfo class is merely a collection of pointers and POD types.
We can replace it with a Updater class that has the ownership of the
resources. This also makes this class extensible as we plan to add more
functionality in the host simulator.

Bug: 131911365
Test: unit tests pass, run an update on cuttlefish and check last_install
Change-Id: I07ca5963bbee8ae3cb85ccc184464910aa73d4e4
2019-05-08 23:07:04 -07:00
Elliott Hughes 143a03fa03 Track libziparchive API change.
Bug: http://b/129068177
Test: treehugger
Change-Id: I618bbcf38914dd81e042e0cfd1976ff26274dc30
2019-05-08 17:28:22 -07:00
android-build-team Robot 94baa21254 Snap for 5450365 from bd8ed91d04 to pi-platform-release
Change-Id: I02180574c059ce8af1f031195ee497540a82cd65
2019-05-07 21:57:33 +00:00
Elliott Hughes 0d24715223 Merge "Track libziparchive API change."
am: 9423d2f6b7

Change-Id: I611e235693bd7b060f472280f94e89e2f52a2ea0
2019-05-06 17:14:06 -07:00
Elliott Hughes 9423d2f6b7 Merge "Track libziparchive API change." 2019-05-06 23:45:16 +00:00
Colin Cross 5a25636f34 Merge "Disable libbootloader_message for darwin"
am: 12262d568a

Change-Id: Ic3016f69893c4f5792f30be1edf341e6d6338297
2019-05-06 14:25:08 -07:00
Treehugger Robot 12262d568a Merge "Disable libbootloader_message for darwin" 2019-05-06 21:09:10 +00:00
Elliott Hughes a86dddbfa5 Track libziparchive API change.
Bug: http://b/129068177
Test: treehugger
Change-Id: Ie5b2b0cff087f2e9e65a4e77c187e3173357f3ad
2019-05-06 10:28:14 -07:00
Colin Cross fb68d38fba Disable libbootloader_message for darwin
libfstab is not built for darwin, don't build libbootloader_message
either.

Bug: 131709594
Test: m PRODUCT-sdk-sdk sdk_repo
Change-Id: I6e3b04f1c3e97d5aa6ac0452bf13e714f8dae437
2019-05-06 09:49:00 -07:00
Elliott Hughes 24566cebf5 Merge "ConsumePrefix is now in libbase."
am: b699b4b1cd

Change-Id: I03b337a921882fa0c06744fb903b8e06c385f9d9
2019-05-03 17:43:25 -07:00
Elliott Hughes b699b4b1cd Merge "ConsumePrefix is now in libbase." 2019-05-04 00:03:14 +00:00
Elliott Hughes 93838f6e42 ConsumePrefix is now in libbase.
Test: treehugger
Change-Id: I2feecabb77986d3e007de1009b123c2d98454631
2019-05-03 10:33:04 -07:00
Yifan Hong d3916e2f1f Merge changes from topic "cuttlefish_misc"
am: be25cd21e4

Change-Id: I9f4cdb1a67c9eae1b1d55d56f40887d686b39644
2019-05-03 09:39:25 -07:00
Treehugger Robot be25cd21e4 Merge changes from topic "cuttlefish_misc"
* changes:
  libbootloader_message: host_supported.
  libbootloader_message: write recovery to any device
2019-05-03 16:09:27 +00:00
Tianjie Xu 15a899363e Merge "Implement FuseBlockDataProvider"
am: bfd6cf59dc

Change-Id: I6dd3d4d9cae5597dbaa3e880f0cbcc2e46e98809
2019-05-02 18:30:42 -07:00
Tianjie Xu bfd6cf59dc Merge "Implement FuseBlockDataProvider" 2019-05-03 00:35:58 +00:00
Yifan Hong d83070ddb9 libbootloader_message: host_supported.
Also, strlcat is not available on host, so use
std::string::operator+= instead.

Test: cuttlefish
Bug: 79094284

Change-Id: I1e69daeb522ca73f43e0c4855cf099a021ed4d47
2019-05-02 15:51:56 -07:00