Developing on android-based device via wireless

后端 未结 3 1256
滥情空心
滥情空心 2021-02-07 12:48

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 t

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-07 12:56

    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.)

提交回复
热议问题