Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,739,209 Members 48,307 Now Online
XDA Developers Android and Mobile Development Forum

[APP] Wired Tether v1.4-epic-4 (EB13 Froyo) (3/3/11)

Tip us?
 
mkasick
Old
(Last edited by mkasick; 3rd March 2011 at 10:38 PM.) Reason: Added RNDIS/ADB kernel bug fix patch.
#1  
Recognized Developer - OP
Thanks Meter 826
Posts: 470
Join Date: Aug 2009
Default [APP] Wired Tether v1.4-epic-4 (EB13 Froyo) (3/3/11)

3/3/11 Update: Added an optional kernel patch against EB13 to fix the RNDIS/ADB bug mentioned below. It's not necessary for the use of this app, it still works fine on EB13 stock.

Attached is a build of Wired Tether v1.4 modified to support RNDIS (USB tethering) on (EB13) Froyo Epics. Also attached are the source patches against the v1.4 sources.

This is an update of the previous Eclair version of Wired Tether, but since the kernel patch is no longer necessary in Froyo I've split this into a new thread.

And yes, Froyo does come with USB tethering out of the box. However, in EB13 many folks may find that with the built-in tethering they can only tether to wifi, and attempts to tether to 3G (and possibly 4G) results in error. This Wired Tether client avoids said "errors."

Directions:
  • (Windows only) Install the Samsung USB drivers. No other drivers are needed for Windows 7, and I think Windows XP SP3.
  • Make sure the USB cable is unplugged before starting the tether client.
  • Start "Wired Tether" and "Press to start tethering."
  • Grant the Superuser Request (if your su requires it).
  • Make sure tethering has started, you should see green/red "Down/Up" numbers at the bottom of the screen.
  • Attach the USB cable.
  • Select "Charging" mode from the "Select USB mode" menu.
  • Tether!

When finished:
  • Detach the USB cable.
  • "Press to stop tethering."
  • Grant the Superuser Request (if your su requires it).
  • Exit the "Wired Tether" program.
  • Reattach the USB cable if you want to use mass-storage.

Note, tethering should be used with "USB debugging" disabled. This is due to a bug in the Froyo (including EB13) kernel's USB gadget driver whereby if RNDIS is enabled "on top of" ADB mode (and subsequently disabled), when "USB debugging" is later turned off it reverts back to RNDIS mode instead of mass storage, whoops! If you get stuck in RNDIS mode, cycling Wired Tether once should fix it. Alternatively, if you always run with "USB debugging" enabled, this bug shouldn't matter. Keep in mind, neither mass-storage support nor ADB will be availble while actively tethering.

Troubleshooting:

If the client force closes on you and you're using a ROM with android-wifi-tether preinstalled, then there is a library conflict. Remove android-wifi-tether from /system, and most importantly, delete (or rename) /system/lib/libnativetask.so, then android-wired-tether should work. If you want both wifi & wired tether, reinstall android-wifi-tether from the market. This will make each application use its own library so there's no more conflicts. See this post for more details.

Technical details:

The Froyo kernel provides RNDIS support via a sysfs switch, much like the previous Eclair kernel patch. Samsung just happens to use a different name ("tethering" instead of "rndis_enable"). Oh, and they introduced a silly bug that results in weird behavior if you tether with "USB debugging" enabled--see above.

You may toggle this variable manually, for example, if you wanted to use the RNDIS interface for other purposes. Just be sure to toggle when the USB cable is unplugged:
Code:
Select Code
su
echo -n 1 > /sys/devices/virtual/sec/switch/tethering # Enable RNDIS.
echo -n 0 > /sys/devices/virtual/sec/switch/tethering # Disable RNDIS, reenable UMS (or ADB).
The Wired Tether patch simply toggles the sysfs varible upon starting and stopping tethering.

Mirror links (does not require forum login):
wired-tether-1.4-epic-4.apk
wired-tether_use_stable_api.diff
wired-tether_clamp_mss.diff
wired-tether_rndis_enable.diff
epic_adb_vtp_fix-EB13.diff
The Following 14 Users Say Thank You to mkasick For This Useful Post: [ Click to Expand ]
 
k0nane
Old
#2  
k0nane's Avatar
Recognized Developer
Thanks Meter 3759
Posts: 3,981
Join Date: Feb 2008
Location: 127.0.0.1
EXCELLENT. Thank you!

ACS's kernel team will be working on a fix for the bug.





Have I helped? Enjoy my network's fast downloads? Hit the Thanks button!



Follow me on Twitter @k0nane / @publik0! Chat with the OUDHS: irc.freenode.net #oudhitsquad (webchat)
 
tommi_han
Old
#3  
Senior Member
Thanks Meter 5
Posts: 177
Join Date: Jul 2010
I couldn't get it to work. Said nor the right kernel for wired tether... using bosai 2.0. Usb debugging is off and no libnative.so conflict
 
mkasick
Old
#4  
Recognized Developer - OP
Thanks Meter 826
Posts: 470
Join Date: Aug 2009
Quote:
Originally Posted by tommi_han View Post
I couldn't get it to work. Said nor the right kernel for wired tether... using bosai 2.0.
That uses the DK28 kernel right? Can you check if the file "/sys/devices/virtual/sec/switch/tethering" exists?

Hmm, I assumed EB13's tethering support was the same as DK28. But I see now the relevant source file was last modified on 11/27, perhaps some changes didn't make it into DK28. I never ran it myself, since it's useless to me without source.

Otherwise, try again when ROMs update to EB13 kernels?
 
MojoSwag
Old
#5  
Senior Member
Thanks Meter 5
Posts: 149
Join Date: May 2007
Location: Atlanta
Thanks so much for making this! Works beautifully for me on stock deodexed eb13.

Sent from my SPH-D700 using XDA App
 
jaronow
Old
#6  
Senior Member
Thanks Meter 70
Posts: 175
Join Date: Nov 2008
Quote:
Originally Posted by mkasick View Post
That uses the DK28 kernel right? Can you check if the file "/sys/devices/virtual/sec/switch/tethering" exists?

Hmm, I assumed EB13's tethering support was the same as DK28. But I see now the relevant source file was last modified on 11/27, perhaps some changes didn't make it into DK28. I never ran it myself, since it's useless to me without source.

Otherwise, try again when ROMs update to EB13 kernels?
Yes, Bonsai 2.0 and 2.01 are both DK28 based so they probably wouldn't work with this unfortunately, but just wait a day or so and you should be seeing some bomb bonsai action
 
tommi_han
Old
#7  
Senior Member
Thanks Meter 5
Posts: 177
Join Date: Jul 2010
Looks like got to go to eb13
 
A_Flying_Fox
Old
#8  
Senior Member
Thanks Meter 172
Posts: 1,605
Join Date: Aug 2010
Ok so just to clarify...

I should uninstall wifitether and then install this and then reinstall wifi tether and they'll both work when I need em? Ofcourse I mean alternately...

And usb debugging should be off to avoid conflicts with adb

Got it

Sent from my SPH-D700 using XDA App
 
A_Flying_Fox
Old
#9  
Senior Member
Thanks Meter 172
Posts: 1,605
Join Date: Aug 2010
Also stock eb13 should be good right?

Sorry...I just feel like a giddy schoolgirl right now. I've been waiting for nexus one style tethering for a minute....everytime tethering was here there was always a catch...

Sent from my SPH-D700 using XDA App
 
Isira
Old
#10  
Senior Member
Thanks Meter 71
Posts: 228
Join Date: Sep 2010
Quote:
Originally Posted by A_Flying_Fox View Post
Ok so just to clarify...

I should uninstall wifitether and then install this and then reinstall wifi tether and they'll both work when I need em? Ofcourse I mean alternately...
Huh? I had Wifi Tether installed first and tested it, then installed Wired Tether and tested it, and then tested Wifi tethering again and it works just fine.

Quote:
Originally Posted by A_Flying_Fox View Post
Also stock eb13 should be good right?
Yes, it works fine with stock EB13

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Device Review: OnePlus One

Seemingly every day, there are a bunch of new devices being released. Some are budget devices and some are … more

Browse the Internet with the Innovative Atlas Web Browser

For the most part, Chrome, Firefox, and Dolphin Browser have no real rivals among … more

Choose from Over a Thousand Battery Styles with 3Minit Battery Mod

The battery style in stock Android looks pretty dull. It doesn’t … more

Organize Your Cloud Storage Files with Unclouded

Cloud storage services like Dropbox or Google Drive have grown in popularity dramatically … more