Skip to content

Instantly share code, notes, and snippets.

@Park-Developer
Created January 13, 2024 09:15
Show Gist options
  • Save Park-Developer/43843020ec83ec42812d30934051487d to your computer and use it in GitHub Desktop.
Save Park-Developer/43843020ec83ec42812d30934051487d to your computer and use it in GitHub Desktop.
adb shell command test
from multiprocessing.connection import Client
import time
from ppadb.client import Client as AdbClient
from com.dtmilano.android.viewclient import ViewClient
adb_conf=dict(host='127.0.0.1', port=5037)
cur_client=AdbClient(**adb_conf)
cur_devices=cur_client.devices()[0]
#len(cur_devices)
vc=ViewClient(*ViewClient.connectToDeviceOrExit())
vc.traverse()
cur_devices.shell("input keyevent 220")
cur_devices.shell("input keyevent 220")
cur_devices.shell("input keyevent 220")
cur_devices.shell("input keyevent 220")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment