1. Are you ready for the Galaxy S20? Here is everything we know so far!

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

Discussion in 'Android Devices' started by simihorn, May 15, 2010.

  1. simihorn

    simihorn Lurker
    Thread Starter

    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):
    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);
    5.  
    The finished product (around lines 215 - 230) should look like
    Code (Text):
    1.  
    2. if (length != USB_DT_INTERFACE_SIZE) {
    3.                         D("interface descriptor has wrong size\n");
    4.                         break;
    5.                     }
    6.  
    7.                 if(interface->bInterfaceClass == 2 && interface->bInterfaceSubClass == 2) {
    8.                   bufptr += 19 + USB_DT_ENDPOINT_SIZE * interface->bNumEndpoints;
    9.                   continue;
    10.                 }
    11.  
    12.                     DBGX("bInterfaceClass: %d,  bInterfaceSubClass: %d,"
    13.                          "bInterfaceProtocol: %d, bNumEndpoints: %d\n",
    14.                          interface->bInterfaceClass, interface->bInterfaceSubClass,
    15.                          interface->bInterfaceProtocol, interface->bNumEndpoints);
    16.  
    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)
     



    1. Download the Forums for Android™ app!


      Download

       

Samsung Moment Forum

The Samsung Moment release date was November 2009. Features and Specs include a 3.2" inch screen, 3MP camera, GB RAM, processor, and 1440mAh battery.

November 2009
Release Date
0
Reviews
Loading...
Similar Threads - Tethering Moment Linux
  1. nickdalzell
    Replies:
    6
    Views:
    531
  2. Ajay Valand
    Replies:
    3
    Views:
    993
  3. 5g Moto Android 11
    Replies:
    2
    Views:
    2,341
  4. medusa193
    Replies:
    10
    Views:
    2,010
  5. EightWeight
    Replies:
    2
    Views:
    1,368
  6. abdulbadii
    Replies:
    2
    Views:
    717
  7. mortpiedra
    Replies:
    1
    Views:
    840
  8. Samsung
    Replies:
    0
    Views:
    1,605
  9. cwciwatch
    Replies:
    7
    Views:
    1,449
  10. 4kiki2
    Replies:
    16
    Views:
    6,718

Share This Page

Loading...