blob: 9d6ec7c73f177c9e3cb9ea9a826143acfe001c31 [file] [log] [blame]
Dan Willemsenf5a904e2018-10-23 01:02:44 -07001//
2// Copyright (C) 2015 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
Colin Cross606913a2017-11-14 13:05:37 -080017// AIDL interface between libupdate_engine and framework.jar
18filegroup {
19 name: "libupdate_engine_aidl",
20 srcs: [
21 "binder_bindings/android/os/IUpdateEngine.aidl",
22 "binder_bindings/android/os/IUpdateEngineCallback.aidl",
23 ],
Dan Willemsenf5a904e2018-10-23 01:02:44 -070024 path: "binder_bindings",
25}
26
27cc_defaults {
28 name: "ue_defaults",
29
30 cflags: [
Amin Hassani2e4eda52019-01-07 14:01:17 -080031 "-DBASE_VER=576279",
Dan Willemsenf5a904e2018-10-23 01:02:44 -070032 "-DUSE_BINDER=1",
33 "-DUSE_CHROME_NETWORK_PROXY=0",
34 "-DUSE_CHROME_KIOSK_APP=0",
Dan Willemsenf5a904e2018-10-23 01:02:44 -070035 "-DUSE_HWID_OVERRIDE=0",
36 "-DUSE_MTD=0",
37 "-DUSE_OMAHA=0",
38 "-D_FILE_OFFSET_BITS=64",
39 "-D_POSIX_C_SOURCE=199309L",
40 "-Wa,--noexecstack",
41 "-Wall",
42 "-Werror",
43 "-Wextra",
44 "-Wformat=2",
45 "-Wno-psabi",
46 "-Wno-unused-parameter",
47 "-ffunction-sections",
48 "-fstack-protector-strong",
49 "-fvisibility=hidden",
50 ],
51 cppflags: [
52 "-Wnon-virtual-dtor",
53 "-fno-strict-aliasing",
54 ],
55 include_dirs: ["system"],
56 local_include_dirs: ["client_library/include"],
57 static_libs: ["libgtest_prod"],
58 shared_libs: [
59 "libbrillo-stream",
60 "libbrillo",
61 "libchrome",
62 ],
63 ldflags: ["-Wl,--gc-sections"],
64
65 product_variables: {
66 pdk: {
67 enabled: false,
68 },
69 },
70
71 target: {
Sen Jiangb5f631d2018-12-18 16:59:57 -080072 android: {
73 cflags: [
74 "-DUSE_FEC=1",
75 ],
76 },
77 host: {
78 cflags: [
79 "-DUSE_FEC=0",
80 ],
81 },
Dan Willemsenf5a904e2018-10-23 01:02:44 -070082 darwin: {
83 enabled: false,
84 },
85 },
86}
87
88// update_metadata-protos (type: static_library)
89// ========================================================
90// Protobufs.
91cc_defaults {
92 name: "update_metadata-protos_exports",
93
94 shared_libs: ["libprotobuf-cpp-lite"],
95}
96
97cc_library_static {
98 name: "update_metadata-protos",
99 host_supported: true,
100 recovery_available: true,
101
102 srcs: ["update_engine/update_metadata.proto"],
103 cflags: [
104 "-Wall",
105 "-Werror",
106 ],
107 proto: {
108 canonical_path_from_root: false,
109 export_proto_headers: true,
110 },
111}
112
113// libpayload_consumer (type: static_library)
114// ========================================================
115// The payload application component and common dependencies.
116cc_defaults {
117 name: "libpayload_consumer_exports",
118 defaults: ["update_metadata-protos_exports"],
119
120 static_libs: [
121 "update_metadata-protos",
122 "libxz",
123 "libbz",
124 "libbspatch",
125 "libbrotli",
126 "libfec_rs",
127 "libpuffpatch",
128 "libverity_tree",
129 ],
130 shared_libs: [
Tianjie Xu7a78d632019-10-08 16:32:39 -0700131 "libziparchive",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700132 "libbase",
133 "libcrypto",
Sen Jiangb5f631d2018-12-18 16:59:57 -0800134 "libfec",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700135 ],
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700136}
137
138cc_library_static {
139 name: "libpayload_consumer",
140 defaults: [
141 "ue_defaults",
142 "libpayload_consumer_exports",
143 ],
144 host_supported: true,
145 recovery_available: true,
146
147 srcs: [
148 "common/action_processor.cc",
149 "common/boot_control_stub.cc",
150 "common/clock.cc",
151 "common/constants.cc",
152 "common/cpu_limiter.cc",
Yifan Hongdaac7322019-11-07 10:48:26 -0800153 "common/dynamic_partition_control_stub.cc",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700154 "common/error_code_utils.cc",
155 "common/file_fetcher.cc",
156 "common/hash_calculator.cc",
157 "common/http_common.cc",
158 "common/http_fetcher.cc",
159 "common/hwid_override.cc",
160 "common/multi_range_http_fetcher.cc",
161 "common/platform_constants_android.cc",
162 "common/prefs.cc",
163 "common/proxy_resolver.cc",
164 "common/subprocess.cc",
165 "common/terminator.cc",
166 "common/utils.cc",
167 "payload_consumer/bzip_extent_writer.cc",
168 "payload_consumer/cached_file_descriptor.cc",
Tianjie Xu7a78d632019-10-08 16:32:39 -0700169 "payload_consumer/certificate_parser_android.cc",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700170 "payload_consumer/delta_performer.cc",
171 "payload_consumer/download_action.cc",
172 "payload_consumer/extent_reader.cc",
173 "payload_consumer/extent_writer.cc",
174 "payload_consumer/file_descriptor.cc",
175 "payload_consumer/file_descriptor_utils.cc",
176 "payload_consumer/file_writer.cc",
177 "payload_consumer/filesystem_verifier_action.cc",
178 "payload_consumer/install_plan.cc",
179 "payload_consumer/mount_history.cc",
180 "payload_consumer/payload_constants.cc",
181 "payload_consumer/payload_metadata.cc",
182 "payload_consumer/payload_verifier.cc",
183 "payload_consumer/postinstall_runner_action.cc",
184 "payload_consumer/verity_writer_android.cc",
185 "payload_consumer/xz_extent_writer.cc",
186 "payload_consumer/fec_file_descriptor.cc",
187 ],
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700188}
189
190// libupdate_engine_boot_control (type: static_library)
191// ========================================================
192// A BootControl class implementation using Android's HIDL boot_control HAL.
193cc_defaults {
194 name: "libupdate_engine_boot_control_exports",
195 defaults: ["update_metadata-protos_exports"],
196
Yifan Hong420db9b2019-07-23 20:50:33 -0700197 static_libs: [
198 "libsnapshot",
199 "update_metadata-protos",
200 ],
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700201 shared_libs: [
202 "libbootloader_message",
203 "libfs_mgr",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700204 "libhidlbase",
205 "liblp",
206 "libutils",
207 "android.hardware.boot@1.0",
David Anderson2111d062019-10-15 22:36:27 -0700208 "android.hardware.boot@1.1",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700209 ],
Yifan Hong420db9b2019-07-23 20:50:33 -0700210 target: {
211 recovery: {
212 static_libs: ["libsnapshot_nobinder"],
213 exclude_static_libs: ["libsnapshot"],
214 },
215 },
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700216}
217
218cc_library_static {
219 name: "libupdate_engine_boot_control",
220 defaults: [
221 "ue_defaults",
222 "libupdate_engine_boot_control_exports",
223 ],
224 recovery_available: true,
225
226 srcs: [
227 "boot_control_android.cc",
228 "dynamic_partition_control_android.cc",
Yifan Hong012508e2019-07-22 18:30:40 -0700229 "dynamic_partition_utils.cc",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700230 ],
231}
232
233// libupdate_engine_android (type: static_library)
234// ========================================================
235// The main daemon static_library used in Android (non-Brillo). This only has a
236// loop to apply payloads provided by the upper layer via a Binder interface.
237cc_defaults {
238 name: "libupdate_engine_android_exports",
239 defaults: [
240 "ue_defaults",
241 "libpayload_consumer_exports",
242 "libupdate_engine_boot_control_exports",
243 ],
244
245 static_libs: [
246 "libpayload_consumer",
247 "libupdate_engine_boot_control",
248 ],
249 shared_libs: [
250 "libandroid_net",
251 "libbase",
252 "libbinder",
253 "libbinderwrapper",
254 "libbootloader_message",
255 "libbrillo-binder",
256 "libcurl",
257 "libcutils",
258 "liblog",
259 "libmetricslogger",
260 "libssl",
261 "libutils",
262 ],
263}
264
265cc_library_static {
266 name: "libupdate_engine_android",
267 defaults: [
268 "ue_defaults",
269 "libupdate_engine_android_exports",
270 ],
271
272 // TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved
273 // out of the DBus interface.
274 include_dirs: ["external/cros/system_api/dbus"],
275
276 aidl: {
277 local_include_dirs: ["binder_bindings"],
278 export_aidl_headers: true,
279 },
280
281 srcs: [
282 ":libupdate_engine_aidl",
283 "binder_service_android.cc",
284 "certificate_checker.cc",
285 "daemon.cc",
286 "daemon_state_android.cc",
287 "hardware_android.cc",
288 "libcurl_http_fetcher.cc",
289 "metrics_reporter_android.cc",
290 "metrics_utils.cc",
291 "network_selector_android.cc",
292 "update_attempter_android.cc",
293 "update_boot_flags_action.cc",
294 "update_status_utils.cc",
295 ],
296}
297
298// update_engine (type: executable)
299// ========================================================
300// update_engine daemon.
301cc_binary {
302 name: "update_engine",
303 defaults: [
304 "ue_defaults",
305 "libupdate_engine_android_exports",
306 ],
307
308 static_libs: ["libupdate_engine_android"],
Tao Bao1e1c86c2019-04-18 10:48:32 -0700309 required: [
310 "cacerts_google",
Tianjie Xube4ea232019-10-15 18:08:31 -0700311 "otacerts",
Tao Bao1e1c86c2019-04-18 10:48:32 -0700312 ],
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700313
314 srcs: ["main.cc"],
315 init_rc: ["update_engine.rc"],
316}
317
318// update_engine_sideload (type: executable)
319// ========================================================
320// A binary executable equivalent to update_engine daemon that installs an update
321// from a local file directly instead of running in the background. Used in
322// recovery image.
323cc_binary {
324 name: "update_engine_sideload",
325 defaults: [
326 "ue_defaults",
327 "update_metadata-protos_exports",
328 "libupdate_engine_boot_control_exports",
329 "libpayload_consumer_exports",
330 ],
331 recovery: true,
332
333 cflags: ["-D_UE_SIDELOAD"],
334 // TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved
335 // out of the DBus interface.
336 include_dirs: ["external/cros/system_api/dbus"],
337
338 srcs: [
339 "hardware_android.cc",
340 "metrics_reporter_stub.cc",
341 "metrics_utils.cc",
342 "network_selector_stub.cc",
Yifan Hongc73cb8c2019-10-24 18:28:31 -0700343 "sideload_logging_android.cc",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700344 "sideload_main.cc",
345 "update_attempter_android.cc",
346 "update_boot_flags_action.cc",
347 "update_status_utils.cc",
348 ],
349
350 // Use commonly used shared libraries. libprotobuf-cpp-lite.so is filtered out,
351 // as it doesn't look beneficial to be installed separately due to its size. Note
352 // that we explicitly request their recovery variants, so that the expected files
353 // will be used and installed.
354 shared_libs: [
355 "libbase",
356 "liblog",
357 ],
358 static_libs: [
359 "libpayload_consumer",
360 "libupdate_engine_boot_control",
361 "update_metadata-protos",
362
363 // We add the static versions of the shared libraries that are not installed to
364 // recovery image due to size concerns. Need to include all the static library
365 // dependencies of these static libraries.
366 "libevent",
367 "libmodpb64",
368 "libgtest_prod",
369 "libprotobuf-cpp-lite",
370 "libbrillo-stream",
371 "libbrillo",
372 "libchrome",
373 ],
374 target: {
375 recovery: {
376 exclude_shared_libs: [
377 "libprotobuf-cpp-lite",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700378 "libbrillo-stream",
379 "libbrillo",
380 "libchrome",
381 ],
382 },
383 },
384
Tao Bao1e1c86c2019-04-18 10:48:32 -0700385 required: [
Tianjie Xube4ea232019-10-15 18:08:31 -0700386 "otacerts.recovery",
Tao Bao1e1c86c2019-04-18 10:48:32 -0700387 ],
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700388}
389
390// libupdate_engine_client (type: shared_library)
391// ========================================================
392cc_library_shared {
393 name: "libupdate_engine_client",
394
395 cflags: [
396 "-Wall",
397 "-Werror",
398 "-Wno-unused-parameter",
399 "-DUSE_BINDER=1",
400 ],
401 export_include_dirs: ["client_library/include"],
402 include_dirs: [
403 // TODO(deymo): Remove "external/cros/system_api/dbus" when dbus is not used.
404 "external/cros/system_api/dbus",
405 "system",
406 ],
407
408 aidl: {
409 local_include_dirs: ["binder_bindings"],
410 },
411
412 shared_libs: [
413 "libchrome",
414 "libbrillo",
415 "libbinder",
416 "libbrillo-binder",
417 "libutils",
418 ],
419
420 srcs: [
Dan Willemsen3c7e4b62019-06-06 14:56:15 -0700421 ":libupdate_engine_client_aidl",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700422 "client_library/client.cc",
423 "client_library/client_binder.cc",
424 "parcelable_update_engine_status.cc",
425 "update_status_utils.cc",
426 ],
427}
428
Dan Willemsen3c7e4b62019-06-06 14:56:15 -0700429filegroup {
430 name: "libupdate_engine_client_aidl",
431 srcs: [
432 "binder_bindings/android/brillo/IUpdateEngine.aidl",
433 "binder_bindings/android/brillo/IUpdateEngineStatusCallback.aidl",
434 ],
435 path: "binder_bindings",
436}
437
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700438// update_engine_client (type: executable)
439// ========================================================
440// update_engine console client.
441cc_binary {
442 name: "update_engine_client",
443 defaults: ["ue_defaults"],
444
445 // TODO(deymo): Remove external/cros/system_api/dbus once the strings are moved
446 // out of the DBus interface.
447 include_dirs: ["external/cros/system_api/dbus"],
448
449 shared_libs: [
450 "libbinder",
451 "libbinderwrapper",
452 "libbrillo-binder",
453 "libutils",
454 ],
455
456 aidl: {
457 local_include_dirs: ["binder_bindings"],
458 },
459
460 srcs: [
461 ":libupdate_engine_aidl",
462 "common/error_code_utils.cc",
463 "update_engine_client_android.cc",
464 "update_status_utils.cc",
465 ],
466}
467
468// libpayload_generator (type: static_library)
469// ========================================================
470// server-side code. This is used for delta_generator and unittests but not
471// for any client code.
472cc_defaults {
473 name: "libpayload_generator_exports",
474 defaults: [
475 "libpayload_consumer_exports",
476 "update_metadata-protos_exports",
477 ],
478
479 static_libs: [
480 "libavb",
481 "libbrotli",
482 "libbsdiff",
483 "libdivsufsort",
484 "libdivsufsort64",
485 "liblzma",
486 "libpayload_consumer",
487 "libpuffdiff",
488 "libverity_tree",
489 "update_metadata-protos",
490 ],
491 shared_libs: [
492 "libbase",
493 "libext2fs",
494 ],
495}
496
497cc_library_static {
498 name: "libpayload_generator",
499 defaults: [
500 "ue_defaults",
501 "libpayload_generator_exports",
502 ],
503 host_supported: true,
504
505 srcs: [
506 "payload_generator/ab_generator.cc",
507 "payload_generator/annotated_operation.cc",
508 "payload_generator/blob_file_writer.cc",
509 "payload_generator/block_mapping.cc",
510 "payload_generator/boot_img_filesystem.cc",
511 "payload_generator/bzip.cc",
512 "payload_generator/cycle_breaker.cc",
513 "payload_generator/deflate_utils.cc",
514 "payload_generator/delta_diff_generator.cc",
515 "payload_generator/delta_diff_utils.cc",
516 "payload_generator/ext2_filesystem.cc",
517 "payload_generator/extent_ranges.cc",
518 "payload_generator/extent_utils.cc",
519 "payload_generator/full_update_generator.cc",
520 "payload_generator/graph_types.cc",
521 "payload_generator/graph_utils.cc",
522 "payload_generator/inplace_generator.cc",
523 "payload_generator/mapfile_filesystem.cc",
524 "payload_generator/payload_file.cc",
525 "payload_generator/payload_generation_config_android.cc",
526 "payload_generator/payload_generation_config.cc",
527 "payload_generator/payload_signer.cc",
528 "payload_generator/raw_filesystem.cc",
529 "payload_generator/squashfs_filesystem.cc",
530 "payload_generator/tarjan.cc",
531 "payload_generator/topological_sort.cc",
532 "payload_generator/xz_android.cc",
533 ],
534}
535
536// delta_generator (type: executable)
537// ========================================================
538// server-side delta generator.
539cc_binary_host {
540 name: "delta_generator",
541 defaults: [
542 "ue_defaults",
543 "libpayload_generator_exports",
544 "libpayload_consumer_exports",
545 ],
546
547 static_libs: [
548 "libavb_host_sysdeps",
549 "libpayload_consumer",
550 "libpayload_generator",
551 ],
552
553 srcs: ["payload_generator/generate_delta_main.cc"],
554}
555
556cc_test {
557 name: "ue_unittest_delta_generator",
558 defaults: [
559 "ue_defaults",
560 "libpayload_generator_exports",
561 "libpayload_consumer_exports",
562 ],
563
564 static_libs: [
565 "libpayload_consumer",
566 "libpayload_generator",
567 ],
568
569 srcs: ["payload_generator/generate_delta_main.cc"],
570
571 gtest: false,
572 stem: "delta_generator",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700573}
574
575// test_http_server (type: executable)
576// ========================================================
577// Test HTTP Server.
578cc_test {
579 name: "test_http_server",
580 defaults: ["ue_defaults"],
581 srcs: [
582 "common/http_common.cc",
583 "test_http_server.cc",
584 ],
585
586 gtest: false,
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700587}
588
589// test_subprocess (type: executable)
590// ========================================================
591// Test helper subprocess program.
592cc_test {
593 name: "test_subprocess",
594 defaults: ["ue_defaults"],
595 srcs: ["test_subprocess.cc"],
596
597 gtest: false,
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700598}
599
600// Public keys for unittests.
601// ========================================================
602genrule {
603 name: "ue_unittest_keys",
604 cmd: "openssl rsa -in $(location unittest_key.pem) -pubout -out $(location unittest_key.pub.pem) &&" +
xunchangcda3c032019-03-26 15:41:14 -0700605 "openssl rsa -in $(location unittest_key2.pem) -pubout -out $(location unittest_key2.pub.pem) &&" +
Tianjie Xu7bbe0152019-10-09 18:11:15 -0700606 "openssl rsa -in $(location unittest_key_RSA4096.pem) -pubout -out $(location unittest_key_RSA4096.pub.pem) &&" +
607 "openssl pkey -in $(location unittest_key_EC.pem) -pubout -out $(location unittest_key_EC.pub.pem)",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700608 srcs: [
609 "unittest_key.pem",
610 "unittest_key2.pem",
xunchangcda3c032019-03-26 15:41:14 -0700611 "unittest_key_RSA4096.pem",
Tianjie Xu7bbe0152019-10-09 18:11:15 -0700612 "unittest_key_EC.pem",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700613 ],
614 out: [
615 "unittest_key.pub.pem",
616 "unittest_key2.pub.pem",
xunchangcda3c032019-03-26 15:41:14 -0700617 "unittest_key_RSA4096.pub.pem",
Tianjie Xu7bbe0152019-10-09 18:11:15 -0700618 "unittest_key_EC.pub.pem",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700619 ],
620}
621
622// Sample images for unittests.
623// ========================================================
624// Extract sample image from the compressed sample_images.tar.bz2 file used by
625// the unittests.
626genrule {
627 name: "ue_unittest_disk_imgs",
628 cmd: "tar -jxf $(in) -C $(genDir)/gen disk_ext2_1k.img disk_ext2_4k.img disk_ext2_4k_empty.img disk_ext2_unittest.img",
629 srcs: ["sample_images/sample_images.tar.bz2"],
630 out: [
631 "gen/disk_ext2_1k.img",
632 "gen/disk_ext2_4k.img",
633 "gen/disk_ext2_4k_empty.img",
634 "gen/disk_ext2_unittest.img",
635 ],
636}
637
638// update_engine_unittests (type: executable)
639// ========================================================
640// Main unittest file.
641cc_test {
642 name: "update_engine_unittests",
643 defaults: [
644 "ue_defaults",
645 "libpayload_generator_exports",
646 "libupdate_engine_android_exports",
647 ],
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700648
649 static_libs: [
650 "libpayload_generator",
651 "libbrillo-test-helpers",
652 "libgmock",
653 "libchrome_test_helpers",
654 "libupdate_engine_android",
Tianjie Xu173e6192019-12-10 10:56:01 -0800655 "libdm",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700656 ],
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700657
Yifan Hong87ea73f2019-09-12 13:07:37 -0700658 header_libs: [
659 "libstorage_literals_headers",
660 ],
661
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700662 data: [
Tao Bao9456b6f2019-04-29 18:14:58 -0700663 ":test_http_server",
664 ":test_subprocess",
665 ":ue_unittest_delta_generator",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700666 ":ue_unittest_disk_imgs",
667 ":ue_unittest_keys",
Tianjie Xu7a78d632019-10-08 16:32:39 -0700668 "otacerts.zip",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700669 "unittest_key.pem",
670 "unittest_key2.pem",
xunchangcda3c032019-03-26 15:41:14 -0700671 "unittest_key_RSA4096.pem",
Tianjie Xu7bbe0152019-10-09 18:11:15 -0700672 "unittest_key_EC.pem",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700673 "update_engine.conf",
674 ],
675
Tao Bao9456b6f2019-04-29 18:14:58 -0700676 // We cannot use the default generated AndroidTest.xml because of the use of helper modules
677 // (i.e. test_http_server, test_subprocess, ue_unittest_delta_generator).
678 test_config: "test_config.xml",
679 test_suites: ["device-tests"],
680
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700681 srcs: [
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700682 "certificate_checker_unittest.cc",
683 "common/action_pipe_unittest.cc",
684 "common/action_processor_unittest.cc",
685 "common/action_unittest.cc",
686 "common/cpu_limiter_unittest.cc",
687 "common/fake_prefs.cc",
688 "common/file_fetcher_unittest.cc",
689 "common/hash_calculator_unittest.cc",
690 "common/http_fetcher_unittest.cc",
691 "common/hwid_override_unittest.cc",
692 "common/mock_http_fetcher.cc",
693 "common/prefs_unittest.cc",
694 "common/proxy_resolver_unittest.cc",
695 "common/subprocess_unittest.cc",
696 "common/terminator_unittest.cc",
697 "common/test_utils.cc",
698 "common/utils_unittest.cc",
Yifan Hongc049f932019-07-23 15:06:05 -0700699 "dynamic_partition_control_android_unittest.cc",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700700 "payload_consumer/bzip_extent_writer_unittest.cc",
701 "payload_consumer/cached_file_descriptor_unittest.cc",
Tianjie Xu7a78d632019-10-08 16:32:39 -0700702 "payload_consumer/certificate_parser_android_unittest.cc",
Dan Willemsenf5a904e2018-10-23 01:02:44 -0700703 "payload_consumer/delta_performer_integration_test.cc",
704 "payload_consumer/delta_performer_unittest.cc",
705 "payload_consumer/extent_reader_unittest.cc",
706 "payload_consumer/extent_writer_unittest.cc",
707 "payload_consumer/fake_file_descriptor.cc",
708 "payload_consumer/file_descriptor_utils_unittest.cc",
709 "payload_consumer/file_writer_unittest.cc",
710 "payload_consumer/filesystem_verifier_action_unittest.cc",
711 "payload_consumer/postinstall_runner_action_unittest.cc",
712 "payload_consumer/verity_writer_android_unittest.cc",
713 "payload_consumer/xz_extent_writer_unittest.cc",
714 "payload_generator/ab_generator_unittest.cc",
715 "payload_generator/blob_file_writer_unittest.cc",
716 "payload_generator/block_mapping_unittest.cc",
717 "payload_generator/boot_img_filesystem_unittest.cc",
718 "payload_generator/cycle_breaker_unittest.cc",
719 "payload_generator/deflate_utils_unittest.cc",
720 "payload_generator/delta_diff_utils_unittest.cc",
721 "payload_generator/ext2_filesystem_unittest.cc",
722 "payload_generator/extent_ranges_unittest.cc",
723 "payload_generator/extent_utils_unittest.cc",
724 "payload_generator/fake_filesystem.cc",
725 "payload_generator/full_update_generator_unittest.cc",
726 "payload_generator/graph_utils_unittest.cc",
727 "payload_generator/inplace_generator_unittest.cc",
728 "payload_generator/mapfile_filesystem_unittest.cc",
729 "payload_generator/payload_file_unittest.cc",
730 "payload_generator/payload_generation_config_android_unittest.cc",
731 "payload_generator/payload_generation_config_unittest.cc",
732 "payload_generator/payload_signer_unittest.cc",
733 "payload_generator/squashfs_filesystem_unittest.cc",
734 "payload_generator/tarjan_unittest.cc",
735 "payload_generator/topological_sort_unittest.cc",
736 "payload_generator/zip_unittest.cc",
737 "testrunner.cc",
738 "update_attempter_android_unittest.cc",
739 ],
740}
741
742// Brillo update payload generation script
743// ========================================================
744cc_prebuilt_binary {
745 name: "brillo_update_payload",
746 device_supported: false,
747 host_supported: true,
748
749 srcs: ["scripts/brillo_update_payload"],
750 required: [
751 "delta_generator",
752 "shflags",
753 "simg2img",
754 ],
755
756 target: {
757 darwin: {
758 enabled: false,
759 },
760 },
Colin Cross606913a2017-11-14 13:05:37 -0800761}
Ralph Nathanab8026c2018-08-08 15:43:02 -0700762
763// AIDL interface between libupdate_engine and the Things jar.
764filegroup {
765 name: "things_update_engine_aidl",
766 srcs: [
767 "binder_bindings/android/brillo/IUpdateEngine.aidl",
768 "binder_bindings/android/brillo/IUpdateEngineStatusCallback.aidl",
769 ],
770}