-
Notifications
You must be signed in to change notification settings - Fork 0
/
Android.bp
1488 lines (1374 loc) · 39.3 KB
/
Android.bp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// AIDL interface between libupdate_engine and framework.jar
package {
default_applicable_licenses: ["system_update_engine_license"],
}
// Added automatically by a large-scale-change
// See: http://go/android-license-faq
license {
name: "system_update_engine_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
],
license_text: [
"NOTICE",
],
}
filegroup {
name: "libupdate_engine_aidl",
srcs: [
"binder_bindings/android/os/IUpdateEngine.aidl",
"binder_bindings/android/os/IUpdateEngineCallback.aidl",
],
path: "binder_bindings",
}
cc_defaults {
name: "ue_defaults",
cflags: [
"-DBASE_VER=576279",
"-DUSE_HWID_OVERRIDE=0",
"-D_FILE_OFFSET_BITS=64",
"-D_POSIX_C_SOURCE=199309L",
"-Wa,--noexecstack",
"-Wall",
"-Werror",
"-Wextra",
"-Wformat=2",
"-Wno-psabi",
"-Wno-unused-parameter",
"-ffunction-sections",
"-fstack-protector-strong",
"-fvisibility=hidden",
"-g3",
],
cppflags: [
"-Wnon-virtual-dtor",
"-fno-strict-aliasing",
],
include_dirs: ["system"],
local_include_dirs: ["client_library/include"],
header_libs: ["libgtest_prod_headers"],
shared_libs: [
"libbrillo-stream",
"libbrillo",
"libchrome",
],
ldflags: ["-Wl,--gc-sections"],
target: {
android: {
cflags: [
"-DUSE_FEC=1",
],
},
host: {
cflags: [
"-DUSE_FEC=0",
],
},
darwin: {
enabled: false,
},
},
}
// libcow_operation_convert (type: library)
// ========================================================
cc_library_static {
name: "libpayload_extent_utils",
defaults: [
"ue_defaults",
],
host_supported: true,
recovery_available: true,
srcs: [
"payload_generator/extent_utils.cc",
],
static_libs: [
"update_metadata-protos",
],
}
cc_library {
name: "libcow_operation_convert",
host_supported: true,
recovery_available: true,
defaults: [
"ue_defaults",
"update_metadata-protos_exports",
],
srcs: [
"common/cow_operation_convert.cc",
],
static_libs: [
"libsnapshot_cow",
"update_metadata-protos",
"libpayload_extent_ranges",
"libpayload_extent_utils",
"libbrotli",
"libz",
],
}
// update_metadata-protos (type: static_library)
// ========================================================
// Protobufs.
cc_defaults {
name: "update_metadata-protos_exports",
shared_libs: ["libprotobuf-cpp-lite"],
}
cc_defaults {
name: "update_metadata-protos-defaults",
host_supported: true,
ramdisk_available: true,
recovery_available: true,
srcs: ["update_engine/update_metadata.proto"],
cflags: [
"-Wall",
"-Werror",
],
proto: {
canonical_path_from_root: false,
export_proto_headers: true,
},
}
cc_library_static {
name: "update_metadata-protos",
defaults: ["update_metadata-protos-defaults"],
proto: {
type: "lite",
},
}
cc_library_static {
name: "update_metadata-protos-full",
defaults: ["update_metadata-protos-defaults"],
}
python_library_host {
name: "update_metadata-protos-python",
srcs: ["update_metadata.proto"],
proto: {
canonical_path_from_root: false,
},
}
// libpayload_consumer (type: static_library)
// ========================================================
// The payload application component and common dependencies.
cc_defaults {
name: "libpayload_consumer_exports_defaults",
defaults: ["update_metadata-protos_exports",],
static_libs: [
"libxz",
"libbz",
"libbspatch",
"libbrotli",
"libfec_rs",
"libpuffpatch",
"libverity_tree",
"libsnapshot_cow",
"libbrotli",
"libz",
"libpayload_extent_ranges",
"libpayload_extent_utils",
"libcow_operation_convert",
"lz4diff-protos",
"liblz4patch",
"libzstd",
],
shared_libs: [
"libbase",
"libcrypto",
"libfec",
"liblz4",
"libziparchive",
"libprocessgroup",
"libselinux",
],
product_variables: {
debuggable: {
cflags: [
"-DRUN_BACKUPTOOL",
],
},
},
}
cc_defaults {
name: "libpayload_consumer_exports",
defaults: [
"libpayload_consumer_exports_defaults"
],
static_libs: ["update_metadata-protos",],
}
cc_defaults {
name: "libpayload_consumer_exports_proto-full",
defaults: [
"libpayload_consumer_exports_defaults"
],
static_libs: ["update_metadata-protos-full",],
}
cc_defaults {
name: "libpayload_consumer_defaults",
host_supported: true,
recovery_available: true,
srcs: [
"aosp/platform_constants_android.cc",
"common/action_processor.cc",
"common/boot_control_stub.cc",
"common/clock.cc",
"common/constants.cc",
"common/cpu_limiter.cc",
"common/dynamic_partition_control_stub.cc",
"common/error_code_utils.cc",
"common/file_fetcher.cc",
"common/hash_calculator.cc",
"common/http_common.cc",
"common/http_fetcher.cc",
"common/hwid_override.cc",
"common/multi_range_http_fetcher.cc",
"common/prefs.cc",
"common/subprocess.cc",
"common/terminator.cc",
"common/utils.cc",
"payload_consumer/bzip_extent_writer.cc",
"payload_consumer/cached_file_descriptor.cc",
"payload_consumer/certificate_parser_android.cc",
"payload_consumer/cow_writer_file_descriptor.cc",
"payload_consumer/delta_performer.cc",
"payload_consumer/extent_reader.cc",
"payload_consumer/extent_writer.cc",
"payload_consumer/file_descriptor.cc",
"payload_consumer/file_descriptor_utils.cc",
"payload_consumer/file_writer.cc",
"payload_consumer/filesystem_verifier_action.cc",
"payload_consumer/install_operation_executor.cc",
"payload_consumer/install_plan.cc",
"payload_consumer/mount_history.cc",
"payload_consumer/payload_constants.cc",
"payload_consumer/payload_metadata.cc",
"payload_consumer/payload_verifier.cc",
"payload_consumer/partition_writer.cc",
"payload_consumer/partition_writer_factory_android.cc",
"payload_consumer/vabc_partition_writer.cc",
"payload_consumer/xor_extent_writer.cc",
"payload_consumer/block_extent_writer.cc",
"payload_consumer/snapshot_extent_writer.cc",
"payload_consumer/postinstall_runner_action.cc",
"payload_consumer/verified_source_fd.cc",
"payload_consumer/verity_writer_android.cc",
"payload_consumer/xz_extent_writer.cc",
"payload_consumer/fec_file_descriptor.cc",
"payload_consumer/partition_update_generator_android.cc",
"update_status_utils.cc",
],
}
cc_library_static {
name: "libpayload_consumer",
defaults: [
"ue_defaults",
"libpayload_consumer_exports",
"libpayload_consumer_defaults",
],
}
cc_library_static {
name: "libpayload_consumer_proto-full",
defaults: [
"ue_defaults",
"libpayload_consumer_exports_proto-full",
"libpayload_consumer_defaults",
],
}
cc_library_static {
name: "libstatslog_ue",
generated_sources: ["statslog_ue.cpp"],
generated_headers: ["statslog_ue.h"],
export_generated_headers: ["statslog_ue.h"],
shared_libs: [
"libstatssocket",
]
}
genrule {
name: "statslog_ue.h",
tools: ["stats-log-api-gen"],
cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_ue.h --module update_engine --namespace chromeos_update_engine,statsd",
out: [
"statslog_ue.h",
],
}
genrule {
name: "statslog_ue.cpp",
tools: ["stats-log-api-gen"],
cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_ue.cpp --module update_engine --namespace chromeos_update_engine,statsd --importHeader statslog_ue.h",
out: [
"statslog_ue.cpp",
],
}
// libupdate_engine_boot_control (type: static_library)
// ========================================================
// A BootControl class implementation using Android's HIDL boot_control HAL.
cc_defaults {
name: "libupdate_engine_boot_control_exports_defaults",
defaults: ["update_metadata-protos_exports",],
static_libs: [
"libcutils",
"libfs_mgr_binder",
"libgsi",
"libsnapshot_static",
"libstatslog_ue",
"libz",
],
shared_libs: [
"libbootloader_message",
"libhidlbase",
"liblp",
"libutils",
"android.hardware.boot-V1-ndk",
"libboot_control_client",
],
header_libs: [
"avb_headers",
],
target: {
recovery: {
static_libs: [
"libfs_mgr",
"libsnapshot_nobinder",
],
exclude_static_libs: [
"libfs_mgr_binder",
"libsnapshot_static",
"libstatslog_ue"
],
},
},
}
cc_defaults {
name: "libupdate_engine_boot_control_exports",
defaults: [
"libupdate_engine_boot_control_exports_defaults",
],
static_libs: [
"libpayload_consumer",
"update_metadata-protos",
]
}
cc_defaults {
name: "libupdate_engine_boot_control_exports_proto-full",
defaults: [
"libupdate_engine_boot_control_exports_defaults",
],
static_libs: [
"libpayload_consumer_proto-full",
"update_metadata-protos-full",
]
}
cc_defaults {
name: "libupdate_engine_boot_control_defaults",
defaults: [
"ue_defaults",
],
recovery_available: true,
srcs: [
"aosp/boot_control_android.cc",
"aosp/cleanup_previous_update_action.cc",
"aosp/dynamic_partition_control_android.cc",
"aosp/dynamic_partition_utils.cc",
],
}
cc_library_static {
name: "libupdate_engine_boot_control",
defaults: [
"libupdate_engine_boot_control_defaults",
"libupdate_engine_boot_control_exports",
"libpayload_consumer_exports",
],
}
cc_library_static {
name: "libupdate_engine_boot_control_nostats",
cflags: ["-DUE_DISABLE_STATS"],
defaults: [
"libupdate_engine_boot_control_defaults",
"libupdate_engine_boot_control_exports",
"libpayload_consumer_exports",
],
}
cc_library_static {
name: "libupdate_engine_boot_control_proto-full",
defaults: [
"libupdate_engine_boot_control_defaults",
"libupdate_engine_boot_control_exports_proto-full",
"libpayload_consumer_exports_proto-full",
],
}
// libupdate_engine_android (type: static_library)
// ========================================================
// The main daemon static_library used in Android (non-Brillo). This only has a
// loop to apply payloads provided by the upper layer via a Binder interface.
cc_defaults {
name: "libupdate_engine_android_exports_defaults",
defaults: [
"ue_defaults",
],
static_libs: [
"libavb",
"libavb_user",
"libgkiprops",
"libstatslog_ue",
"libPlatformProperties",
],
shared_libs: [
"apex_aidl_interface-cpp",
"libandroid_net",
"libbase",
"libbinder",
"libbinderwrapper",
"libbootloader_message",
"libbrillo-binder",
"libcurl",
"libcutils",
"libupdate_engine_stable-V2-cpp",
"liblog",
"libssl",
"libstatssocket",
"libutils",
],
whole_static_libs: [
"libcom.android.sysprop.apex",
],
}
cc_defaults {
name: "libupdate_engine_android_exports",
defaults: [
"libupdate_engine_android_exports_defaults",
"libupdate_engine_boot_control_exports",
"libpayload_consumer_exports",
],
static_libs: [
"libpayload_consumer",
"libupdate_engine_boot_control",
],
}
cc_defaults {
name: "libupdate_engine_android_exports_proto-full",
defaults: [
"libupdate_engine_android_exports_defaults",
"libupdate_engine_boot_control_exports_proto-full",
"libpayload_consumer_exports_proto-full",
],
static_libs: [
"libpayload_consumer_proto-full",
"libupdate_engine_boot_control_proto-full",
],
}
cc_defaults {
name: "libupdate_engine_android_defaults",
defaults: [
"ue_defaults",
],
aidl: {
local_include_dirs: ["binder_bindings"],
export_aidl_headers: true,
},
srcs: [
":libupdate_engine_aidl",
"common/system_state.cc",
"aosp/apex_handler_android.cc",
"aosp/binder_service_android.cc",
"aosp/binder_service_stable_android.cc",
"aosp/daemon_android.cc",
"aosp/daemon_state_android.cc",
"aosp/hardware_android.cc",
"aosp/logging_android.cc",
"aosp/network_selector_android.cc",
"aosp/update_attempter_android.cc",
"certificate_checker.cc",
"download_action.cc",
"libcurl_http_fetcher.cc",
"metrics_utils.cc",
"update_boot_flags_action.cc",
],
}
cc_library_static {
name: "libupdate_engine_android",
defaults: [
"libupdate_engine_android_defaults",
"libupdate_engine_android_exports",
]
}
cc_library_static {
name: "libupdate_engine_android_proto-full",
defaults: [
"libupdate_engine_android_defaults",
"libupdate_engine_android_exports_proto-full",
]
}
// update_engine (type: executable)
// ========================================================
// update_engine daemon.
cc_binary {
name: "update_engine",
defaults: [
"ue_defaults",
"libupdate_engine_android_exports",
],
static_libs: [
"libupdate_engine_android",
"libgflags",
],
required: [
"cacerts",
"otacerts",
],
srcs: ["main.cc", "aosp/metrics_reporter_android.cc"],
init_rc: ["update_engine.rc"],
}
// update_engine_nostats (type: executable)
// ========================================================
// update_engine daemon version without the stats integration.
cc_binary {
name: "update_engine_nostats",
defaults: [
"ue_defaults",
"libupdate_engine_android_exports",
],
static_libs: [
"libupdate_engine_android",
"libgflags",
"libupdate_engine_boot_control_nostats",
],
required: [
"cacerts",
"otacerts",
],
exclude_static_libs: [
"libstatslog_ue",
"libupdate_engine_boot_control"
],
exclude_shared_libs: [
"libstatssocket",
],
cflags: ["-DUE_DISABLE_STATS"],
srcs: [
"main.cc",
"common/metrics_reporter_stub.cc",
],
init_rc: ["update_engine_nostats.rc"],
}
// update_engine_sideload (type: executable)
// ========================================================
// A binary executable equivalent to update_engine daemon that installs an update
// from a local file directly instead of running in the background. Used in
// recovery image.
cc_binary {
name: "update_engine_sideload",
defaults: [
"ue_defaults",
"update_metadata-protos_exports",
"libupdate_engine_boot_control_exports",
"libpayload_consumer_exports",
],
recovery: true,
cflags: [
"-D_UE_SIDELOAD",
"-DUE_DISABLE_STATS",
],
header_libs: ["libgtest_prod_headers"],
srcs: [
"aosp/hardware_android.cc",
"aosp/logging_android.cc",
"aosp/sideload_main.cc",
"aosp/update_attempter_android.cc",
"common/metrics_reporter_stub.cc",
"common/network_selector_stub.cc",
"common/system_state.cc",
"download_action.cc",
"metrics_utils.cc",
"update_boot_flags_action.cc",
"update_status_utils.cc",
],
// Use commonly used shared libraries. libprotobuf-cpp-lite.so is filtered out,
// as it doesn't look beneficial to be installed separately due to its size. Note
// that we explicitly request their recovery variants, so that the expected files
// will be used and installed.
shared_libs: [
"libbase",
"liblog",
"liblz4",
"libprotobuf-cpp-lite",
],
static_libs: [
"libpayload_consumer",
"libupdate_engine_boot_control",
"update_metadata-protos",
// We add the static versions of the shared libraries that are not installed to
// recovery image due to size concerns. Need to include all the static library
// dependencies of these static libraries.
"libgkiprops",
"libevent",
"libmodpb64",
"libbrillo-stream",
"libbrillo",
"libchrome",
],
target: {
recovery: {
exclude_shared_libs: [
"libbrillo-stream",
"libbrillo",
"libchrome",
],
},
},
required: [
"otacerts.recovery",
],
}
// update_engine_client (type: executable)
// ========================================================
// update_engine console client.
cc_binary {
name: "update_engine_client",
defaults: ["ue_defaults"],
shared_libs: [
"libbinder",
"libbinderwrapper",
"libbrillo-binder",
"libutils",
],
aidl: {
local_include_dirs: ["binder_bindings"],
},
srcs: [
":libupdate_engine_aidl",
"aosp/update_engine_client_android.cc",
"common/error_code_utils.cc",
"update_status_utils.cc",
],
}
// libpayload_generator (type: static_library)
// ========================================================
// server-side code. This is used for delta_generator and unittests but not
// for any client code.
cc_defaults {
name: "libpayload_generator_exports",
defaults: [
"libpayload_consumer_exports",
"update_metadata-protos_exports",
"erofs-utils_export_defaults",
],
header_libs: [
"bootimg_headers",
],
static_libs: [
"libavb",
"libbrotli",
"libbsdiff",
"libdivsufsort",
"libdivsufsort64",
"liblzma",
"libpayload_consumer",
"libpuffdiff",
"libzucchini",
"libverity_tree",
"update_metadata-protos",
"libpayload_extent_utils",
"libcow_size_estimator",
"liberofs",
"libselinux",
"lz4diff-protos",
"liblz4diff",
"libzstd",
],
shared_libs: [
"libbase",
"libext2fs",
// LZ4 has to be a shared lib, as we want to override it with
// LD_LIBRARY_PRELOAD later
"liblz4",
],
}
cc_library_static {
name: "libpayload_extent_ranges",
defaults: [
"ue_defaults",
],
host_supported: true,
recovery_available: true,
srcs: [
"payload_generator/extent_ranges.cc",
],
static_libs: [
"update_metadata-protos",
],
}
cc_library_static {
name: "libcow_size_estimator",
defaults: [
"ue_defaults",
"update_metadata-protos_exports"
],
host_supported: true,
recovery_available: true,
srcs: [
"payload_generator/cow_size_estimator.cc",
],
static_libs: [
"update_metadata-protos",
"libbase",
"libsnapshot_cow",
"libcow_operation_convert",
],
}
cc_defaults {
name: "liblz4diff_defaults",
static_libs: [
"lz4diff-protos",
"update_metadata-protos",
"libssl",
"libbsdiff",
"libpuffdiff",
],
shared_libs: [
"liblz4",
],
}
cc_library_static {
name: "liblz4diff",
host_supported: true,
defaults: ["ue_defaults", "liblz4diff_defaults"],
srcs: [
"lz4diff/lz4diff.cc",
"lz4diff/lz4diff_compress.cc",
],
}
cc_library_static {
name: "liblz4patch",
host_supported: true,
recovery_available: true,
defaults: ["ue_defaults"],
static_libs: [
"lz4diff-protos",
"update_metadata-protos",
"libssl",
"libbspatch",
"libpuffpatch",
],
shared_libs: [
"liblz4",
],
srcs: [
"lz4diff/lz4patch.cc",
"lz4diff/lz4diff_compress.cc",
],
}
cc_binary_host {
name: "lz4diff",
defaults: [
"ue_defaults",
"libpayload_generator_exports",
],
static_libs: [
"libpayload_generator",
"liblz4diff",
"liblz4patch",
],
srcs: [
"lz4diff/lz4diff_main.cc",
],
}
cc_library_static {
name: "libpayload_generator",
defaults: [
"ue_defaults",
"libpayload_generator_exports",
],
host_supported: true,
srcs: [
"common/system_state.cc",
"download_action.cc",
"payload_generator/ab_generator.cc",
"payload_generator/annotated_operation.cc",
"payload_generator/blob_file_writer.cc",
"payload_generator/block_mapping.cc",
"payload_generator/boot_img_filesystem.cc",
"payload_generator/bzip.cc",
"payload_generator/deflate_utils.cc",
"payload_generator/delta_diff_generator.cc",
"payload_generator/delta_diff_utils.cc",
"payload_generator/ext2_filesystem.cc",
"payload_generator/erofs_filesystem.cc",
"payload_generator/extent_ranges.cc",
"payload_generator/full_update_generator.cc",
"payload_generator/mapfile_filesystem.cc",
"payload_generator/merge_sequence_generator.cc",
"payload_generator/payload_file.cc",
"payload_generator/payload_generation_config_android.cc",
"payload_generator/payload_generation_config.cc",
"payload_generator/payload_properties.cc",
"payload_generator/payload_signer.cc",
"payload_generator/raw_filesystem.cc",
"payload_generator/squashfs_filesystem.cc",
"payload_generator/xz_android.cc",
],
}
// delta_generator (type: executable)
// ========================================================
// server-side delta generator.
cc_binary_host {
name: "delta_generator",
defaults: [
"ue_defaults",
"libpayload_generator_exports",
"libpayload_consumer_exports",
],
static_libs: [
"libavb_host_sysdeps",
"libpayload_consumer",
"libpayload_generator",
"libgflags",
],
srcs: ["payload_generator/generate_delta_main.cc"],
}
cc_test {
host_supported: true,
name: "ue_unittest_delta_generator",
defaults: [
"ue_defaults",
"libpayload_generator_exports",
"libpayload_consumer_exports",
],
static_libs: [
"libpayload_consumer",
"libpayload_generator",
"libgflags",
],
srcs: ["payload_generator/generate_delta_main.cc"],
gtest: false,
stem: "delta_generator",
}
// test_http_server (type: executable)
// ========================================================
// Test HTTP Server.
cc_test {
name: "test_http_server",
defaults: ["ue_defaults"],
srcs: [
"common/http_common.cc",
"test_http_server.cc",
],
gtest: false,
}
// test_subprocess (type: executable)
// ========================================================
// Test helper subprocess program.
cc_test {
name: "test_subprocess",
defaults: ["ue_defaults"],
srcs: ["test_subprocess.cc"],
gtest: false,
}
// Public keys for unittests.
// ========================================================
genrule {
name: "ue_unittest_keys",
cmd: "openssl rsa -in $(location unittest_key.pem) -pubout -out $(location unittest_key.pub.pem) &&" +
"openssl rsa -in $(location unittest_key2.pem) -pubout -out $(location unittest_key2.pub.pem) &&" +
"openssl rsa -in $(location unittest_key_RSA4096.pem) -pubout -out $(location unittest_key_RSA4096.pub.pem) &&" +
"openssl pkey -in $(location unittest_key_EC.pem) -pubout -out $(location unittest_key_EC.pub.pem)",
srcs: [
"unittest_key.pem",
"unittest_key2.pem",
"unittest_key_RSA4096.pem",
"unittest_key_EC.pem",
],
out: [
"unittest_key.pub.pem",
"unittest_key2.pub.pem",
"unittest_key_RSA4096.pub.pem",
"unittest_key_EC.pub.pem",
],
}
// Sample images for unittests.
// ========================================================
// Extract sample image from the compressed sample_images.tar.bz2 file used by
// the unittests.
genrule {
name: "ue_unittest_disk_imgs",
cmd: "tar -jxf $(in) -C $(genDir)/gen disk_ext2_1k.img disk_ext2_4k.img disk_ext2_4k_empty.img disk_ext2_unittest.img",
srcs: ["sample_images/sample_images.tar.bz2"],
out: [
"gen/disk_ext2_1k.img",
"gen/disk_ext2_4k.img",
"gen/disk_ext2_4k_empty.img",
"gen/disk_ext2_unittest.img",