Skip to content

Commit

Permalink
android-emulator: headful graphical emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Oct 11, 2024
1 parent 4e50d65 commit 364b47c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
9 changes: 7 additions & 2 deletions compose/android.compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,20 @@ services:
devices:
- /dev/kvm
environment:
ADB_DAEMON_ADDRESS: '10.7.8.140:5037'
ANDROID_EMULATOR_ADDRESS: '10.7.8.138'
ADB_DAEMON_ADDRESS: '10.7.8.140:5037'
ANDROID_EMULATOR_ADDRESS: '10.7.8.138'
DISPLAY: '${L7_DISPLAY:-:1}'
XAUTHORITY: '/etc/x11/xauthority/Xauthority'
# not respected
# ADB_SERVER_ADDRESS: '10.7.8.140:5038'
# ADB_SERVER_SOCKET: 'tcp:10.7.8.140:5038'
# ADB_SERVER_PORT: '5038'
networks:
internal:
ipv4_address: 10.7.8.138
volumes:
- '${L7_XAUTHORITY_VOLUME:-desktop_x11_xauthority}:/etc/x11/xauthority'
- '${L7_X11_SOCKET_VOLUME:-desktop_x11_unix}:/tmp/.X11-unix'



6 changes: 3 additions & 3 deletions imags/android-emulator/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
# emulator
libx11-6 libxi6 libxkbfile1 \
net-tools \
bzip2 libxcb-cursor0 libxkbcommon0 libxkbcommon-x11-0 libgbm1 libnss3 libxcursor1 libxshmfence1 xauth xvfb libdbus-glib-1-2 \
procps \
socat \
libx11-6 libpulse0 libdrm2 libxi6 libxkbfile1 \
libvulkan1 mesa-vulkan-drivers \
libx11-6 libpulse0 libdrm2 libxi6 libxkbfile1 \
libvulkan1 mesa-vulkan-drivers \
# libncurses5:i386 libc6:i386 libstdc++6:i386 lib32gcc-s1 lib32ncurses6 lib32z1 zlib1g:i386 \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& chmod 777 /var/log
Expand Down
3 changes: 2 additions & 1 deletion imags/android-emulator/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ sh -c 'sleep 1; while true; do socat -s -d -lf /var/log/socat-5555.log TCP4-LIST

sh -c "sleep 1; adb connect ${ANDROID_EMULATOR_ADDRESS}:5557" &

#-no-window \
/home/user/Android/Sdk/emulator/emulator \
-avd default \
-no-window \
-no-boot-anim \
-gpu off \
-skip-adb-auth \
-delay-adb \
Expand Down

0 comments on commit 364b47c

Please sign in to comment.