Skip to content

Commit b88b52d

Browse files
committed
Add support for Android 11.
1 parent 7509fc2 commit b88b52d

File tree

1 file changed

+48
-22
lines changed

1 file changed

+48
-22
lines changed

docker/android-system.sh

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ EOF
8686
python3 ./repo sync -c
8787
else
8888
# this is the minimum set of modules that are need to build bionic
89-
# this was created by trial and error
89+
# this was created by trial and error. this is based on the minimum
90+
# set of modules required for android 9, and then the required minimum
91+
# modules for higher android versions given all the previous
92+
# requirements are still necessary. it might be possible to trim this.
9093
python3 ./repo sync -c art
9194
python3 ./repo sync -c bionic
9295
if [[ "${has_make}" == 1 ]]; then
@@ -109,8 +112,8 @@ EOF
109112
python3 ./repo sync -c hardware/interfaces
110113
python3 ./repo sync -c libnativehelper
111114
python3 ./repo sync -c prebuilts/build-tools
112-
python3 ./repo sync -c prebuilts/clang/host/linux-x86
113115
python3 ./repo sync -c prebuilts/clang-tools
116+
python3 ./repo sync -c prebuilts/clang/host/linux-x86
114117
python3 ./repo sync -c "prebuilts/gcc/linux-x86/host/x86_64-linux-${glibc_version}"
115118
python3 ./repo sync -c prebuilts/misc
116119
python3 ./repo sync -c prebuilts/sdk
@@ -124,39 +127,55 @@ EOF
124127
python3 ./repo sync -c external/vixl
125128
fi
126129
if [[ "${major_version}" -ge 7 ]]; then
127-
python3 ./repo sync -c prebuilts/go/linux-x86
128130
python3 ./repo sync -c build/soong
131+
python3 ./repo sync -c prebuilts/go/linux-x86
129132
fi
130133
if [[ "${major_version}" -ge 8 ]]; then
131134
python3 ./repo sync -c system/libhidl
132135
python3 ./repo sync -c system/tools/hidl
133136
fi
134137
if [[ "${major_version}" -ge 10 ]]; then
135-
python3 ./repo sync -c kernel/configs
136-
python3 ./repo sync -c external/libxml2
137-
python3 ./repo sync -c system/sepolicy
138-
python3 ./repo sync -c system/tools/xsdc
139138
python3 ./repo sync -c external/golang-protobuf
140-
python3 ./repo sync -c external/jemalloc_new
141139
python3 ./repo sync -c external/icu
140+
python3 ./repo sync -c external/jemalloc_new
141+
python3 ./repo sync -c external/libxml2
142+
python3 ./repo sync -c kernel/configs
142143
python3 ./repo sync -c prebuilts/ndk
143144
python3 ./repo sync -c prebuilts/vndk/v28
145+
python3 ./repo sync -c system/sepolicy
146+
python3 ./repo sync -c system/tools/xsdc
144147
fi
145148
if [[ "${major_version}" -ge 11 ]]; then
146-
python3 ./repo sync -c prebuilts/vndk/v29
147-
python3 ./repo sync -c system/hardware/interfaces
148-
python3 ./repo sync -c system/tools/aidl
149-
python3 ./repo sync -c system/libvintf
150-
python3 ./repo sync -c tools/metalava
151-
python3 ./repo sync -c libcore
152149
python3 ./repo sync -c bootable/recovery
153-
python3 ./repo sync -c system/apex
154150
python3 ./repo sync -c external/avb
151+
python3 ./repo sync -c external/boringssl
152+
python3 ./repo sync -c external/bouncycastle
153+
python3 ./repo sync -c external/conscrypt
155154
python3 ./repo sync -c external/e2fsprogs
155+
python3 ./repo sync -c external/expat
156+
python3 ./repo sync -c external/fmtlib
157+
python3 ./repo sync -c external/gwp_asan
158+
python3 ./repo sync -c external/pcre
159+
python3 ./repo sync -c external/protobuf
160+
python3 ./repo sync -c external/python/cpython2
161+
python3 ./repo sync -c external/python/six
162+
python3 ./repo sync -c external/scudo
156163
python3 ./repo sync -c external/selinux
157-
python3 ./repo sync -c external/conscrypt
158164
python3 ./repo sync -c external/sqlite
159-
python3 ./repo sync -c external/python/cpython2
165+
python3 ./repo sync -c external/zopfli
166+
python3 ./repo sync -c libcore
167+
python3 ./repo sync -c prebuilts/jdk/jdk8
168+
python3 ./repo sync -c prebuilts/jdk/jdk11
169+
python3 ./repo sync -c prebuilts/vndk/v29
170+
python3 ./repo sync -c system/apex
171+
python3 ./repo sync -c system/hardware/interfaces
172+
python3 ./repo sync -c system/libvintf
173+
python3 ./repo sync -c system/tools/aidl
174+
python3 ./repo sync -c tools/apksig
175+
python3 ./repo sync -c tools/metalava
176+
# needed for system/core/libziparchive
177+
# we disable all tests, but can't remove this dependency
178+
python3 ./repo sync -c external/googletest
160179
fi
161180

162181
case "${arch}" in
@@ -179,18 +198,21 @@ EOF
179198

180199
# avoid build tests. these can fail in newer versions, so allow failures.
181200
set +e
201+
rm bionic/benchmarks/Android.bp
182202
rm bionic/linker/tests/Android.mk
183-
rm bionic/tests/Android.mk
184203
rm bionic/tests/Android.bp
185-
rm bionic/benchmarks/Android.bp
186-
rm bionic/tests/libs/Android.bp
204+
rm bionic/tests/Android.mk
187205
rm bionic/tests/headers/Android.bp
188206
rm bionic/tests/headers/posix/Android.bp
207+
rm bionic/tests/libs/Android.bp
189208
if [[ "${major_version}" -ge 11 ]]; then
190-
rm system/libvintf/xsd/halManifest/vts/Android.bp
191-
rm system/libvintf/xsd/halManifest/vts/Android.mk
192209
rm system/libvintf/xsd/compatibilityMatrix/vts/Android.bp
193210
rm system/libvintf/xsd/compatibilityMatrix/vts/Android.mk
211+
rm system/libvintf/xsd/halManifest/vts/Android.bp
212+
rm system/libvintf/xsd/halManifest/vts/Android.mk
213+
rm bionic/benchmarks/linker_relocation/Android.bp
214+
rm bionic/benchmarks/linker_relocation/gen/Android.bp
215+
rm bionic/benchmarks/spawn/Android.bp
194216
fi
195217

196218
sed -i -z -e 's/cc_test {.*}//g' bionic/libc/malloc_debug/Android.bp
@@ -201,6 +223,10 @@ EOF
201223
if [[ "${major_version}" -ge 10 ]]; then
202224
sed -i -z -e 's/cc_test {.*}//g' bionic/linker/Android.bp
203225
fi
226+
if [[ "${major_version}" -ge 11 ]]; then
227+
sed -i -z -e 's/cc_test {.*}//g' bionic/libfdtrack/Android.bp
228+
sed -i -z -e 's/cc_test {.*}//g' system/core/libziparchive/Android.bp
229+
fi
204230
set -e
205231

206232
export ALLOW_MISSING_DEPENDENCIES=true

0 commit comments

Comments
 (0)