We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@echo off :: 检查是否有设备连接,清除多余输出 adb devices >nul 2>&1
:: 检查指定的应用是否已经在运行 for /f "tokens=1" %%i in ('adb shell pidof top.weixiansen574.hybridfilexfer') do set app_pid=%%i
:: 如果应用已在运行,跳过启动应用步骤 if defined app_pid ( echo 应用已在运行,跳过启动... ) else ( echo 设备已连接,尝试启动app... adb shell am start -n top.weixiansen574.hybridfilexfer/.MainActivity echo 已启动app ) :restart_jar java -jar HybridFileXfer.jar -c adb echo 请在手机上取消勾选移动网络的端口,并启动服务器。尝试检测中... timeout /t 1 >nul 2>&1 goto restart_jar
The text was updated successfully, but these errors were encountered:
不如更进一步,开启无线ADB调试然后就可以在不连线的情况下自动打开并连接?(笑,顺便这种情况下设备间有ADB但由于ADB本身跑在无线上所以也许adb不要作为传输网卡?)
Sorry, something went wrong.
No branches or pull requests
@echo off
:: 检查是否有设备连接,清除多余输出
adb devices >nul 2>&1
:: 检查指定的应用是否已经在运行
for /f "tokens=1" %%i in ('adb shell pidof top.weixiansen574.hybridfilexfer') do set app_pid=%%i
:: 如果应用已在运行,跳过启动应用步骤
if defined app_pid (
echo 应用已在运行,跳过启动...
) else (
echo 设备已连接,尝试启动app...
adb shell am start -n top.weixiansen574.hybridfilexfer/.MainActivity
echo 已启动app
)
:restart_jar
java -jar HybridFileXfer.jar -c adb
echo 请在手机上取消勾选移动网络的端口,并启动服务器。尝试检测中...
timeout /t 1 >nul 2>&1
goto restart_jar
The text was updated successfully, but these errors were encountered: