Skip to content

Instantly share code, notes, and snippets.

@ganadist
Last active July 8, 2022 02:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ganadist/72213f7c4cdf0f5efd99ec3d52287394 to your computer and use it in GitHub Desktop.
Save ganadist/72213f7c4cdf0f5efd99ec3d52287394 to your computer and use it in GitHub Desktop.
# vim: ts=2 sw=2 sts=2 et ai
from android-19-armeabi-v7a
# add for debugging
COPY bin/busybox /bin/sh
# copy from https://packages.debian.org/sid/qemu-user-static
COPY bin/qemu-arm-static /usr/bin/
ENV ANDROID_ASSETS /system/app
ENV ANDROID_DATA /data
#ENV ANDROID_PROPERTY_WORKSPACE 8,0
ENV ANDROID_ROOT /system
ENV ANDROID_STORAGE /storage
ENV ASEC_MOUNTPOINT /mnt/asec
ENV BOOTCLASSPATH /system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar
ENV EXTERNAL_STORAGE /storage/sdcard
ENV HOME /data
ENV LD_LIBRARY_PATH /vendor/lib:/system/lib
ENV LOOP_MOUNTPOINT /mnt/obb
ENV PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
ENV PS1=' $USER@$HOSTNAME:${PWD:-?} # '
RUN mkdir -p /mnt/obb /mnt/asec /storage/sdcard /data && \
ln -s /storage/sdcard /sdcard && \
ln -s /storage/sdcard /mnt/sdcard && \
ln -s /sys/kernel/debug /d
CMD mount -t binfmt_misc none /proc/sys/fs/binfmt_misc && \
( [ -f /proc/sys/fs/binfmt_misc/docker-ndk-arm ] || echo ":docker-ndk-arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static:" > /proc/sys/fs/binfmt_misc/register ) && \
/bin/sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment