adb

adb push命令怎样判断成功

小樊
94
2024-11-19 12:25:40
栏目: 编程语言

要判断adb push命令是否成功,您可以检查命令的输出和返回代码

adb push local_file_path remote_file_path
Success
remote: Permission denied
error: failed to copy 'local_file_path' to 'remote_file_path'
adb push local_file_path remote_file_path && echo "Success" || echo "Failed"

这将输出"Success"如果adb push命令成功执行,否则输出"Failed"。

0
看了该问题的人还看了