1. 2015 is going to be a great year for Android! Why wait??
    Samsung Galaxy Note 5 | Samsung Galaxy S6 | HTC One M9
  2. New Forum Created: Samsung Gear VR!

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


  1. simihorn

    simihorn New Member

    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.

    Put
    Code (Text):
      if(interface->bInterfaceClass == 2 && interface->bInterfaceSubClass == 2) {
                      bufptr += 19 + USB_DT_ENDPOINT_SIZE * interface->bNumEndpoints;
                      continue;
                    }
    Right after the lines:
    Code (Text):
     if (length != USB_DT_INTERFACE_SIZE) {
                            D("interface descriptor has wrong size\n");
                            break;
                        }
    and before the lines
    Code (Text):
     DBGX("bInterfaceClass: %d,  bInterfaceSubClass: %d,"
                             "bInterfaceProtocol: %d, bNumEndpoints: %d\n",
                             interface->bInterfaceClass, interface->bInterfaceSubClass,
                             interface->bInterfaceProtocol, interface->bNumEndpoints);
     
    The finished product (around lines 215 - 230) should look like
    Code (Text):

    if (length != USB_DT_INTERFACE_SIZE) {
                            D("interface descriptor has wrong size\n");
                            break;
                        }

                    if(interface->bInterfaceClass == 2 && interface->bInterfaceSubClass == 2) {
                      bufptr += 19 + USB_DT_ENDPOINT_SIZE * interface->bNumEndpoints;
                      continue;
                    }

                        DBGX("bInterfaceClass: %d,  bInterfaceSubClass: %d,"
                             "bInterfaceProtocol: %d, bNumEndpoints: %d\n",
                             interface->bInterfaceClass, interface->bInterfaceSubClass,
                             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)

    Advertisement
    :
Loading...

Share This Page