通过无线方式在基于 Android 的设备上进行开发

发布于 2024-10-06 07:45:57 字数 118 浏览 9 评论 0原文

直接在设备上开发 Android 应用程序的一种已知方法是使用 USB 连接器并使用 eclipse 安装驱动程序。因此,是否有已知的方法来实现这种无线功能?

编辑: 理想情况下,这不需要 root 设备。

One known way to develop your android application directly onto the device is using the usb connector and install the driver using eclipse. As such, is there a known way to do this wireless?

EDIT:
Ideally this shouldn't require rooted device.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

戏舞 2024-10-13 07:45:57

更新:最新的 SDK 现在原生支持这一点。请查看此处的“无线使用情况”。

简而言之:

  • 通过 USB 连接到您的设备
  • 输入“adb tcpip 5555”
  • 拔下设备
  • 在系统设置中查找设备的 IP
  • 输入“adb connect [ip 地址]:5555”
  • 就这样!

作为记录,这里是旧版本的答案:

安装无线 ADB 应用程序。详细信息请参见:http://www.androidcentral.com/android-quick-app -adb-wireless

编辑:好的,那个需要root。如果没有root的话,会比较麻烦一些。我突然想到,您可以执行以下操作:

  • 使用任何无线传输方式(蓝牙或 FTP,市场上有很多适用于这两种方式的应用程序)将 APK 文件从计算机传输到手机。
  • 使用文件管理器(例如 OI 文件管理器)导航到该文件并将其打开。

如果您使用 FTP(并且,至少在基于 Unix 的系统上,很可能也通过蓝牙),则可以通过命令行自动执行第 1 步。

第 2 步不能那么容易简化。但是您可以编写一个安装程序应用程序,仅对手机上的 APK 文件执行 ACTION_VIEW。

显然,这将通过软件包安装程序,因此您必须确认安装过程和所有内容。但是,嘿,它是无线的:)

(旁注:Android 上有多种 telnetd 和 sshd 解决方案,但我找到的没有一个适用于未 root 的手机。如果您可以建立 telnet/ssh 连接,您也许可以让这个过程更加舒适。)

UPDATE: This is now natively supported with recent SDKs. Look here under "Wireless Usage".

In short:

  • Connect to your device via USB
  • Enter "adb tcpip 5555"
  • Unplug your device
  • Look up your device's IP in the system settings
  • Enter "adb connect [ip address]:5555"
  • That's it!

For the record, here is the old version of the answer:

Install the wireless ADB app. Details here: http://www.androidcentral.com/android-quick-app-adb-wireless

EDIT: Okay, that one requires root. If you don't have root, it's going to be a bit more cumbersome. Off the top of my head, here's what you can do:

  • Use any means of wireless transfer (Bluetooth or FTP, there are lots of apps for either on the market) to transfer the APK file from your computer to the phone.
  • Use a file manager (OI File Manager, for example) to navigate to the file and open it.

Step 1 can be automated through the command line if you're using FTP (and, at least on Unix-based systems, most likely via Bluetooth as well).

Step 2, well, cannot be simplified THAT easily. But you could write an installer app that simply does an ACTION_VIEW on the APK file on your phone.

Obviously, this will go through the package installer, so you'll have to confirm the installation process and everything. But hey, it's wireless :)

(Side note: There are several telnetd and sshd solutions on Android, but none that I could find are for non-rooted phones. If you can get a telnet/ssh connection going, you may be able to make this process more comfortable.)

扛起拖把扫天下 2024-10-13 07:45:57

您确定尚未运行某种形式的 adb 吗?在设置中查找有关启用调试的任何内容。获取一个终端模拟器应用程序(例如 connectbot),启动它并执行“ps”以查看正在运行的内容。

如果您发布平板电脑的名称(并用谷歌搜索!),可能已经有一些已知的解决方案

Are you sure there isn't some form of adb already running? Look in settings for anything about enabling debugging. Get a terminal emulator app such as connectbot, start it up and do 'ps' to see what is running.

If you post the name of the tablet (and google it!) there might be some known solutions already

辞别 2024-10-13 07:45:57

对于那些拥有 root 权限的手机的人来说,可以使用 Google Play 中的应用程序,该应用程序可以大大简化无线连接的过程。试试这个 https://play.google。 com/store/apps/details?id=com.ttxapps.wifiadb&hl=en。这对我有用。

For those who have a rooted phone can use an app from Google Play which simplifies very much making a wireless connection. Try this one https://play.google.com/store/apps/details?id=com.ttxapps.wifiadb&hl=en. It worked for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文