Skip to content

Commit 9312b43

Browse files
committed
base android images on Ubuntu 20.04
the repo tool (all of its versions?) now depend on a python 3.6+ interpreter Ubuntu 16.04 only has access to a python 3.5 interpreter which is too old and won't work using a newer Ubuntu image shouldn't affect the minimum supported android version (*) because we are building an android SDK from scratch and android doesn't depend on gliblc (*) old Ubuntu images are used for the linux-gnu targets to ensure compatibility with old glibc versions
1 parent 0fcf836 commit 9312b43

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

docker/Dockerfile.aarch64-linux-android

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:20.04
22

33
COPY common.sh /
44
RUN /common.sh

docker/android-ndk.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ main() {
3030
pushd "${td}"
3131
curl --retry 3 -sSfL "${NDK_URL}" -O
3232
unzip -q android-ndk-*.zip
33+
rm android-ndk-*.zip
3334
pushd android-ndk-*
3435
./build/tools/make_standalone_toolchain.py \
3536
--install-dir /android-ndk \

docker/android-system.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ main() {
1717
g++-multilib
1818
make
1919
python
20+
python3
2021
)
2122

2223
# fake java and javac, it is not necessary for what we build, but the build
@@ -53,6 +54,9 @@ EOF
5354
curl --retry 3 -sSfL https://storage.googleapis.com/git-repo-downloads/repo -O
5455
chmod +x repo
5556

57+
# the `repo` tool requires python3 so change the default python interpreter
58+
ln -sf python3 /usr/bin/python
59+
5660
# this is the minimum set of modules that are need to build bionic
5761
# this was created by trial and error
5862
./repo init -u https://android.googlesource.com/platform/manifest -b android-5.0.0_r1
@@ -84,6 +88,10 @@ EOF
8488
;;
8589
esac
8690

91+
# revert default python interpreter; the code we are going to build expects
92+
# `/usr/bin/python` to be a python2 interpreter
93+
ln -sf python2 /usr/bin/python
94+
8795
# avoid build tests
8896
rm bionic/linker/tests/Android.mk bionic/tests/Android.mk bionic/benchmarks/Android.mk
8997

0 commit comments

Comments
 (0)