Tethering a Moment in Linux (OpenSuse 11.2 64-bit)Support

Last Updated:

  1. simihorn

    simihorn New Member This Topic's Starter

    Apr 16, 2010
    Likes Received:
    This was not the easiest procedure ever. I won't give all the gory details unless anyone else is stuck and wants pointers.

    This was to connect my Moment, via USB cable, using Proxoid on the phone and running linux on the laptop.

    In general, it required recompiling a custom version of the abd file because the moment isn't recognized correctly. There is a patch for the adb source file (/system/core/adb/usb_linux.c) that makes the changes, but it didn't work on the current sources, so you will have to manually edit the c source to add the correct lines.

    Code (Text):
    1.   if(interface->bInterfaceClass == 2 && interface->bInterfaceSubClass == 2) {
    2.                   bufptr += 19 + USB_DT_ENDPOINT_SIZE * interface->bNumEndpoints;
    3.                   continue;
    4.                 }
    Right after the lines:
    Code (Text):
    1.  if (length != USB_DT_INTERFACE_SIZE) {
    2.                         D("interface descriptor has wrong size\n");
    3.                         break;
    4.                     }
    and before the lines
    Code (Text):
    1.  DBGX("bInterfaceClass: %d,  bInterfaceSubClass: %d,"
    2.                          "bInterfaceProtocol: %d, bNumEndpoints: %d\n",
    3.                          interface->bInterfaceClass, interface->bInterfaceSubClass,
    4.                          interface->bInterfaceProtocol, interface->bNumEndpoints);
    The finished product (around lines 215 - 230) should look like
    Code (Text):
    2. if (length != USB_DT_INTERFACE_SIZE) {
    3.                         D("interface descriptor has wrong size\n");
    4.                         break;
    5.                     }
    7.                 if(interface->bInterfaceClass == 2 && interface->bInterfaceSubClass == 2) {
    8.                   bufptr += 19 + USB_DT_ENDPOINT_SIZE * interface->bNumEndpoints;
    9.                   continue;
    10.                 }
    12.                     DBGX("bInterfaceClass: %d,  bInterfaceSubClass: %d,"
    13.                          "bInterfaceProtocol: %d, bNumEndpoints: %d\n",
    14.                          interface->bInterfaceClass, interface->bInterfaceSubClass,
    15.                          interface->bInterfaceProtocol, interface->bNumEndpoints);
    Then, you have to install the ncurses libraries. This is harder than you'd think on the 64-bit platform. I ended up having to create a symbolic link to have it work (ln -s /usr/lib/libstdc++.so.5.0.7 /usr/lib/libstdc++.so).

    Of course, you have to get the sources. YOu need to install git and find the repo script from Google (Using Repo and Git (Android Open Source Project)) and download a ton of source files just to build one little thing.

    Also, I had to d/l the java 1.5 jdk and add it to java alternatives (update-alternatives --install /<path to java executable> java <path to new java installation> 3 )

    This was done on OpenSuse 11.2. There are some better instructions for ubuntu out in the wild.

    Hopefully this helps someone. If anyone wants help post here and i'll try to help. Sorry, the details got more gory than I expected.

    This forum post was the basis from which I started the journey ([ubuntu] Using android adb with Samsung Moment on Karmic - Ubuntu Forums)


Share This Page