通过无线方式在基于 Android 的设备上进行开发
直接在设备上开发 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
更新:最新的 SDK 现在原生支持这一点。请查看此处的“无线使用情况”。
简而言之:
作为记录,这里是旧版本的答案:
安装无线 ADB 应用程序。详细信息请参见:http://www.androidcentral.com/android-quick-app -adb-wireless
编辑:好的,那个需要root。如果没有root的话,会比较麻烦一些。我突然想到,您可以执行以下操作:
如果您使用 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:
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:
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.)
您确定尚未运行某种形式的 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
对于那些拥有 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.