Commit Graph

5764 Commits

Author SHA1 Message Date
android-build-team Robot fed545c3d0 Snap for 4677756 from 454d8cb805 to pi-release
Change-Id: I9f8809bd55a9ef6fb3bbe87a3e6e14ebce21e346
2018-03-25 07:22:59 +00:00
Tao Bao 454d8cb805 update_verifier: Support verifying product partition.
We have added the support for building /product partition in build
system (the CL in [1]), where /product is an optional partition that
contains system files. This CL adds the matching support if /product
needs to be verified during A/B OTA (i.e. listed in care_map file).

[1]: commit b7735d81054002961b681f4bdf296d4de2701135,
https://android-review.googlesource.com/c/platform/build/+/598454

Bug: 63974895
Test: Run update_verifier test on walleye.
Change-Id: Ia1c35e9583b8e66c98a4495b1f81a5ea7e65036f
(cherry picked from commit ec2e8c6c1e)
2018-03-23 13:27:53 -07:00
android-build-team Robot fbeae911f2 Snap for 4667902 from d26f95287a to pi-release
Change-Id: I605686a3e01336b93e08138582a6699241bd74cc
2018-03-21 07:23:32 +00:00
Tao Bao d26f95287a tests: Add ApplyPatchModesTest.PatchModeEmmcTargetWithBsdiffPatch test.
/system/bin/applypatch on device is expected to work with bsdiff based
recovery-from-boot patch automatically. Adding a test to ensure that's
always the case.

Bug: 72731506
Test: Run recovery_component_test on marlin.
Change-Id: I56283cd3ce7cf0215cc3bb3619b206fa01d552c4
Merged-In: I56283cd3ce7cf0215cc3bb3619b206fa01d552c4
(cherry picked from commit d612b23dfd)
2018-03-20 11:38:16 +08:00
android-build-team Robot 51ee8b3498 Snap for 4653471 from 91b48f9161 to pi-release
Change-Id: I1e519fd15128cb72d92c174fb3281bf18f6f0e77
2018-03-14 07:23:56 +00:00
Yifan Hong 91b48f9161 recovery: add libhidl-gen-utils depedency
introduced as a depedency to libvintf.

Test: builds
Bug: 73556059
Change-Id: Ia51ba81ef462879481dcacb80d9ea9ea35e8b0bb
Merged-In: Ia51ba81ef462879481dcacb80d9ea9ea35e8b0bb
2018-03-13 10:56:51 -07:00
android-build-team Robot dc11abe7e7 Snap for 4647811 from 01daebbe68 to pi-release
Change-Id: I1dcb91ad283d8ceca1168ef7a7f716220c3e53b5
2018-03-11 08:25:03 +00:00
Tianjie Xu 01daebbe68 Set the update locations to default in CacheLocation's constructor
Otherwise the applypatch executable will fail to back up the source
file to /cache when patching the recovery image.

Bug: 74198354
Test: run applypatch from boot to recovery
(cherry picked from commit b4e3a370bf)

Change-Id: I37b7fd88d66ab49ef953d4b7dca22577bd1472e1
2018-03-08 14:40:09 -08:00
android-build-team Robot 328e4aa905 Snap for 4632767 from 4249cdfe29 to pi-release
Change-Id: Ieee5571b39c09cc4b44a29d140dbf9124ef1f5ea
2018-03-04 08:22:47 +00:00
Tianjie Xu 4249cdfe29 Merge "Add a singleton CacheLocation to replace the hard coded locations" am: 47cd789eed am: a72f93d6da
am: 6c87845cfb

Change-Id: If8cf8b4f86ceae41d19ecbcf8e8fc62ef17eb2ac
2018-03-01 18:58:27 +00:00
Tianjie Xu 6c87845cfb Merge "Add a singleton CacheLocation to replace the hard coded locations" am: 47cd789eed
am: a72f93d6da

Change-Id: Ie505267652e83735f60e8acc93da22e2ac1abe69
2018-03-01 18:52:54 +00:00
Tianjie Xu a72f93d6da Merge "Add a singleton CacheLocation to replace the hard coded locations"
am: 47cd789eed

Change-Id: I11c265d3adebc338e0603ed00c7d1aaaffae0253
2018-03-01 18:45:52 +00:00
Tianjie Xu 47cd789eed Merge "Add a singleton CacheLocation to replace the hard coded locations" 2018-03-01 18:36:05 +00:00
android-build-team Robot 93015f75ba Snap for 4628106 from bb928df6eb to pi-release
Change-Id: I7c640dea7542f462d8bd820cc0f19d53c367035a
2018-03-01 08:24:32 +00:00
Tianjie Xu 3bbb20f557 Add a singleton CacheLocation to replace the hard coded locations
This class allows us to set the following locations dynamically:
cache_temp_source, last_command_file, stash_directory_base.

In the updater's main function, we reset the values of these variables
to their default locations in /cache; while we can set them to temp
files in unit tests or host simulation.

Test: unit tests pass
Change-Id: I528652650caa41373617ab055d41b1f1a4ec0f87
2018-02-28 11:19:11 -08:00
Tianjie Xu bb928df6eb Merge "Fix the behavior of undefined commands in BlockImageVerify" am: ac4818d6af am: 7b9a92c1e2
am: e0f7c39c4f

Change-Id: I33b49c01cfaa0e1ec8bfc7f92ffe5c7d034c3bf4
2018-02-28 19:11:05 +00:00
Tianjie Xu e0f7c39c4f Merge "Fix the behavior of undefined commands in BlockImageVerify" am: ac4818d6af
am: 7b9a92c1e2

Change-Id: I7891f4e907cc73618b99e2102eb8844771554b1f
2018-02-28 19:05:04 +00:00
Tianjie Xu 7b9a92c1e2 Merge "Fix the behavior of undefined commands in BlockImageVerify"
am: ac4818d6af

Change-Id: I5e42bcafca4c42e6c30cef082c03ad2b8d18ac6c
2018-02-28 18:59:33 +00:00
Tianjie Xu ac4818d6af Merge "Fix the behavior of undefined commands in BlockImageVerify" 2018-02-28 18:49:56 +00:00
Tianjie Xu c242084539 Fix the behavior of undefined commands in BlockImageVerify
In BlockImageVerify some commands are undefined, e.g. "erase", "new",
"zero". And we should not error out if the corresponding function
pointer of these commands is null; otherwise we will fail the
verification.

The old code is:
if (cmd->f != nullptr && cmd->f(params) == -1)
  return false;

In the last_command_file change the logic was wrongly modified to
if (cmd->f == nullptr)
  return false;
...
if (cmd->f(params) == -1)
  return false;

Test: sideload an incremental OTA twice on bullhead
Change-Id: I2561c365badb850da0e416629ccd61f0df7da5d7
2018-02-27 23:04:14 -08:00
android-build-team Robot 4bda178fe4 Snap for 4620899 from 133d1d25d7 to pi-release
Change-Id: I011a060835bd8ba755908704bc883c8d444a49a6
2018-02-25 08:29:23 +00:00
Tianjie Xu 133d1d25d7 Merge "Remove the assumption of target chunk size in imgdiff" am: cc3446a7f7 am: a306d7bc55
am: 98da1357b4

Change-Id: Ieb024183866d702c72a3c1d3a4636500ebfc0b0a
2018-02-23 21:55:58 +00:00
Tianjie Xu 98da1357b4 Merge "Remove the assumption of target chunk size in imgdiff" am: cc3446a7f7
am: a306d7bc55

Change-Id: Ieb2fe6cf9f8bf71a5018809f16510c4ef05420d4
2018-02-23 21:43:14 +00:00
Tianjie Xu a306d7bc55 Merge "Remove the assumption of target chunk size in imgdiff"
am: cc3446a7f7

Change-Id: Ic5d50e6c54dfd352950925d01448020669735056
2018-02-23 21:31:09 +00:00
Treehugger Robot cc3446a7f7 Merge "Remove the assumption of target chunk size in imgdiff" 2018-02-23 21:12:39 +00:00
Tianjie Xu 572abbb81c Remove the assumption of target chunk size in imgdiff
In the split mode of imgdiff, we used to assume that the size of a split
target chunk is always greater than the blocksize i.e. 4096. This may
lead to the following assertion failure:
I0221 04:57:33.451323 818464 common.py:205 imgdiff F 02-21 04:57:33 821203 821203 imgdiff.cpp:999]
Check failed: tgt_size >= BLOCK_SIZE (tgt_size=476, BLOCK_SIZE=4096)

This CL removes the assumption and handles the edge cases.

Test: generate and verify the incremental update for TFs in the bug; unit test passes

Bug: 73757557
Bug: 73711365
Change-Id: Iadbb4ee658995f5856cd488f3793980881a59620
2018-02-23 10:44:05 -08:00
George Burgess IV a362703826 Merge "Replace vfork() with fork()." am: 21b381622d am: 44f2cb2d67
am: c298833b1c

Change-Id: Ia72697181a9132713b216b6f7c0b7116e09d62fd
2018-02-23 17:47:22 +00:00
George Burgess IV c298833b1c Merge "Replace vfork() with fork()." am: 21b381622d
am: 44f2cb2d67

Change-Id: Ie67e2e0a39c781e27916294f501fcc4ef8fbd38f
2018-02-23 17:31:08 +00:00
George Burgess IV 44f2cb2d67 Merge "Replace vfork() with fork()."
am: 21b381622d

Change-Id: Ia06201cedfcca6358f6f65face5325a4cf528f72
2018-02-23 17:24:51 +00:00
Treehugger Robot 21b381622d Merge "Replace vfork() with fork()." 2018-02-23 17:04:34 +00:00
George Burgess IV 1cfb361129 Replace vfork() with fork().
The static analyzer complained about the function calls we were doing
here to vector::data() and vector::operator[]:
bootable/recovery/roots.cpp:193:11: warning: This function call is
prohibited after a successful vfork

Since it's not clear that vfork() is needed here, just use fork()
instead.

Bug: None
Test: Reran the static analyzer with only this patch applied. Bug
disappeared
Change-Id: I580f8243a21899f1e1678c8aee6948dfa7f69a1d
2018-02-22 19:25:22 -08:00
android-build-team Robot 0674c1b5c0 Snap for 4615953 from a7df318913 to pi-release
Change-Id: I86b50328a92a96d7fdb1ab7193a168f77af6593d
2018-02-22 08:22:26 +00:00
Bill Yi 0bfea531d8 Import translations. DO NOT MERGE
Change-Id: I60c4e4ebce0bf3abcc2b0b5ab90b0fc5e9406c34
Auto-generated-cl: translation import
2018-02-21 17:03:26 -08:00
hansson a7df318913 Merge "Set LOCAL_SDK_VERSION where possible." am: bf52b7e00b am: cd06b1696d
am: b1ac1b8494

Change-Id: Id51803759530a630ecfb287126c5e366938ad09f
2018-02-21 17:47:02 +00:00
hansson b1ac1b8494 Merge "Set LOCAL_SDK_VERSION where possible." am: bf52b7e00b
am: cd06b1696d

Change-Id: I78bbe2e58b6d7d442984d3533dedbae705cb156f
2018-02-21 17:37:58 +00:00
hansson cd06b1696d Merge "Set LOCAL_SDK_VERSION where possible."
am: bf52b7e00b

Change-Id: I91a73e01b2a9b13923a551957da98a2eb9363dc9
2018-02-21 17:31:10 +00:00
hansson bf52b7e00b Merge "Set LOCAL_SDK_VERSION where possible." 2018-02-21 17:20:44 +00:00
Anton Hansson 6cc499ae07 Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: I82fee834c5d92e699e9571933faded11c6d4596e
2018-02-21 14:11:02 +00:00
android-build-team Robot b5b8da2d5b Snap for 4611397 from 0d4a75abf0 to pi-release
Change-Id: Iaf6d6b24c3434cd64c910a0b74568c882b8a2d8c
2018-02-19 08:26:31 +00:00
Tianjie Xu 0d4a75abf0 Merge "Disable building libapplypatch on mac" am: c1e1d7e711 am: 2754916f01
am: bda2f67775

Change-Id: I378aa4bb2a7d5cd7765feb0fc99f92f1b51a377b
2018-02-18 08:45:43 +00:00
Tianjie Xu bda2f67775 Merge "Disable building libapplypatch on mac" am: c1e1d7e711
am: 2754916f01

Change-Id: Ibfb57ca66bb826b2710db4572a2d3d730a7db0e5
2018-02-18 08:35:39 +00:00
android-build-team Robot 56bfd57e1a Snap for 4610834 from 7920648ebb to pi-release
Change-Id: I46be8ae5976b2a4d036c3b880f7c247f957ffa49
2018-02-18 08:27:23 +00:00
Tianjie Xu 2754916f01 Merge "Disable building libapplypatch on mac"
am: c1e1d7e711

Change-Id: I333af93c0dc7cf8b2a175f6c42c5321f442bd115
2018-02-18 08:24:05 +00:00
Treehugger Robot c1e1d7e711 Merge "Disable building libapplypatch on mac" 2018-02-18 08:15:13 +00:00
Tianjie Xu 7a4dacf724 Disable building libapplypatch on mac
The sdk_mac on build server fails with the error:
bootable/recovery/applypatch/freecache.cpp:23:10: fatal error: 'sys/statfs.h' file not found

So we will disable libapplypatch on mac.

Test: the library still builds on linux; and check the other host targets in the same cl.
Change-Id: Ie4a30708726e51c810f7ad7f1085d38154076cca
2018-02-17 22:06:31 -08:00
Tianjie Xu 7920648ebb Merge "Skip the cache size check on host" am: 31bcd7c002 am: fb8496e3aa
am: 021d8fe0a3

Change-Id: I6414283e319e124595ef2b8be1428f7952c8fdeb
2018-02-17 00:45:45 +00:00
Tianjie Xu 021d8fe0a3 Merge "Skip the cache size check on host" am: 31bcd7c002
am: fb8496e3aa

Change-Id: If57297252bfe3ccf9c45028747a8fa8760052c48
2018-02-17 00:36:42 +00:00
Tianjie Xu fb8496e3aa Merge "Skip the cache size check on host"
am: 31bcd7c002

Change-Id: If265166022cc36142e4cc6061f1165e9814e9482
2018-02-17 00:29:07 +00:00
Tianjie Xu 31bcd7c002 Merge "Skip the cache size check on host" 2018-02-17 00:15:19 +00:00
Tao Bao 1efbdc25a2 Merge "recovery: Porting screensave mode for new platform." am: 15e376d792 am: 470b4fef7f
am: 78997a2af5

Change-Id: Ife60145d34a88c8e474931966f456804e39a317c
2018-02-16 05:28:56 +00:00