View Single Post
Old May 15th, 2010, 03:25 PM   #1 (permalink)
simihorn
New Member
Thread Author (OP)
 
Join Date: Apr 2010
Posts: 4
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Cool Tethering a Moment in Linux (OpenSuse 11.2 64-bit)

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:
  if(interface->bInterfaceClass == 2 && interface->bInterfaceSubClass == 2) {
                  bufptr += 19 + USB_DT_ENDPOINT_SIZE * interface->bNumEndpoints;
                  continue;
                }
Right after the lines:
Code:
 if (length != USB_DT_INTERFACE_SIZE) {
                        D("interface descriptor has wrong size\n");
                        break;
                    }
and before the lines
Code:
 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:
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)
simihorn is offline  
Reply With Quote