Skip to content

Commit ca2b83f

Browse files
committed
Added pixel phones
1 parent ed48e17 commit ca2b83f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

cli/src/device/emulator.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ class Emulator(Device):
2323
"Samsung Galaxy S8",
2424
"Samsung Galaxy S9",
2525
"Samsung Galaxy S10",
26-
"Pixel C"
26+
"Pixel C",
27+
"Pixel 8",
28+
"Pixel 9"
2729
)
2830

2931
API_LEVEL = {
@@ -151,7 +153,8 @@ def create(self) -> None:
151153
creation_cmd = "avdmanager create avd -f -n {n} -b {it}/{si} " \
152154
"-k 'system-images;android-{al};{it};{si}' " \
153155
"-d {d} -p {pe}".format(n=self.name, it=self.img_type, si=self.sys_img,
154-
al=self.api_level, d=self.device.replace(" ", "\ "),
156+
al=self.api_level,
157+
d=self.device.lower().replace(" ", "_") if "pixel" in self.device.lower() else self.device.replace(" ", "\ "),
155158
pe=self.path_emulator)
156159
self.logger.info(f"Command to create emulator: '{creation_cmd}'")
157160
subprocess.check_call(creation_cmd, shell=True)

0 commit comments

Comments
 (0)