-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Add restart_adb_server()
Function to Simplify ADB Server Restart
#102
Comments
可以啊,提个pr呗 |
尊敬的@codeskyblue, 我考虑将这个函数放在代码库中 感谢您的时间和支持。 |
Lgtm |
您好, 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}") 您看,这样的实现可以吗 |
不要用subprocess |
您好@codeskyblue, 关于 期待您的回复,非常感谢您在这个项目中的帮助! 诚挚地, |
这尼玛,GPT机器人吗? |
老师,您好,我不是机器人,我是华科的一名学生哈 |
哈哈哈哈哈哈笑死了 谢谢Yucheng Song |
直接提pr好了,不要一直留言了 |
Feature Description
I would like to propose the addition of a new function,
restart_adb_server()
, to theadbutils
library. This function would encapsulate the functionality to restart the Android Debug Bridge (ADB) server, making it more convenient for developers to perform this common task.Rationale
Currently, restarting the ADB server requires calling two separate functions:
kill_server()
andstart_server()
. While this is effective, it can be more streamlined. Implementing arestart_adb_server()
function would simplify the code needed to restart the ADB server, making the process more efficient and user-friendly.Proposed Implementation
The
restart_adb_server()
function could internally call the existingkill_server()
andstart_server()
functions. This would encapsulate the restart logic within a single, easy-to-use function. Here's a rough implementation idea:Potential Benefits
adbutils
.Conclusion
I believe that adding this function would be a valuable enhancement to the
adbutils
library, making it more convenient for developers working with Android devices. I look forward to hearing your thoughts on this suggestion. Thank you for considering this feature request.Best regards,
Yucheng Song
The text was updated successfully, but these errors were encountered: