Coder Social home page Coder Social logo

Comments (10)

codeskyblue avatar codeskyblue commented on May 26, 2024 1

可以啊,提个pr呗

from adbutils.

codeskyblue avatar codeskyblue commented on May 26, 2024 1

Lgtm

from adbutils.

codeskyblue avatar codeskyblue commented on May 26, 2024 1

不要用subprocess

from adbutils.

codeskyblue avatar codeskyblue commented on May 26, 2024 1

这尼玛,GPT机器人吗?

from adbutils.

songyuc avatar songyuc commented on May 26, 2024

尊敬的@codeskyblue,

我考虑将这个函数放在代码库中adb.device()函数之前,具体的位置是 adbutils/init.py#L66
您认为这样的安排是否符合库的结构和设计理念?
对于在adbutils库中放置这个函数的最佳位置,非常欢迎任何反馈或建议。

感谢您的时间和支持。

from adbutils.

songyuc avatar songyuc commented on May 26, 2024

您好,
函数的实现如下:

def restart_adb_server():
    try:
        # 停止ADB服务
        subprocess.run(["adb", "kill-server"], check=True)
        # 启动ADB服务
        subprocess.run(["adb", "start-server"], check=True)

    except subprocess.CalledProcessError as e:
        print(f"执行ADB命令时出错:{e}")

您看,这样的实现可以吗

from adbutils.

songyuc avatar songyuc commented on May 26, 2024

您好@codeskyblue

关于 restart_adb_server() 函数的实现,我希望能遵循您提出的不使用 subprocess 的建议。我想请教您是否推荐使用其他Python标准库,如 ossignal,通过发送信号的方式来控制ADB进程,以实现其重启?或者,您是否有其他更好的实现建议?由于我是Android测试的初学者,任何建议都将对我帮助巨大。

期待您的回复,非常感谢您在这个项目中的帮助!

诚挚地,
songyuc

from adbutils.

songyuc avatar songyuc commented on May 26, 2024

老师,您好,我不是机器人,我是华科的一名学生哈

from adbutils.

LiJiaHeer avatar LiJiaHeer commented on May 26, 2024

哈哈哈哈哈哈笑死了 谢谢Yucheng Song

from adbutils.

codeskyblue avatar codeskyblue commented on May 26, 2024

直接提pr好了,不要一直留言了

from adbutils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.