Salesforce

Using the Android Debug Bridge (ADB) Utility (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Using the Android Debug Bridge (ADB) Utility (Magic xpa 2.x)

The Android Debug Bridge (ADB) command line utility lets you communicate with an instance of an Android emulator or an Android device that is connected.

The ADB utility is located in the platform-tools folder in your SDK folder, usually at: C:\Program Files\Android\android-sdk\platform-tools and also in the RIAModules\Utils\ADB folder under the installation folder.

The ADB utility is useful for:

To use the ADB utility on a mobile device, make sure that the mobile device is defined to:

  • Run in debug mode

    To enable it, go to Settings/Applications/Development and check the USB Debugging check box.

  • Allow installation of a non-market application

    To enable it, go to Settings/Applications/Application Settings and check the Unknown sources check box.

The ADB utility can be used either by connecting the device to the PC using a USB cable or over WiFi. To use it over WiFi, you need to do some settings as defined later on.

To check that the ADB utility can connect to your device, simply connect the device to the PC using a USB cable and run the following command: adb devices. You should see your device in the list.

Refer also to: http://developer.android.com/tools/help/adb.html.

Using the ADB (Android Debug Bridge) over WiFi

You can use the ADB utility over WiFi on Android 4.x by following the following steps:

  1. Enable USB debugging on your device.

  2. Connect the Android device to the PC using a USB cable.

  3. Connect the device to your network over WiFi.

  4. Find the device IP by either opening the device Settings->About Phone->Status or by running the following command: adb shell ip -f inet addr show wlan0.

  5. Enable ADB over TCP/IP by running the following command: adb tcpip 5555.

    This should give the output: restarting in TCP mode port: 5555 and the command prompt might seem hanged.

  6. Disconnect the device from the PC.

  7. Stop the ADB server by running the following command: adb kill-server.

  8. Connect the PC to the device over WiFi by running the following command: adb connect <your device's IP address>.

    This should give the output: connected to <your device's IP address>.

That's it. You can now use ADB over WiFi. To test that it worked, you can run the following command: adb devices.

  1. To return back to USB mode, run the following command: adb usb.

Reference
Attachment 
Attachment