Skip to content

Commit 022724c

Browse files
authored
Merge pull request #269 from pokowaka/add_ping
Fix a series of small issues
2 parents 3d24cf9 + 1c5ff41 commit 022724c

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ It does the following:
224224
- The gRPC service is used to communicate with the running emulator inside the
225225
container.
226226

227+
*Note: You can use a public adbkey by injecting the ADBKEY_PUB variable, i.e.: -e ADBKEY_PUB="$(cat ~/.android/adbkey.pub)"*
228+
227229
You also have the option to mount a /data partition which the emulator will use
228230
if available. This enables you to use a tmpfs which can give increased
229231
performance, especially in the nested virtualization scenario.

emu/templates/Dockerfile.emulator

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2222
libpulse0 libtinfo5 libx11-6 libxcb1 libxdamage1 \
2323
libnss3 libxcomposite1 libxcursor1 libxi6 \
2424
libxext6 libxfixes3 zlib1g libgl1 pulseaudio socat \
25+
iputils-ping \
2526
# Enable turncfg through usage of curl
2627
curl ca-certificates && \
2728
apt-get clean && \

emu/templates/launch-emulator.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ install_adb_keys() {
112112
echo "-----BEGIN PRIVATE KEY-----" >/root/.android/adbkey
113113
echo $ADBKEY | tr " " "\\n" | sed -n "4,29p" >>/root/.android/adbkey
114114
echo "-----END PRIVATE KEY-----" >>/root/.android/adbkey
115+
elif [ ! -z "${ADBKEY_PUB}" ]; then
116+
echo "emulator: Using provided adb public key"
117+
echo $ADBKEY_PUB >>/root/.android/adbkey.pub
115118
else
116119
echo "emulator: No adb key provided, creating internal one, you might not be able connect from adb."
117120
run /android/sdk/platform-tools/adb keygen /root/.android/adbkey
@@ -219,6 +222,7 @@ var_append LAUNCH_CMD -avd Pixel2
219222
var_append LAUNCH_CMD -ports 5556,5557 -grpc 8554 -no-window
220223
var_append LAUNCH_CMD -skip-adb-auth -no-snapshot-save -wipe-data -no-boot-anim
221224
var_append LAUNCH_CMD -shell-serial file:/tmp/android-unknown/kernel.log
225+
var_append LAUNCH_CMD -logcat "*:V"
222226
var_append LAUNCH_CMD -logcat-output /tmp/android-unknown/logcat.log
223227
var_append LAUNCH_CMD -logcat "*:V"
224228
var_append LAUNCH_CMD -feature AllowSnapshotMigration

0 commit comments

Comments
 (0)