openatx / adbutils

pure python adb library for google adb service.
MIT License
781 stars 180 forks source link

脚本退出后还残留一个后台adb.exe #120

Closed ok-oldking closed 4 months ago

ok-oldking commented 4 months ago

我python脚本退出的时候, 后台还会有个adb.exe 有没有办法在我脚本退出的时候关闭这个adb.exe image 会导致删不掉这个adb.exe image

重现方式 demo中的脚本就会, 退出后还存在adb.exe在运行

import adbutils

adb = adbutils.AdbClient(host="127.0.0.1", port=5037)
for info in adb.list():
    print(info.serial, info.state)
codeskyblue commented 4 months ago

可以调用一下 d.kill_server() 好像叫这个名字

ok-oldking commented 4 months ago

找到了, 已经解决 https://github.com/openatx/adbutils/blob/2138c40ae4685375a299f0f60c5a3e42137c898e/adbutils/_adb.py#L201