我修改了这篇文章以反映根据回复建议所做的更改。
我想在一个批处理文件中运行几行 adb 命令。
cd C:\Users\James\AppData\Local\Android\sdk\platform-tools
adb kill-server
adb start-server
timeout 5
echo Find the IP of the FireStick; Go to Settings, System, About, Network
set /p IPInput = Enter the IP address:
adb connect %IPInput%
::Error after this line, I am told "error: device '(null)' not found"
adb install "C:\Users\James\Desktop\Kodi on FIreStick\kodi-16.1-Jarvis-armeabi-v7a.apk"
adb install "C:\Users\James\Desktop\Kodi on FIreStick\ace-stream-media-beta-3-1-6-0-apkplz.com.apk"
adb install "C:\Users\James\Desktop\Kodi on FIreStick\Emulators\NES\com.androidemu.nes_61.apk"
adb install "C:\Users\James\Desktop\Kodi on FIreStick\Emulators\SNES\snes9x-ex-1-5-28-en-android.apk"
adb push C:\00_kodi_userdata /sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/
adb push C:\00_kodi_addons /sdcard/Android/data/org.xbmc.kodi/files/.kodi/addons/
adb push "C:\00_kodi_downloads" /sdcard/Download
我面临的问题是以下错误:“错误:找不到设备'(null)'”
我知道我输入的 IP 地址是正确的。事实上,我可以通过在单独的命令提示符中输入命令轻松访问 FireStick。
即 adb 连接 192.168.0.164
为什么它在这里不起作用?
即使我将脚本修改为以下内容:
echo Find the IP of the FireStick; Go to Settings, System, About, Network
set /p IPInput = Enter the last three values of the IP address:
adb connect 192.168.0.%IPInput%
我收到一个错误,显示 IPInput 未用于设置 IP 地址。输出只显示:
192.168.0.:5555
是什么赋予了?