Commit graph

8121 commits

Author SHA1 Message Date
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
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
55e82e2fc5 Merge "Implement an update simulator to verify BB OTA packages on host" am: 65d7d5b8cf
am: 29d9d7bbbe

Change-Id: Id0152ae0ef3b12501e67e9f3404bd2a379b79c7e
2019-05-29 10:44:17 -07:00
Tianjie Xu
29d9d7bbbe Merge "Implement an update simulator to verify BB OTA packages on host"
am: 65d7d5b8cf

Change-Id: Ie3d3af1442c75563c10a9c6c2991426f1054305d
2019-05-29 10:37:34 -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
Mark Salyzyn
3447708800 Merge "recovery: report compliant reboot reason (Part Deux)" am: c0a51a01ce
am: 7d0545f14a

Change-Id: I5818816fc88d05e2b8b4fa7fec17a009f854e1f9
2019-05-28 09:22:53 -07:00
Mark Salyzyn
7d0545f14a Merge "recovery: report compliant reboot reason (Part Deux)"
am: c0a51a01ce

Change-Id: Ie92bd6205de683781a9a315657485cd232682de3
2019-05-28 09:17:51 -07:00
Treehugger Robot
c0a51a01ce Merge "recovery: report compliant reboot reason (Part Deux)" 2019-05-28 15:57:24 +00:00
android-build-team Robot
07f68f8eb5 Snap for 5605988 from 35e0f6d290 to qt-release
Change-Id: I9910ea50bef71e4f1f27594af7797c588bf9c122
2019-05-25 23:09:51 +00:00
Tianjie Xu
e89cfb6a41 Merge "Some clean ups to the updater" am: 52e61f6995
am: a0c0e04163

Change-Id: I0095c2eb465559d30632d00d1a18b6d6b5eda143
2019-05-23 23:08:07 -07:00
Tianjie Xu
a0c0e04163 Merge "Some clean ups to the updater"
am: 52e61f6995

Change-Id: I515d9cd9cf0d3b82fd2a28ccfcef8e2eea1e5683
2019-05-23 22:44:44 -07: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
Tao Bao
865c17893b [automerger skipped] Add misc_writer.
am: 35e0f6d290 -s ours
am skip reason: change_id I79548fc63fc79b705a0320868690569c3106949f with SHA1 7ae0169842 is in history

Change-Id: I092c0920b4e9bb4f9386ec84b7522bfbb984477b
2019-05-23 13:37:06 -07:00
Elliott Hughes
ee57256055 Merge "Move off the Next ZipString overload." am: 7b67d28518
am: 505ed45940

Change-Id: I1543b8adc9872333c5a6dbcad001cc2387877816
2019-05-23 13:10:12 -07:00
Elliott Hughes
505ed45940 Merge "Move off the Next ZipString overload."
am: 7b67d28518

Change-Id: Idbc570cc79fd3d620e2f3544b90cffb43139b6bc
2019-05-23 11:23:36 -07:00
Elliott Hughes
7b67d28518 Merge "Move off the Next ZipString overload." 2019-05-23 17:55:27 +00:00
Tao Bao
863c8f36dd Merge "Revert "recovery: report compliant reboot reason"" am: 44f6b182dd
am: b491496fc3

Change-Id: Ib108dd6d1bbda2f03a3730c58519e42b5dd59766
2019-05-22 21:18:45 -07: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
Tao Bao
b491496fc3 Merge "Revert "recovery: report compliant reboot reason""
am: 44f6b182dd

Change-Id: I37bfc2cac926a3b3aaecad4807478e5aed9f51aa
2019-05-22 18:52:21 -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
d77641069e Merge "recovery: report compliant reboot reason" am: d31fb2e7fc
am: c3042973a4

Change-Id: I020798a035fa83839347f821dbfad1d363ec5d69
2019-05-21 13:32:30 -07:00
Tianjie Xu
3445bf5352 Merge "Add UpdaterRuntime class" am: e7b3c5698e
am: c6d7065880

Change-Id: I4096ef9a51904b5ecd889bda5ff0d9e11acb4071
2019-05-21 13:25:31 -07:00
Mark Salyzyn
c3042973a4 Merge "recovery: report compliant reboot reason"
am: d31fb2e7fc

Change-Id: I7105c56c65f8d2573ec8e0b7cada81468ccef2b7
2019-05-21 11:57:57 -07:00
Tianjie Xu
c6d7065880 Merge "Add UpdaterRuntime class"
am: e7b3c5698e

Change-Id: I2942823be107f1e693385a7892251519ac50afb1
2019-05-21 11:57:32 -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
70bc3c40d2 Merge "Add misc_writer." am: 962f7e0c0c
am: f9fb4878fc

Change-Id: Icb9af8d6b74a958b0979e4d53426e3f9eaf01e50
2019-05-21 06:56:31 -07:00
Tao Bao
f9fb4878fc Merge "Add misc_writer."
am: 962f7e0c0c

Change-Id: I5b007e3c880c7f6100e95c57ee02b2fd8e3d6c6d
2019-05-21 06:51:28 -07: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
35e0f6d290 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
Merged-In: I79548fc63fc79b705a0320868690569c3106949f
(cherry picked from commit 7ae0169842)
2019-05-20 15:58:53 -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
ec3d4af4b6 [automerger skipped] DO NOT MERGE - Skip pi-platform-release (PPRL.190505.001) in stage-aosp-master
am: e7a0262c14 -s ours
am skip reason: subject contains skip directive

Change-Id: I8100929a2f3a752875be6ef98080174c7fb68dae
2019-05-15 17:25:30 -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
fb4f72cb7c Merge "roots: Remove get_system_root and logical_partitions_mapped." am: ba8f38d741
am: c53856dca7

Change-Id: Ia77b93802de465219587a519d1109aab888c38f0
2019-05-10 18:08:37 -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