Comments (10)
可以啊,提个pr呗
from adbutils.
Lgtm
from adbutils.
不要用subprocess
from adbutils.
这尼玛,GPT机器人吗?
from adbutils.
尊敬的@codeskyblue,
我考虑将这个函数放在代码库中adb.device()
函数之前,具体的位置是 adbutils/init.py#L66。
您认为这样的安排是否符合库的结构和设计理念?
对于在adbutils
库中放置这个函数的最佳位置,非常欢迎任何反馈或建议。
感谢您的时间和支持。
from adbutils.
您好,
函数的实现如下:
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.
您好@codeskyblue,
关于 restart_adb_server()
函数的实现,我希望能遵循您提出的不使用 subprocess
的建议。我想请教您是否推荐使用其他Python标准库,如 os
或 signal
,通过发送信号的方式来控制ADB进程,以实现其重启?或者,您是否有其他更好的实现建议?由于我是Android测试的初学者,任何建议都将对我帮助巨大。
期待您的回复,非常感谢您在这个项目中的帮助!
诚挚地,
songyuc
from adbutils.
老师,您好,我不是机器人,我是华科的一名学生哈
from adbutils.
哈哈哈哈哈哈笑死了 谢谢Yucheng Song
from adbutils.
直接提pr好了,不要一直留言了
from adbutils.
Related Issues (20)
- Issue with `device.sync.push` Resulting in `AdbError: FAIL` HOT 3
- ADB 录制屏幕失败 HOT 3
- 可以在_proto.py里面增加AppInfo类型的返回码?
- ModuleNotFoundError: No module named 'apkutils2.axml.axmlparser' HOT 2
- How to connect a vpn HOT 1
- AttributeError: module 're' has no attribute 'Pattern' HOT 5
- Does this library support connecting devices via usb? HOT 1
- Address already in use HOT 3
- FASTBOOT HOT 1
- no re.Pattern in re module HOT 1
- Non-Frozen dataclass lead to UnHashAble Error
- 如何实现使用 adbutils 查看特定的设备状态
- Python3.10版本collections包报错 HOT 3
- 1.2.11 device.install 不支持配置flags参数了 HOT 1
- adbutils 1.2.11 has an incorrect `python_requires` spec HOT 1
- adb.shell如何执行可执行文件或者.sh脚本?
- 什么时候需要实例化多个adbclient? HOT 1
- vscode插件都不支持py3.6了。啥时候考虑升级一下? HOT 2
- MultiScreen Support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adbutils.