如何连接运行Android 4.4的安卓IPTV机顶盒进行USB调试

3
我正在开发一个运行于Android 4.4的安卓IPTV应用程序。有没有人知道如何连接机顶盒以便测试应用程序的安装?该机顶盒有一个USB端口可用于连接USB闪存驱动器。我们能否使用该USB端口直接在STB中安装应用程序?如果可以,那么如何操作?
如果有人在安卓机顶盒编程方面有经验,请帮帮我。

1
"我不知道如何连接机顶盒以安装测试应用程序" -- 联系设备制造商并向他们咨询。 - CommonsWare
我想问一下,如果你曾经在IPTV上工作过,那么你是如何测试你的应用程序的? - vijaypalod
可能需要使用adb通过TCP进行连接。根据硬件,您描述的USB“ A”端口实际上可能会连接到双重角色类型的收发器,但没有OTG检测引脚,因此您可能需要在软件中进行模式切换。我见过一些Android设备,在设置菜单中有一个选项可以执行此操作,其他设备则可以从root shell中poke sysfs来执行此操作。这需要一根非法的USB A-A电缆。由于不应该存在这样的电缆,所以您购买的电缆可能会接线错误-我最终滥用了一根USB 3电缆。 - Chris Stratton
@mVJ,你的问题与IPTV标签无关!请删除。 - Ali
2个回答

5

打开命令行;

adb connect [您设备的IP地址]

使用adb工具连接设备后,只需从Android Studio运行代码即可。您的目标设备应该列在已连接设备下。

请确保

  • ADB添加到PATH中,以便能够从任何目录中的cmd运行adb.exe
  • 系统和目标设备在同一网络中

1

打开 ADB 调试

在连接设备之前,您必须在 Fire TV 设备上启用 ADB。

From the main (Launcher) screen, select Settings.
Select System > Developer Options.
Select ADB Debugging.

获取IP地址

您需要在网络上获取Fire TV设备的IP地址,才能连接ADB。

From the main (Launcher) screen, select Settings.
Select System > About > Network. Make note of the IP address listed on this screen.

连接ADB

要将开发计算机连接到Fire TV设备,请按照以下步骤操作:

Open a command prompt or terminal window.
Change directory to your Android SDK platform-tools directory.
Run the following commands, where <ipaddress> is the IP address of the Fire TV device noted in the previous section.

adb kill-server
adb start-server
adb connect <ipaddress>

Note: On Mac OS X and Linux you may need to prepend ./ to these commands, like this:

./adb kill-server
./adb start-server
./adb connect <ipaddress>


If the connection was sucessful, ADB responds with the message:
connected to <ipaddress>:5555

Verify that the Fire TV device appears in the list of devices:

adb devices


ADB reponds responds with the message:

List of devices attached
<ipaddress>:5555  device
ex : adb connect 192.168.1.1:5555

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接