ADB over USB

From iDroidWiki

Jump to: navigation, search

Follow this simple guide to get ADB running over USB (using alex's kernel or any kernel that has ADB over USB):

Contents

Prerequisites

  • Linux machine
  • Windows users must download the USB Drivers from the Android SDK and refer to the guide at the bottom of this page.
  • Mac would work the same as Linux...
  • ADB installed on your computer's Operating System

ADB Over Linux

Connect your phone with Android running.
Run lsusb in the Linux Terminal. Check for an output of 1234. If you can find those 4 digits somewhere in the output, you're good to go. If not, you're not using a correct kernel version.

Adding some functions

Go to terminal and type this:

 gksu gedit /etc/udev/rules.d/51-android.rules

Type your password. Then add this to the file:

 SYSTEM="usb" SYSFD{idVendor}=="0bb4", MODE="0666"
 SYSTEM="usb" SYSFD{idVendor}=="18d1", MODE="0666"

Then this:

 chown root:root /etc/udev/rules.d/51-android.rules

Reboot!

ADB over Windows

Disclaimer

Warning this is very buggy, cavaet emptor.

If you do not know why rm -rf / is a bad idea, do not use this guide.

We are not to be responsible for bricked iPhones, bricked Windows Machines, or Nuclear Holocaust, even if you followed this guide to the letter.

You have been warned.

Installation

- Download the USB Drivers for Windows using the Android SDK Setup. You must download the Android SDK first. We cannot distribute the USB Drivers as this would be in violation of the SDK's License Agreement.

- The drivers will be in a folder called "usb_drivers"

- Run the Add Hardware Wizard (Start -> Run -> "hdwwiz")

Add Hardware Wizard

  1. Read the warnings, then click "Next"
  2. Choose "Install the hardware that I manually select from a list (Advanced)" this is the 2nd option, then click "Next"
  3. Select "Show All Devices", then click "Next"
  4. You are going to see a grayed-out text box with "(Retrieving a list of all devices)", click the "Have Disk..." button
  5. "Browse" to the Android SDK folder and then to "usb_folder". It will be looking of a .inf file so select "android_winusb.inf" and click "Open" then "OK". It's the only file there so you shouldn't go wrong.
  6. 3 choices will come up in the previously-grayed-out text box. Select "Android ADB Interface" then click the "Next" button
  7. Install the driver. When a warning comes up about trust Google Inc. click "Install Anyway" or "Always trust this source"
  8. Wait for the confirmation. It should warn about "Device cannot start", click the "Finish" button.

Installing the Non-functional iDroid USB drivers

  1. Boot into iDroid
  2. Connect your iDroid via USB
  3. The Adding Hardware will automatically start (if it hasn't already). Click "Skip obtaining drivers from Windows Update" as it won't find any at all.
  4. If it is proceeding as planned, Windows will tell you it wasn't able to find drivers for "iPhone2G" or "iPhone3G", "CDC Abstract Model Control (ACM)" and "CDC ACM Data"

Replacing the Non-functional iDroid USB drivers with the Working Android Drivers

  1. Before doing this step, make sure that you have installed the Android USB drivers as mentioned above and you have done no editing to the iDroid USB drivers. Your iDroid must be booted and connected via USB cable.
  2. Open Device Manager (Start -> Run -> "devmgmt.msc")
  3. Look for the Other Devices tab, expand the tab if you have to.
  4. There should be at least 3 devices in this tab: "CBC Abstract Model Control (ACM)", "CDC ACM Data", and "iPhone2G" or "iPhone3G". Any other devices listed here that are not mentioned are from your computer and not the iDroid.
  5. Right-click "iPhone2G" or "iPhone3G", a menu should pop-out and click "Update Driver Software..."
  6. A new window should appear. Pick/click the bottom option: "Browse my computer for driver software"
  7. Choose the bottom option: "Let me pick from a list of device drivers on my computer"
  8. A list with a scrollbar should appear and "Android Phone" should be near the top of the list. Select "Android Phone" and click the "Next" button.
  9. Under Model, choose/select "Android ADB Interface" and click the "Next" button.
  10. A warning will appear, answer "Yes" but read the warning anyway.
  11. Click the "Close" when the wizard is completed.
  12. You do NOT need to repeat this process for "CDC Abstract Model Control (ACM)" and "CDC ACM Data".
  13. Safely remove your iPhone2G or iPhone3G (yes you now can), then reconnect it via USB cable.
  14. Open command prompt and test by "adb shell" command. You should see the "#" indicating it works.

Notes

  • ls -l command on your /sdcard directory can cause USB to disconnect. If it does, safely remove and reconnect iDroid via USB.

ADB'ing

Navigate to where you keep your adb files. To initiate adb over usb, use this:

 adb usb

If you get something like "error: closed" don't worry, its still going to work.
If you want to use adb over wifi again, use:

 adb tcpip

Windows users, ADB over USB is still buggy that the iDroid may disconnect at anytime and error: device not found messages can come up. This is usually after going to the /sdcard directory and command ls -l.

adb pull command is not working because according to ricky26, he hasn't finished this part yet.

Credits

  • ricky26 for the usb drivers
  • alex for the guide
  • ddominator for the Windows guide
  • #iphonelinux :D
Personal tools