ldplayer
LDPlayerAdapter
Bases: Emulator
flowchart TD
src.ai_coc.adapters.ldplayer.LDPlayerAdapter[LDPlayerAdapter]
src.ai_coc.adapters.emulator.Emulator[Emulator]
src.ai_coc.adapters.emulator.Emulator --> src.ai_coc.adapters.ldplayer.LDPlayerAdapter
click src.ai_coc.adapters.ldplayer.LDPlayerAdapter href "" "src.ai_coc.adapters.ldplayer.LDPlayerAdapter"
click src.ai_coc.adapters.emulator.Emulator href "" "src.ai_coc.adapters.emulator.Emulator"
Methods:
| Name | Description |
|---|---|
version |
Off the banner |
serial_for |
|
enumerate_instances |
|
launch_instance |
Start the instance, unless it is already on its way up. |
restart_instance |
Quit, let the VM wind down, and launch, returning once the launch has taken. |
close_instance |
|
serial_of |
What the instance reports while it is up, and where it will listen while it is down. |
controller |
One adbutils-backed controller per instance, keyed by its own ADB port. |
launch_coc |
|
instance |
One instance by index, or None while the emulator leaves it out of its listing. |
ensure_coc |
Bring one instance to a running CoC screen, recovering stale launches. |
restart_coc |
|
screenshot |
|
tap |
|
swipe |
|
version
Off the banner ldconsole prints with no command, ldplayer v14.0.29.0 ....
serial_for
enumerate_instances
Source code in src/ai_coc/adapters/ldplayer.py
launch_instance
Start the instance, unless it is already on its way up.
ensure_coc asks for a launch whenever Android is not up, which takes
in an instance still booting — straight after restart_instance, every
time — and a second launch into one is not something to find out about
on an emulator whose reboot already wipes its settings.
Source code in src/ai_coc/adapters/ldplayer.py
restart_instance
Quit, let the VM wind down, and launch, returning once the launch has taken.
Never reboot: twice out of three it rewrote the instance's settings
file to LDPlayer's defaults, which puts the instance at 1920x1080 and
turns local ADB debugging off — nothing here is measured at the one and
nothing here can reach the other. quit and launch left the file
alone every time.
isrunning still says stop straight after a launch and running two
seconds later, which is the window ensure_coc would launch into
again, so this returns only once it has closed.
Source code in src/ai_coc/adapters/ldplayer.py
close_instance
serial_of
What the instance reports while it is up, and where it will listen while it is down.
controller
One adbutils-backed controller per instance, keyed by its own ADB port.
Source code in src/ai_coc/adapters/emulator.py
launch_coc
instance
One instance by index, or None while the emulator leaves it out of its listing.
None is a real state rather than an error: MuMu drops an instance from the listing for a moment while it restarts, so a caller waiting on one keeps whatever it last saw rather than giving up.
Source code in src/ai_coc/adapters/emulator.py
ensure_coc
Bring one instance to a running CoC screen, recovering stale launches.