Go Back   Android Forums > Android Phones > Samsung Moment

Get excited for the Samsung Galaxy S5! Find everything you need and discuss it in our Galaxy S5 Forum!

test: Reply
 
LinkBack Thread Tools
Old May 15th, 2010, 03:25 PM   #1 (permalink)
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
sponsored links
Reply

Samsung Moment
Current Rating:
Rate this Phone:

Sprint has just added its first full QWERTY Keyboard Android Phone to their lineup with the Samsung Moment. Initially rumored as the "InstinctQ", the Moment rocks an 800 MHz processor - what was the fastest processor in an Android phone a... Read More

Tags
11.2, 64-bit, adb, linux, moment, opensuse, suse, tether, usb_linux.c


Go Back   Android Forums > Android Phones > Samsung Moment
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:03 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.