Я создаю фрагмент кода, которым можно манипулировать в программном обеспечении эмулятора LDPlayer. Я использую подпроцесс и модуль adb для открытия LDPlayer, но теперь, после запуска LDPlayer, он не открывает нужное мне приложение (вот разногласия). Я пробовал довольно много способов и исследовал форумы, YouTube, но все еще не могу открыть приложение. Есть инструкции, которые могут открыть приложение только по имени приложения (Discord), и другое руководство, которое можно открыть, используя имя папки установки приложения (com.discord). Может кто-нибудь помочь мне, спасибо всем!
import subprocess
import requests
from time import sleep
# Get the proxy URL from the API
response = requests.get("https://app.proxyno1.com/api/change-key-ip/my-apikey")
status = response.json()["message"]
print('Status:', status)
# Start the LDPlayer emulator (proxy server:port already setting)
ldplayer_path = "C:\LDPlayer\LDPlayer9\dnplayer.exe"
adb_path = r"C:\Users\PC\Desktop\Test\platform-tools\adb.exe"
process = subprocess.Popen(ldplayer_path)
process.wait()
# Use the LDPlayer emulator to run Discord
subprocess.run([adb_path, "shell", "am", "start", "-s", "emulator-5554", "-n", "com.discord/com.Discord.MainActivity"])






Пытаться
subprocess.run([adb_path, "-s", "emulator-5554", "shell", "am", "start", "-n", "com.discord/com.Discord.MainActivity"])
поскольку -s <serialno> является аргументом за adb, а не за am.