Commit Graph

7872 Commits

Author SHA1 Message Date
Tianjie Xu e255db34b1 Merge "Some clean ups to the updater" am: 52e61f6995 am: a0c0e04163 am: e89cfb6a41
am: bcade69f45

Change-Id: I49da90d03a26aa77b29ba7989e628566bfc41134
2019-05-24 11:46:51 -07:00
Tao Bao e6b01a20ad [automerger skipped] Add misc_writer. am: 35e0f6d290 -s ours am: 865c17893b -s ours
am: 1406a210e6 -s ours
am skip reason: change_id I79548fc63fc79b705a0320868690569c3106949f with SHA1 35e0f6d290 is in history

Change-Id: I30f72535a86e9b076467746bf9cc112c30c02317
2019-05-24 10:02:03 -07:00
Tao Bao 5f9c1c6a28 [automerger skipped] Add misc_writer. am: 35e0f6d290 am: af0a76d1c5 -s ours
am: 29f9d20f93 -s ours
am skip reason: change_id I79548fc63fc79b705a0320868690569c3106949f with SHA1 7ae0169842 is in history

Change-Id: I902181557ecf3328123438c1bfd7dbcd7871da38
2019-05-24 05:15:51 -07:00
Elliott Hughes c99cc0bd7d Merge "Move off the Next ZipString overload." am: 7b67d28518 am: 505ed45940 am: ee57256055
am: 50b4e59890

Change-Id: Iee020cd879d088b949c6caa5edbf9a0d094c932c
2019-05-24 01:24:42 -07: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 ce1bfd3440 Merge "Revert "recovery: report compliant reboot reason"" am: 44f6b182dd am: b491496fc3 am: 863c8f36dd
am: 7c151865d6

Change-Id: Ie43cba23d466d7e8ca403c349e20b602fe7cba09
2019-05-23 17:33:12 -07: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
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 0f677e6d96 Merge "recovery: report compliant reboot reason" am: d31fb2e7fc am: c3042973a4 am: d77641069e
am: c812d98b64

Change-Id: Ib0a60bcc1d48baa811f1e08e0d7f3e86a3ed3197
2019-05-21 21:35:03 -07:00
Tianjie Xu 3a961fa48c Merge "Add UpdaterRuntime class" am: e7b3c5698e am: c6d7065880 am: 3445bf5352
am: cba91383f7

Change-Id: I44cc8652020bccd896e481f52aa439277206c87c
2019-05-21 17:54:23 -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 1af77fdc6e Merge "Add misc_writer." am: 962f7e0c0c am: f9fb4878fc am: 70bc3c40d2
am: 8ab684adca

Change-Id: Ie07b2920cd1b0d9011bc918c780db5909a786a8b
2019-05-21 07:52:50 -07: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 fa88c950af [automerger skipped] DO NOT MERGE - Skip pi-platform-release (PPRL.190505.001) in stage-aosp-master am: e7a0262c14 -s ours am: ec3d4af4b6
am: 619f571114 -s ours
am skip reason: subject contains skip directive

Change-Id: Ibd357e1ea836c9c6c8026589eb5e5b3149319fc4
2019-05-16 10:12:01 -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 8ffec8944c Merge "roots: Remove get_system_root and logical_partitions_mapped." am: ba8f38d741 am: c53856dca7
am: fb4f72cb7c

Change-Id: Ib4c2cc6f5f90f1ee59461d52f43a6fcb035bcf03
2019-05-10 21:12:19 -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