zoukankan      html  css  js  c++  java
  • 德尔福 XE5 安卓调试

    https://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp?page=2&tab=votes#tab-top

    http://delphi.org/2013/10/wireless-android-debugging-with-delphi-xe5/

    Previously I blogged about how to connect to an emulator on a remote (or the host) machine. That also works for hardware connected to remote machines. But sometimes you want to work with hardware that isn’t even connected at all. Not to worry, here is how to wirelessly connect and debug with your favorite development tool. One note though, WiFi slower than a USB connection, so you will see a little delay sometimes.

    Requirements:

    • A machine (Mac or PC) you can connect the Android device to that has ADB (Android Debug Bridge) installed. This is part of the Android SDK. As well as necessary ADB USB Drivers (required on Windows). This can be your development machine, or another machine.
    • A non-segmented wireless network that both your development machine and Android device are connected. (Segmenting prevents two connected devices from connecting to each other).

    These commands work with ADB (Android Debug Bridge). It is easiest if you add it to your path. By default it is found in the following location, but you can install it anywhere on your system (Select the “Use An Existing IDE” option when downloading).

    C:UsersPublicDocumentsRAD Studio12.0PlatformSDKsadt-bundle-windows-x86-20130522sdkplatform-tools

    First you need to connect your Android device to any computer. With USB debugging turned on, verify you have access to the device via ADB with the following command:

    Command:

    adb devices

    Output:

    List of devices attached 
    8605fa72        device

    If the list is empty, then you need to enable USB debugging and make sure you have the USB ADB Bridge driver for your device installed.

    Once ADB is setup, you can get the IP address with the following command:

    adb shell netcfg|grep wlan0

    Which should give you output like:

    wlan0  UP     10.20.5.88/24  0x00001043 2a:32:11:42:aa:3c

    Then put the device in TCPIP mode with the command:

    adb kill-server
    adb tcpip 5555

    Then on your machine that is running Delphi XE5 go to the command window and type (with the IP address from above):

    adb connect 10.20.5.88

    Then you can verify it worked from that same command prompt

    Command:

    adb devices

    Output:

    List of devices attached
    10.20.5.88:5555   device

    And now you can connect to that device wirelessly from Delphi. Like I mentioned before, this is slower, so expect some delays on deploy and responding to breakpoints.

    There is some more information on Stack Overflow, including some different options if you have a rooted Android device.

  • 相关阅读:
    c# 序列化和反序列化
    dataGridView通过checkbox选择数据
    获取文件后缀名(迟点写入自己的类库里面去) .NET
    刚在《微软中国msdn围脖》看到面试题
    jquery 遍历下拉框
    html代码转换成为纯文本
    获取ListBox中多选值
    递归算法运用到实际项目,可行吗?
    ExtJs学习笔记1
    JS 可变参数 arguments
  • 原文地址:https://www.cnblogs.com/marklove/p/9502486.html
Copyright © 2011-2022 走看看