Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions emu/containers/emulator_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def write(self, dest):
self.clean(dest)

writer = TemplateWriter(dest)
writer.write_template("avd/Pixel2.ini", self.props)
writer.write_template("avd/Pixel2.avd/config.ini", self.props)
writer.write_template("avd/MediumPhone.ini", self.props)
writer.write_template("avd/MediumPhone.avd/config.ini", self.props)

# Include a README.MD message.
writer.write_template(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
AvdId=Pixel2
AvdId=MediumPhone
PlayStore.enabled={{playstore}}
avd.ini.displayname=Pixel2
avd.ini.displayname=MediumPhone
avd.ini.encoding=UTF-8
# Real Pixel2 ships with 32GB
disk.dataPartition.size=512MB
disk.dataPartition.size=10G
fastboot.forceColdBoot=no
hw.accelerometer=yes
hw.audioInput=yes
Expand All @@ -28,10 +27,8 @@ runtime.network.latency=none
runtime.network.speed=full
vm.heapSize=512
tag.display=Google APIs
# Note: these are the ones that usually vary from device to device
# for example a Pixel 6 will use 420x2400x1080
hw.lcd.density=440
hw.lcd.height=1920
hw.lcd.density=420
hw.lcd.height=2400
hw.lcd.width=1080
# Unused
# hw.sdCard=yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@


# Basic config used to create an avd for now.
path=/android-home/Pixel2.avd
path=/android-home/MediumPhone.avd
8 changes: 4 additions & 4 deletions emu/templates/launch-emulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ install_grpc_certs() {
clean_up() {
# Delete any leftovers from hard exits.
run rm -rf /tmp/*
run rm -rf ${ANDROID_AVD_HOME}/Pixel2.avd/*.lock
run rm -rf ${ANDROID_AVD_HOME}/MediumPhone.avd/*.lock

# Check for core-dumps, that might be left over
if ls core* 1>/dev/null 2>&1; then
Expand Down Expand Up @@ -144,7 +144,7 @@ initialize_data_part() {
if is_mounted /data; then
run cp -fr /android-home/ /data
ln -sf /data/android-home ${ANDROID_AVD_HOME}
echo "path=${ANDROID_AVD_HOME}/Pixel2.avd" > ${ANDROID_AVD_HOME}/Pixel2.ini
echo "path=${ANDROID_AVD_HOME}/MediumPhone.avd" > ${ANDROID_AVD_HOME}/MediumPhone.ini
else
ln -sf /android-home ${ANDROID_AVD_HOME}
fi
Expand All @@ -163,7 +163,7 @@ forward_loggers
# Override config settings that the user forcefully wants to override.
if [ ! -z "${AVD_CONFIG}" ]; then
echo "Adding ${AVD_CONFIG} to config.ini"
echo "${AVD_CONFIG}" >>"/root/.android/avd/Pixel2.avd/config.ini"
echo "${AVD_CONFIG}" >>"/root/.android/avd/MediumPhone.avd/config.ini"
fi

# Launch internal adb server, needed for our health check.
Expand All @@ -175,7 +175,7 @@ socat -d tcp-listen:5555,reuseaddr,fork tcp:127.0.0.1:5557 &

# Basic launcher command, additional flags can be added.
LAUNCH_CMD=("emulator/emulator")
LAUNCH_CMD+=("-avd" "Pixel2")
LAUNCH_CMD+=("-avd" "MediumPhone")
LAUNCH_CMD+=("-ports" "5556,5557" "-grpc" "8554" "-no-window")
LAUNCH_CMD+=("-skip-adb-auth" "-no-snapshot-save" "-wipe-data" "-no-boot-anim")
LAUNCH_CMD+=("-shell-serial" "file:/tmp/android-unknown/kernel.log")
Expand Down