summaryrefslogtreecommitdiff
path: root/verity/Android.bp
blob: 9dfa98864e2b2f724398f16260ce25b7a852cde9 (plain)
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
package {
    default_team: "trendy_team_android_kernel",
    default_applicable_licenses: ["system_extras_verity_license"],
}

// Added automatically by a large-scale-change
// See: http://go/android-license-faq
license {
    name: "system_extras_verity_license",
    visibility: [":__subpackages__"],
    license_kinds: [
        "SPDX-license-identifier-Apache-2.0",
    ],
    license_text: [
        "NOTICE",
    ],
}

cc_binary_host {
    name: "generate_verity_key",
    srcs: ["generate_verity_key.c"],
    cflags: [
        "-Wall",
        "-Werror",
    ],

    shared_libs: [
        "libcrypto_utils",
        "libcrypto",
    ],
}

java_binary_host {
    name: "verity_signer",
    srcs: [
        "VeritySigner.java",
        "Utils.java",
    ],
    manifest: "VeritySigner.mf",

    static_libs: ["bouncycastle-unbundled"],
}

java_binary_host {
    name: "boot_signer",
    srcs: [
        "BootSignature.java",
        "VeritySigner.java",
        "Utils.java",
    ],
    manifest: "BootSignature.mf",

    static_libs: ["bouncycastle-unbundled"],
}

cc_binary_host {
    name: "verity_verifier",
    srcs: ["verity_verifier.cpp"],

    target: {
        darwin: {
            enabled: false,
        },
    },

    sanitize: {
        misc_undefined: ["integer"],
    },
    static_libs: [
        "libfec",
        "libfec_rs",
        "libavb",
        "libcrypto_utils",
        "libcrypto",
        "libext4_utils",
        "liblog",
        "libsparse",
        "libsquashfs_utils",
        "libbase",
        "libz",
    ],

    cflags: [
        "-Wall",
        "-Werror",
    ],
}

cc_defaults {
    name: "verity_tree_defaults",
    cflags: [
        "-D_FILE_OFFSET_BITS=64",
        "-Wall",
        "-Werror",
    ],

    static_libs: [
        "libsparse",
        "libz",
    ],
    shared_libs: [
        "libcrypto",
        "libbase",
    ],

    host_supported: true,
}

cc_library_static {
    name: "libverity_tree",
    defaults: [
        "verity_tree_defaults",
    ],
    recovery_available: true,

    export_include_dirs: ["include"],
    srcs: [
        "build_verity_tree.cpp",
        "build_verity_tree_utils.cpp",
        "hash_tree_builder.cpp",
    ],
}

cc_binary_host {
    name: "build_verity_tree",
    defaults: [
        "verity_tree_defaults",
    ],

    srcs: [
        "build_verity_tree_main.cpp",
    ],

    static_libs: [
        "libverity_tree",
    ],
}

cc_test {
    name: "build_verity_tree_test",
    defaults: [
        "verity_tree_defaults",
    ],

    srcs: [
        "build_verity_tree_test.cpp",
    ],

    static_libs: [
        "libverity_tree",
    ],
}

python_binary_host {
    name: "build_verity_metadata",
    srcs: ["build_verity_metadata.py"],
    version: {
        py3: {
            embedded_launcher: true,
        },
    },
}