Commit Graph

7815 Commits

Author SHA1 Message Date
Mark Salyzyn 7b2ca7f88b Merge "recovery: report compliant reboot reason (Part Deux)" am: c0a51a01ce am: 7d0545f14a
am: 3447708800

Change-Id: I564c87f50d3a4a8ad6a26a16e96586e2ef235ca5
2019-05-28 09:27:54 -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
Tianjie Xu bcade69f45 Merge "Some clean ups to the updater" am: 52e61f6995 am: a0c0e04163
am: e89cfb6a41

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

Change-Id: I3e8b8b1a2f99e3a1e58bd9c1a58cc909b20e97b8
2019-05-23 14:28:58 -07: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 29f9d20f93 [automerger skipped] Add misc_writer. am: 35e0f6d290
am: af0a76d1c5 -s ours
am skip reason: change_id I79548fc63fc79b705a0320868690569c3106949f with SHA1 7ae0169842 is in history

Change-Id: I9e0d5d1539699cab1b073f5da0a7db54b8fbaefe
2019-05-23 13:54:08 -07:00
Elliott Hughes 50b4e59890 Merge "Move off the Next ZipString overload." am: 7b67d28518 am: 505ed45940
am: ee57256055

Change-Id: I0d6131d183a52a9c7fd54c5a00926d99cf6c408d
2019-05-23 13:50:12 -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
Tao Bao af0a76d1c5 Add misc_writer.
am: 35e0f6d290

Change-Id: I4c9c9db09280a0e492cf832489b48511728413b4
2019-05-23 13:26:11 -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 7c151865d6 Merge "Revert "recovery: report compliant reboot reason"" am: 44f6b182dd am: b491496fc3
am: 863c8f36dd

Change-Id: Ic736642d61adb472aa1b4984cc8e335f5c8d7207
2019-05-23 01:09:20 -07: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 c812d98b64 Merge "recovery: report compliant reboot reason" am: d31fb2e7fc am: c3042973a4
am: d77641069e

Change-Id: I1a5afef9ce6ff46cbf89d458e1ec52d916da630c
2019-05-21 15:59:34 -07:00
Tianjie Xu cba91383f7 Merge "Add UpdaterRuntime class" am: e7b3c5698e am: c6d7065880
am: 3445bf5352

Change-Id: Iee5015a8c6c6c86c6a3dd5516cc48afd02c7874d
2019-05-21 15:55:25 -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 8ab684adca Merge "Add misc_writer." am: 962f7e0c0c am: f9fb4878fc
am: 70bc3c40d2

Change-Id: I505ef030e614eda2bac7f8baa12acc92b22e9142
2019-05-21 07:01:33 -07: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 619f571114 [automerger skipped] DO NOT MERGE - Skip pi-platform-release (PPRL.190505.001) in stage-aosp-master am: e7a0262c14 -s ours
am: ec3d4af4b6

Change-Id: I1c3e43d0ee3120a84c068ec35447db3e73cb7a0e
2019-05-16 02:24:20 -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
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 4904e5f06a [automerger skipped] Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master." am: 343a7dcdd2 -s ours
am: 8e7be1faeb -s ours
am skip reason: subject contains skip directive

Change-Id: I3c51185cacadca80cfa183ec16b73426c7b9e936
2019-05-09 17:11:52 -07:00
Elliott Hughes 774a79492a Merge "Track libziparchive API change." am: 6da27adb0b
am: 46fa74623a

Change-Id: I1108099bc7dc4f20856fb611eb2552592ceff759
2019-05-09 16:18:32 -07:00
Tianjie Xu 8876c2d4ab Merge "Skip hashtree computation during block image verify" am: c046a61d97
am: e945763a5d

Change-Id: Ic732927e67fee9abab74e9ca2df2bbf271228c9e
2019-05-09 16:15:36 -07:00