[SOLVED] How do I enable Nexus 7 USB tether on Jelly Bean?

Milamber33

Senior Member
Dec 22, 2011
1,044
312
0
Sydney
thanks for the suggestion

its actually not working with my n7 (paranoid android 2.23)
got the message unsupported kernel and not tetherable usb interface found, looks like this app is designed for pre 4.x devices
There are a few apps which do this sort of thing, search and you should find one that works. Please note this kind of thing does require root.
 

psychart

Member
Jul 6, 2012
48
9
0
Brasília
Hey folks,

I took cbdonohue's modifications and built them into CM10 and it works like a charm! I took the liberty of uploading the ZIP to dev-host:

http://d-h.st/KIr


All credit goes to cbdonohue for finding and creating the modification. I just built it :)
Sweet mate, using ur ROM and setting route manually im able to use internet from usb, but only using linux as router, can't find the right driver for windows.

i know Google Play require 3g or wi-fi, but i read about an app who can emulate 3g/wi-fi using usb reverse tethering, can't remember the name of the app. Have any idea how to do that?

Thanks.
 

leyan16

Member
Nov 12, 2012
10
0
0
Noob question

Hey All,

Noob here needing help for the USB tether so that i can share my work PC's internet to my N7. (As access to wifi was recently restricted).

Anyways, here's where i am: I have a rooted 4.1.2 JB Nexus 7

Though its been said on a previous post that i need to "modify the files in the Jelly Bean source code and recompile the operating system."

How do i exactly do that? Is it thru your steps on modifying kernel/framework files?

I'd really appreciate any form of help!

Thanks guys!!!
 
Last edited:

psychart

Member
Jul 6, 2012
48
9
0
Brasília
Hey All,

Noob here needing help for the USB tether so that i can share my work PC's internet to my N7. (As access to wifi was recently restricted).

Anyways, here's where i am: I have a rooted 4.1.2 JB Nexus 7

Though its been said on a previous post that i need to "modify the files in the Jelly Bean source code and recompile the operating system."

How do i exactly do that? Is it thru your steps on modifying kernel/framework files?

I'd really appreciate any form of help!

Thanks guys!!!
All modifications u can find attached here:

http://forum.xda-developers.com/showpost.php?p=32414798&postcount=17

I modified the files instead using cbdonohue to keep the last changes made by cm team.

If you need help to find the files and do the modifications i can help later when i get @ home.

But the changes its to enable usb tethering, which will enable a usb interface and configure your computer to use internet by N7.

Couldn't do in windows yet, but on linux its needed to delete default route inserted by usb tethering, configure ip_forward and NAT, in N7 its necessary to execute:

ip route add default via 192.168.42.XX # (XX is the ip of usb interface on your computer)
setprop net.dns1 8.8.8.8 # Google DNS

The only problem im facing its some apps (like Google Play, 9gag) check for wifi/3g connectivity to work, not working using only usb reverse tethering.

Im trying to work on an app who can "fake" a wifi connection, but no luck so far.
 

psychart

Member
Jul 6, 2012
48
9
0
Brasília
Note already have tethering options, so i guess u asking about inverting the routes right?

I believe it will, after enable usb tethering, its basic linux routing.


Sent from my GT-I9100 using xda app-developers app
 

scandiun

Senior Member
Jul 12, 2010
1,860
958
143
I am happy to announce I got native USB tethering working on the Nexus 7

I had to make the changes to the config.xml as shown in the previous post and also had to modify out/target/product/grouper/root/init.usb.rc by adding the following

Code:
on property:sys.usb.config=rndis
    write /sys/class/android_usb/android0/enable 0
    write /sys/class/android_usb/android0/idVendor 18d1
    write /sys/class/android_usb/android0/idProduct 4e23
    write /sys/class/android_usb/android0/functions ${sys.usb.config}
    write /sys/class/android_usb/android0/bDeviceClass 224
    write /sys/class/android_usb/android0/enable 1
    setprop sys.usb.state ${sys.usb.config}

on property:sys.usb.config=rndis,adb
    write /sys/class/android_usb/android0/enable 0
    write /sys/class/android_usb/android0/idVendor 18d1
    write /sys/class/android_usb/android0/idProduct 4e24
    write /sys/class/android_usb/android0/functions ${sys.usb.config}
    write /sys/class/android_usb/android0/bDeviceClass 224
    write /sys/class/android_usb/android0/enable 1
    start adbd
    setprop sys.usb.state ${sys.usb.config}
I'm also using a modified tegra kernel with RNDIS options activated...not sure if this is required (I'm assuming it is). I will try the stock kernel later.
Does this work on the Nexus 7 wifi only? I would like to use USB tethering to connect some computer via wifi, for example

(WiFi) <---> Nexus 7 <---> (USB Tethering) <---> Computer
 
Last edited:

agentx3r

Member
Nov 25, 2011
23
13
0
I am happy to announce I got native USB tethering working on the Nexus 7

I'm also using a modified tegra kernel with RNDIS options activated...not sure if this is required (I'm assuming it is). I will try the stock kernel later.
No USB-tethering in the Nexus 10 is driving me nuts, would you have any idea how to modify the exynos kernel to activate RNDIS?
 
Last edited:

psychart

Member
Jul 6, 2012
48
9
0
Brasília
Does this work on the Nexus 7 wifi only? I would like to use USB tethering to connect some computer via wifi, for example

(WiFi) <---> Nexus 7 <---> (USB Tethering) <---> Computer
Because regular Nexus 7 doesn't have 3g, default usb tether is useless. But enabling as this post explain, and w/ basic linux routing i guess this is possible.

I hate to sound completely helpless, but can someone make a video of how to do this?
Depends on what you need, (build cm or patching or terminal commands). If its the entire process i suggest reading this!
 

CarlosML

Member
Jan 16, 2013
12
0
0
Hi,

I'm trying to connect my Nexus 7 to my cellphone, in order to use my 3G connection when I don't have a WiFi AP near.
After reading this thread, I understand that is possible to use N7 as RNDIS client, but you need to recompile the kernel to add RNDIS support and recompile the userland for adding the necessary settings to rc.d and the UI.

I was wondering if there's a more 'minimalist' approach. Following a guide from Gentoo (google for "Android USB Tethering" @ wiki.gentoo.com, I can't post links) and N7 kernel sources, I compiled rndis_host.ko and it loads correctly ('make tegra3_android_defconfig' shows that the rest of the kernel modules are already compiled). However, I can't do "ifconfig usb0 up" nor "ifconfig rndis0 up" (Unknown device). I guess the part that is missing is this

Code:
on property:sys.usb.config=rndis
    write /sys/class/android_usb/android0/enable 0
    write /sys/class/android_usb/android0/idVendor 18d1
    write /sys/class/android_usb/android0/idProduct 4e23
    write /sys/class/android_usb/android0/functions ${sys.usb.config}
    write /sys/class/android_usb/android0/bDeviceClass 224
    write /sys/class/android_usb/android0/enable 1
    setprop sys.usb.state ${sys.usb.config}
'write' or 'setprop' don't seem to be callable from a Terminal, so I guess those are internal commands of rc.d.

- Are there equivalent commands in sh? (I guess "write" is something like doing echo value > /sys/class/xxx/xxx)?
- Is this even possible or I must recompile the whole OS?

Thanks!!