#USB기기연결
from ppadb.client import Client as AdbClient
import time
import os
client = AdbClient(host="127.0.0.1", port=5037)
devices = client.devices()
device = devices[0]
import PIL.Image as Image
import io
res = device.screencap()#스크린 캡쳐
img = Image.open(io.BytesIO(res))#캡쳐한 바이트배열을 img변수에담음
img.show()#출력