Skip to content

Commit 1a34a27

Browse files
committed
what about this
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
1 parent 22167ea commit 1a34a27

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

ci/android-install-sdk.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ esac;
3939

4040
# Try to fix warning about missing file.
4141
# See https://askubuntu.com/a/1078784
42-
mkdir -p /root/.android/
43-
echo '### User Sources for Android SDK Manager' >> /root/.android/repositories.cfg
44-
echo '#Fri Nov 03 10:11:27 CET 2017 count=0' >> /root/.android/repositories.cfg
42+
mkdir -p /tmp/.android/avd
43+
echo '### User Sources for Android SDK Manager' >> /tmp/.android/repositories.cfg
44+
echo '#Fri Nov 03 10:11:27 CET 2017 count=0' >> /tmp/.android/repositories.cfg
4545

4646
# Print all available packages
4747
# yes | ./sdk/tools/bin/sdkmanager --list --verbose
@@ -59,6 +59,6 @@ yes | ./sdk/cmdline-tools/tools/bin/sdkmanager --no_https \
5959
"${image}" | grep -v = || true
6060

6161
echo "no" |
62-
./sdk/cmdline-tools/tools/bin/avdmanager create avd \
62+
./sdk/cmdline-tools/tools/bin/avdmanager -v create avd \
6363
--name "${1}" \
6464
--package "${image}" | grep -v = || true

ci/docker/i686-linux-android/Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,33 @@ ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/cmdline-tools/tools:/
2323

2424
RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
2525
RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
26-
RUN mv /root/.android /tmp
26+
RUN cp -r /root/.android /tmp
27+
RUN cp -r /android/sdk /tmp
28+
RUN chmod 777 -R /root/.android
2729
RUN chmod 777 -R /tmp/.android
2830
RUN chmod 755 /android/sdk/cmdline-tools/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
2931

3032
ENV PATH=$PATH:/rust/bin \
3133
CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
3234
CARGO_TARGET_I686_LINUX_ANDROID_RUNNER=/tmp/runtest \
3335
CC_i686_linux_android=i686-linux-android-gcc \
34-
HOME=/tmp
36+
HOME=/tmp \
37+
ANDROID_AVD_HOME=/tmp/.android/avd \
38+
ANDROID_SDK_ROOT=/tmp/sdk
39+
40+
RUN ls -a /root/.android
41+
RUN ls -a /root/.android/avd
42+
RUN ls -a /root/.android/avd/i686.avd
43+
RUN ls -a /tmp/.android
44+
RUN ls -a /tmp/.android/avd
3545

3646
ADD runtest-android.rs /tmp/runtest.rs
3747
ENTRYPOINT [ \
3848
"bash", \
3949
"-c", \
4050
# set SHELL so android can detect a 64bits system, see
4151
# http://stackoverflow.com/a/41789144
42-
"SHELL=/bin/dash /android/sdk/emulator/emulator @i686 -no-window -no-accel & \
52+
"SHELL=/bin/dash ANDROID_AVD_HOME=/tmp/.android/avd /android/sdk/emulator/emulator @i686 -no-window -no-accel & \
4353
rustc /tmp/runtest.rs -o /tmp/runtest && \
4454
exec \"$@\"", \
4555
"--" \

0 commit comments

Comments
 (0)