Enabling Ethernet over USB OTG - Galaxy S6 Edge General

I found a way to enable Ethernet over USB OTG on a Samsung S6 Edge (SM-G925I, International Edition). The phone needs to be rooted because the method requires enabling the interface and editing routing tables.
The method has a "high" level of difficult, because it requires to enter commands on the phone using a terminal. By sharing this method, I hope experts will be able to automate this process, e.g., via an app.
While the description is for the Samsung S6 Edge, I suspect that this method may also be used on other phones.
Pre-requisites:
Tested on Samsung S6 Edge, SM-G925I, with Android v5.0.2 (Build LRX22G.G925IDVU1AOE3).
Phone must be rooted. This is necessary because you will be editing IP routing information which is only available with superuser access. Instructions for rooting the phone may be found elsewhere in XDA.
Set phone to "Airplane Mode" with Wi-Fi disabled. This simplifies the setup, but it is possible to lift this restriction. Left as an exercise to the reader.
Connect the phone to a micro USB OTG adapter. Then, connect the USB OTG adapter to a USB to RJ45 Ethernet adapter. Then, connect the Ethernet adapter to a router. (I have had good luck with BobjGear connectors and adapters. Sold by major online merchants.)
Setup
Your setup should look like this:
Samsung S6 Edge <-> Micro USB OTG connector <-> USB to RJ45 Ethernet adapter <-> Router <-> Internet
Enabling USB OTG interface
Using an app such as "Terminal Emulator" (by Jack Pavlevich) enter the following commands:
Check whether phone can reach router (that is, the gateway). Note: use the IP address of your router. Output shows that phone does not have access to any network.
Code:
$ ping -c 3 192.168.1.1
connect: Network is unreachable
(Optional) Check existing routing setup, useful for comparing after setup is completed.
Code:
# ip route // Should not show anything
# ip rule // Shows default rules (in my case, there are eight)
Confirm that the interface is visible to the phone.
Code:
$ netcfg
eth0 DOWN 0.0.0.0/0
The "eth0" interface corresponds to Ethernet over USB OTG. "DOWN" means that "eth0" is not active, resulting in the "Network is unreachable" message when pinging the router.
Now, gain superuser access:
Code:
$ su
Enable "eth0" interface. Router must be setup for DHCP.
Code:
# netcfg eth0 dhcp
If above command times out, try again. Otherwise try:
Code:
# netcfg eth0 down
# netcfg eth0 dhcp
Confirm that the interface is up and it has been assigned an IP address by the router. (IP address assigned to "eth0" will vary depending on your router setup.)
Code:
# netcfg
eth0 UP 192.168.1.21/24
Now, ping the router. (Note: Use your router's IP address.)
Code:
# ping -c 3 192.168.1.1
Network is unreachable
While interface is active and it has an IP address, phone still does not have access to any network.
Let's examine existing IP routing settings:
Code:
# ip route
The above command does not show any output, indicating that no IP routing is set up. In devices that support Ethernet over USB OTG off-the-shelf (e.g., Nexus 5, Sony Xperia Z1 phone and Z2 tablet), IP routing is setup "automatically". But in devices such as Samsung S6 Edge, IP routing settings need to be enabled manually using the commands below. (My guess is that Google, OEMs or carriers do not want you to use Ethernet over USB OTG.)
Configure IP routings
Configure IP routing in the "eth0" interface. The settings are similar to the ones used by the phone when the Wi-Fi interface is enabled. If the settings below do not work for you, check the IP routing settings on your phone when Wi-Fi is enabled and "eth0" is disabled, and adjust accordingly.
Code:
# ip rule add from all fwmark 0x101f9/0x1ffff lookup 1024 pref 13000
# ip rule add from all oif eth0 lookup 1024 pref 14000
# ip rule add from all fwmark 0x1f9/0x1ffff lookup 1024 pref 19000
# ip rule add from all fwmark 0x0/0xffff lookup 1024 pref 22000
# ip route add table 1024 192.168.1.0/24 dev eth0
# ip route add table 1024 default via 192.168.1.1 dev eth0
Exit superuser mode and (optionally) confirm IP routing settings.
Code:
# exit
$ ip rule // Command should show new entries 13000, 14000, 19000 and 22000
(Optional) Examine new IP routing settings and and newly created routing table entry.
Code:
$ ip route show table 1024
$ ip route
Both commands should output something like this:
Code:
default via 192.168.1.1 dev eth0 proto static
192.168.1.0/24 dev eth0 proto static scope link
Finally, confirm router is reachable from phone. (Note: use your router's IP address.)
Code:
$ ping -c 3 192.168.1.1
That's it! Your phone should now have Ethernet access over USB OTG. Enjoy!
Ps. Please hit 'Thanks' if this info was useful.

Would we have to perform this everytime we flash a new Rom?

Hello,
Could you give more details about which (BobjGear or others) USB to Ethernet adapters you tested with the S6 Edge?
I'd like to get one, but I'm confused about those which can work or not... The BobjGear page
http://www.bobjgear.com/which-tablets-support-ethernet.html
for their adapters states that they don't support Android phones, obviously if you managed to get it to work that is not entirely true
Thanks in advance for any detail you could provide, this is really a great achievement!

luckylui said:
Would we have to perform this everytime we flash a new Rom?
Click to expand...
Click to collapse
@luckylui Indeed, configuration done using these commands (via terminal or using a script) is not sticky, so you need to re-do it after reboot or after disconnecting/re-connecting the micro USB OTG adapter.
In other devices (such as Android tablets), configuration is done "automatically" (some "init.rc" takes care of this upon detecting than an Ethernet interface has been connect). However, for most Android phones this has to be done manually.
I hope that an XDA expert can help us create such a "init.rc" configuration script.

dew_veil said:
Hello,
Could you give more details about which (BobjGear or others) USB to Ethernet adapters you tested with the S6 Edge?
I'd like to get one, but I'm confused about those which can work or not... The BobjGear page
http://www.bobjgear.com/which-tablets-support-ethernet.html
for their adapters states that they don't support Android phones, obviously if you managed to get it to work that is not entirely true
Thanks in advance for any detail you could provide, this is really a great achievement!
Click to expand...
Click to collapse
Indeed, BobjGear's web page says that their adapters do not work for Android phones. However, they may actually refer to the issue that we discuss in this thread, that is, that Ethernet over USB OTG is not enabled in most Android phones by default. Therefore, BobjGear stays in the safe side by making that statement, so as customers don't blame them when Ethernet over USB OTG doesn't work on a phone.
I also have an Ethernet adapter from "Plugable" which does not work for this application because it is not a USB OTG adapter. The keyword here is "USB OTG", so if you purchase an adapter from another brand, make sure it is "USB OTG".
Yes, I think we are onto something useful here. To add to my OP:
I was able to use the same method (although with slightly different "ip rule" commands) with other phones: HTC One M9 and Samsung Galaxy Note 5. The method was the same: root the phone, enter the commands listed in the OP and "voila", the "eth0" interface works! (The first and third "ip rule" commands were slightly different for each phone because you have to match the rules that get set automatically by the phone when "wlan0" is active.)
I am using a script (run with superuser access) to enter the commands, as they are too many to type by hand. Also, I wrote a simple Android app that runs the script with superuser access, so now I don't even need to use a terminal.
I hope this info helps!

doedoejohn said:
Indeed, BobjGear's web page says that their adapters do not work for Android phones. However, they may actually refer to the issue that we discuss in this thread, that is, that Ethernet over USB OTG is not enabled in most Android phones by default. Therefore, BobjGear stays in the safe side by making that statement, so as customers don't blame them when Ethernet over USB OTG doesn't work on a phone.
I also have an Ethernet adapter from "Plugable" which does not work for this application because it is not a USB OTG adapter. The keyword here is "USB OTG", so if you purchase an adapter from another brand, make sure it is "USB OTG".
Yes, I think we are onto something useful here. To add to my OP:
I was able to use the same method (although with slightly different "ip rule" commands) with other phones: HTC One M9 and Samsung Galaxy Note 5. The method was the same: root the phone, enter the commands listed in the OP and "voila", the "eth0" interface works! (The first and third "ip rule" commands were slightly different for each phone because you have to match the rules that get set automatically by the phone when "wlan0" is active.)
I am using a script (run with superuser access) to enter the commands, as they are too many to type by hand. Also, I wrote a simple Android app that runs the script with superuser access, so now I don't even need to use a terminal.
I hope this info helps!
Click to expand...
Click to collapse
Do you think you could share that app for the note 5?

Do apps access ethernet?
Thank you for this useful op.
Following your concept (S6 edge device rooted and using Alex-V kernel) I have no trouble with pings via terminal however all apps still see internet as disconnected.
Do your apps connect to the internet on all the phones with which you used this method?

Does the kernel have to support USB-Ethernet or is this not kernel related?

doedoejohn said:
Indeed, BobjGear's web page says that their adapters do not work for Android phones. However, they may actually refer to the issue that we discuss in this thread, that is, that Ethernet over USB OTG is not enabled in most Android phones by default. Therefore, BobjGear stays in the safe side by making that statement, so as customers don't blame them when Ethernet over USB OTG doesn't work on a phone.
I also have an Ethernet adapter from "Plugable" which does not work for this application because it is not a USB OTG adapter. The keyword here is "USB OTG", so if you purchase an adapter from another brand, make sure it is "USB OTG".
Yes, I think we are onto something useful here. To add to my OP:
I was able to use the same method (although with slightly different "ip rule" commands) with other phones: HTC One M9 and Samsung Galaxy Note 5. The method was the same: root the phone, enter the commands listed in the OP and "voila", the "eth0" interface works! (The first and third "ip rule" commands were slightly different for each phone because you have to match the rules that get set automatically by the phone when "wlan0" is active.)
I am using a script (run with superuser access) to enter the commands, as they are too many to type by hand. Also, I wrote a simple Android app that runs the script with superuser access, so now I don't even need to use a terminal.
I hope this info helps!
Click to expand...
Click to collapse
Hello, this is fascinating. I want to set this up on my LG G2 D801, only I don't know what "ip rule" commands I should enter. How can I find out the rules the phone sets when "wlan0" is active?

This post needs more recognition and attention than it has. XDA Admins should frontpage it imho. I have a friend who has a Nexus 9 and Ethernet dongles work out of the box. Samsung devices though is an other story. Me and my boss are setting up networks for small businesses. It would have been amazing if we could enable on our Samsung phones (S5 him and S7 me) Ethernet support as it would save us from having to carry on not-easy-to-access places heavy equipment to set up the network or troubleshoot issues that WiFi is not an option. I wish there was an app or a script that would do the work for you. In any way, good job, actually, spectacular job!

Hello,
how can I use ethernet with my S6 with Android 6?

doedoejohn said:
I found a way to enable Ethernet over USB OTG on a Samsung S6 Edge (SM-G925I, International Edition). The phone needs to be rooted because the method requires enabling the interface and editing routing tables.
The method has a "high" level of difficult, because it requires to enter commands on the phone using a terminal. By sharing this method, I hope experts will be able to automate this process, e.g., via an app.
While the description is for the Samsung S6 Edge, I suspect that this method may also be used on other phones.
Pre-requisites:
Tested on Samsung S6 Edge, SM-G925I, with Android v5.0.2 (Build LRX22G.G925IDVU1AOE3).
Phone must be rooted. This is necessary because you will be editing IP routing information which is only available with superuser access. Instructions for rooting the phone may be found elsewhere in XDA.
Set phone to "Airplane Mode" with Wi-Fi disabled. This simplifies the setup, but it is possible to lift this restriction. Left as an exercise to the reader.
Connect the phone to a micro USB OTG adapter. Then, connect the USB OTG adapter to a USB to RJ45 Ethernet adapter. Then, connect the Ethernet adapter to a router. (I have had good luck with BobjGear connectors and adapters. Sold by major online merchants.)
Setup
Your setup should look like this:
Samsung S6 Edge <-> Micro USB OTG connector <-> USB to RJ45 Ethernet adapter <-> Router <-> Internet
Enabling USB OTG interface
Using an app such as "Terminal Emulator" (by Jack Pavlevich) enter the following commands:
Check whether phone can reach router (that is, the gateway). Note: use the IP address of your router. Output shows that phone does not have access to any network.
Code:
$ ping -c 3 192.168.1.1
connect: Network is unreachable
(Optional) Check existing routing setup, useful for comparing after setup is completed.
Code:
# ip route // Should not show anything
# ip rule // Shows default rules (in my case, there are eight)
Confirm that the interface is visible to the phone.
Code:
$ netcfg
eth0 DOWN 0.0.0.0/0
The "eth0" interface corresponds to Ethernet over USB OTG. "DOWN" means that "eth0" is not active, resulting in the "Network is unreachable" message when pinging the router.
Now, gain superuser access:
Code:
$ su
Enable "eth0" interface. Router must be setup for DHCP.
Code:
# netcfg eth0 dhcp
If above command times out, try again. Otherwise try:
Code:
# netcfg eth0 down
# netcfg eth0 dhcp
Confirm that the interface is up and it has been assigned an IP address by the router. (IP address assigned to "eth0" will vary depending on your router setup.)
Code:
# netcfg
eth0 UP 192.168.1.21/24
Now, ping the router. (Note: Use your router's IP address.)
Code:
# ping -c 3 192.168.1.1
Network is unreachable
While interface is active and it has an IP address, phone still does not have access to any network.
Let's examine existing IP routing settings:
Code:
# ip route
The above command does not show any output, indicating that no IP routing is set up. In devices that support Ethernet over USB OTG off-the-shelf (e.g., Nexus 5, Sony Xperia Z1 phone and Z2 tablet), IP routing is setup "automatically". But in devices such as Samsung S6 Edge, IP routing settings need to be enabled manually using the commands below. (My guess is that Google, OEMs or carriers do not want you to use Ethernet over USB OTG.)
Configure IP routings
Configure IP routing in the "eth0" interface. The settings are similar to the ones used by the phone when the Wi-Fi interface is enabled. If the settings below do not work for you, check the IP routing settings on your phone when Wi-Fi is enabled and "eth0" is disabled, and adjust accordingly.
Code:
# ip rule add from all fwmark 0x101f9/0x1ffff lookup 1024 pref 13000
# ip rule add from all oif eth0 lookup 1024 pref 14000
# ip rule add from all fwmark 0x1f9/0x1ffff lookup 1024 pref 19000
# ip rule add from all fwmark 0x0/0xffff lookup 1024 pref 22000
# ip route add table 1024 192.168.1.0/24 dev eth0
# ip route add table 1024 default via 192.168.1.1 dev eth0
Exit superuser mode and (optionally) confirm IP routing settings.
Code:
# exit
$ ip rule // Command should show new entries 13000, 14000, 19000 and 22000
(Optional) Examine new IP routing settings and and newly created routing table entry.
Code:
$ ip route show table 1024
$ ip route
Both commands should output something like this:
Code:
default via 192.168.1.1 dev eth0 proto static
192.168.1.0/24 dev eth0 proto static scope link
Finally, confirm router is reachable from phone. (Note: use your router's IP address.)
Code:
$ ping -c 3 192.168.1.1
That's it! Your phone should now have Ethernet access over USB OTG. Enjoy!
Ps. Please hit 'Thanks' if this info was useful.
Click to expand...
Click to collapse
First of all, thank you for this great work. I need ethernet connection and my tablet (lenovo yoga tab 3) had no ethernet access.
Now, following your instuctions I have managed to ping the router from the terminal, but then I do not load any page the browser and I do not connect the apps. Do I need to do anything else? Or am I doing something wrong?
Could you help me please?
Thanks in advance!

doedoejohn said:
Code:
# ip rule add from all fwmark 0x1f9/0x1ffff lookup 1024 pref 19000
Click to expand...
Click to collapse
Hello, I am trying to do the same for my note 4.
I am currently able to ping google.com without having changed the ip rule tables.
But all my apps are still not able to recognize the ethernet connection.
So I am digging into those ip rule tables.
My question is, how did you find that value 0x1f9 ?
I have analyzed dozen of ip route policy databases and I have roughly understood how they are built.
But it seems this value differs from an interface to another (wlan0, eth0, rmnet, ...). Seems it's a kind of network ID ?
Also, would it be possible to have your ip route policy table with wlan0 and the final one for eth0 with your tweak ?
Thanks

hello
i would like to know if there is a script to enable ethernet...i've a lenovo tablet, the usb dongle is well recognize by android but no ethernet connection is made...

Thank you for sharing this, novebis!
Getting ethernet working on my used tablet was the reason for my purchasing it and the reason I joined the forums.
This worked on my ASUS Memopad 8 ME181C K011 (rooted with locked boot loader) with a "Pluggable USB 2.0 Ethernet Adapter 10/100 Mbps", Model USB2-E100, hanging off of a "Micro USB OTG Charge HUB For Smartphone and Tablet".
I've got the "Pluggable USB 2.0 OTG Ethernet Adapter 10/100 Mbps", model USB2-OTGE100, also which I suspect will work without any changes. I also have a USB 3 gigabit model from a different manufacturer with a similar but newer SoC which I'll try. A Chromecast powered version from UGREEN is also on the way for testing.
I'll be looking for an automated method for this and for a way to make Google Play use the connection.
Thanks so much. I'm stoked

On Note 5, I can ping google.com and Chrome is working via the cable. But all other apps don't, like Google Photos, Youtube, Facebook.
Any idea why?
The script in this thread didn't work correctly so I had to improvise my own as below:
ifconfig eth0 10.1.1.50 netmask 255.255.255.0 broadcast 10.1.1.255
ifconfig eth0 up
ndc network create 9792
ndc network interface add 9792 usb0
ndc network route add 9792 usb0 0.0.0.0/0 192.168.225.1
ndc resolver setnetdns 9792 8.8.8.8 8.8.4.4
ndc network default set 9792
Click to expand...
Click to collapse

dan.leahu said:
On Note 5, I can ping google.com and Chrome is working via the cable. But all other apps don't, like Google Photos, Youtube, Facebook.
Any idea why?
The script in this thread didn't work correctly so I had to improvise my own as below:
Click to expand...
Click to collapse
Although I have a different device, I've given up on this and switched, instead, to a virtual android device.
There are some apps relating to fake WiFi which are supposed to address this issue but I've had no luck in getting some apps (e.g. Google Play) to use ethernet. I've also had limited results using reverse USB tethering.
What you're trying to do is what many would want. However, it's simply too good of an idea for the producers of proprietary systems and operating systems to tolerate. Efforts to give the people what they want seem to fall into a black hole of silence.
"Dive Into Android Networking: Adding Ethernet Connectivity - ELCE 21"
https://www.youtube.com/watch?v=LwI2NBq7BWM
Slides
https://www.elinux.org/images/9/98/Dive_Into_Android_Networking-_Adding_Ethernet_Connectivity.pdf
HD version of the video here...
https://bootlin.com/pub/video/2012/elce/elce-2012-zores-android-networking-ethernet-support.webm
Products resulting from the above work:
Premium DeskPhones
https://www.al-enterprise.com/en/products/devices/premium-deskphones

AngrySockPuppet said:
Although I have a different device, I've given up on this and switched, instead, to a virtual android device.
There are some apps relating to fake WiFi which are supposed to address this issue but I've had no luck in getting some apps (e.g. Google Play) to use ethernet. I've also had limited results using reverse USB tethering.
What you're trying to do is what many would want. However, it's simply too good of an idea for the producers of proprietary systems and operating systems to tolerate. Efforts to give the people what they want seem to fall into a black hole of silence.
"Dive Into Android Networking: Adding Ethernet Connectivity - ELCE 21"
https://www.youtube.com/watch?v=LwI2NBq7BWM
Slides
https://www.elinux.org/images/9/98/Dive_Into_Android_Networking-_Adding_Ethernet_Connectivity.pdf
HD version of the video here...
https://bootlin.com/pub/video/2012/elce/elce-2012-zores-android-networking-ethernet-support.webm
Products resulting from the above work:
Premium DeskPhones
https://www.al-enterprise.com/en/products/devices/premium-deskphones
Click to expand...
Click to collapse
Thank you so much, never knew such research exists on this.
So does it mean there's no way to do it?
I thought I was close, as after the script above I've further did some changes and now Google Play works via Ethernet Cable. I can download apps, which wasn't working before.
Added command:
Code:
ip rule add from all lookup main pref 1
But still, WhatsApp and Google Photos still miss the connection. I really can't understand why?!
Oh now I see from the slides:
• Java framework services and apps rely on Connectivity Manager
and have no clue what Ethernet route/connection actually means.
- Except for some apps (e.g. Browser, which relies on native implementation).
Click to expand...
Click to collapse

Actually found this which does a reverse tethering via USB cable + Linux computer. Hope it'll work better than trying to get Ethernet connection work.
https://github.com/vvviperrr/SimpleRT
found at:
https://news.ycombinator.com/item?id=12198085

dan.leahu said:
Thank you so much, never knew such research exists on this.
So does it mean there's no way to do it?
I thought I was close, as after the script above I've further did some changes and now Google Play works via Ethernet Cable. I can download apps, which wasn't working before.
Added command:
Code:
ip rule add from all lookup main pref 1
But still, WhatsApp and Google Photos still miss the connection. I really can't understand why?!
Oh now I see from the slides:
Click to expand...
Click to collapse
Congratulations on getting Google Play to work. That's a big accomplishment.
You're way ahead of me though.
Perhaps you will have better luck with the fake WiFi apps as well.
My main interest in this is to use social media apps without wireless.

Related

[Guide] Reverse USB Tethering step by step

hello everyone!
I was trying to find a way to connect my iconia via usb with my laptop and use my internet access for instances that wifi isn't available.
I searched a lot but there wasn't any usefull clear guide. So after some failing attempts, finally i managed to succeed (using win 7). Here are the steps:
*root is required*
1. install http://code.google.com/p/android-wired-tether/ (i used stable version 1.2 but i don't think 1.4 will make any problems) but do not enable it yet.
2. Install USB drivers from Android SDK instructions found here: http://developer.android.com/sdk/win-usb.html , later you will also need RNDIS drivers because when you connect the tablet with your pc and enable wired tether it will install the drivers. I found working drivers from HTC sync located at C:\Program Files (x86)\HTC\HTC Driver\Driver Files\Win7_x64\htcrndis.inf
you have to install them manually from the device manager (pick the: HTC Remote NDIS based device)
3. now that we have completed the installation with Wired Tether (still leave it running), we are ready to proceed to the next step. Open network connections. You will notice that now there is one more. (in my case no1 is local area and no2 local area 5 (the one wired tether created). select the connection you want to share go to properties and enter "sharing tab". tick "Allow other network users to connect through this computer's Internet connection" and pick the connection made by wired tether. Hit apply and you will have bridged the two connections.
4. open any emulator on your tablet and type:
Code:
su
ifconfig usb0 192.168.1.9 netmask 255.255.255.0 up
route add default gw 192.168.1.1 dev usb0
setprop net.dns1 8.8.8.8
setprop "net.gprs.http-proxy" ""
netcfg usb0 dhcp
at ifconfig command you enter an available ip of your router for example if your pc is connected to 192.168.1.7 you can pick 192.168.1.9 that is free.
at the second line enter the default gateway of your internet connection found under the detailed view of its options.
setprop "net.gprs.http-proxy" "" is in case you are NOT behind a proxy server
5. wait about 15 seconds and...
enjoy!
each time you enable wired tether you have to type in:
su
netcfg usb0 dhcp
to undo the hole "reverse usb" thing, simply unbridge the 2 connections, restart wired tether and you are ready to use it for normal tethering.
browsers work fine, facebook, pulse, tunein. i haven't tested many apps yet...
issues: Market browsing is ok but downloading apps not, some apps do not work.
p.s: it's my first guide so if something seems confusing or unclear, please forgive me!
interesting... question... why do you do " setprop "net.gprs.http-proxy" """?
i'm asking because maybe this is what i'm missing in my usb 3g for my wifi only
thor2002ro said:
interesting... question... why do you do " setprop "net.gprs.http-proxy" """?
i'm asking because maybe this is what i'm missing in my usb 3g for my wifi only
Click to expand...
Click to collapse
forgot to implement the source link...
comments to focus are:
Rugga said...
I'm using Windows 7. I shared my ethernet internet connection to the USB tether device.
In console emulator on the phone I typed:
ifconfig usb1 192.168.2.2 netmask 255.255.255.0 up
route add default gw 192.168.2.1 dev usb1
I can ping the gateway, I can also ping the web by IP address, eg 64.233.181.104 for google.com
What I can't do is use the browser or ping by domain name. I tried:
setprop net.usb1.dns1 192.168.2.1; and
setprop net.dns1 192.168.2.1
Click to expand...
Click to collapse
OK it is working now. After setting up ICS type in console emulator on your phone:
ifconfig usb0 192.168.2.2 netmask 255.255.255.0 up
route add default gw 192.168.2.1 dev usb0
iptables -F
iptables -F -t nat
setprop net.dns1 8.8.8.8
setprop "net.gprs.http-proxy" ""
Click to expand...
Click to collapse
it gave me a headache trying to understand what exactly does this line...
the only thing i managed to figure out is tha it redirects and leaves blank proxy server via gprs connection... is it a fake connection (gprs) that blocks data transfer via usb from apps? the only sure thing is that these 2 lines with setprop command fixed the issue with the apps (browser and others)...
first is google's dns, probably necessary as well...
btw great job with the modules!
A quick question
Is this Iconia-specific or can the same method be used on any Android device provided we have working RNDIS drivers for it?
The way it appears to me, I don't see why it shouldn't work on other devices but please correct me if I am wrong.
HQRaja said:
Is this Iconia-specific or can the same method be used on any Android device provided we have working RNDIS drivers for it?
The way it appears to me, I don't see why it shouldn't work on other devices but please correct me if I am wrong.
Click to expand...
Click to collapse
in devices which already have the tethering ability, the hole wired tether thing doesn't need installation, so it is easier and i think it will work on any android based devices. so give it a try!
probably you won't even need to install RNDIS drivers, but in any case the HTC ones work like a charm (some other that i tried crashed windows upon connection).
you don't have to get specific RNDIS drivers especially for your device cause they are used for connecting usb devices used as network ones.
so... give it a try!
Exactly what i need desperately, i have a wifi signal which is very poor, i use external antenna to boost wifi signal. This external antenna has no drivers for android for sure, therefore i need to do reverse tethering to share internet connection from my computer.
I tried to use your guide but i think it needs a bit more details. I installed android tethering 1.4 but i am stuck at step 2 cause at this step when i turn on debugging mode on iconia then PC searches for drivers but doesn't accept the ones i downloaded from android SDK.
Kindly help me with this, i will be grateful for that.
Thanks.
usman3206 said:
Exactly what i need desperately, i have a wifi signal which is very poor, i use external antenna to boost wifi signal. This external antenna has no drivers for android for sure, therefore i need to do reverse tethering to share internet connection from my computer.
I tried to use your guide but i think it needs a bit more details. I installed android tethering 1.4 but i am stuck at step 2 cause at this step when i turn on debugging mode on iconia then PC searches for drivers but doesn't accept the ones i downloaded from android SDK.
Kindly help me with this, i will be grateful for that.
Thanks.
Click to expand...
Click to collapse
Hi! Sorry for my late answer to that. I've been away for a while...
try the drivers that are located at http://acer.us/ac/en/US/content/drivers
pick tablet, iconia tab, a500 and then download the usb drivers.
Any chance to enable this with an android phone? Wired tethering from the phone I mean.
There's actually a free program @ http://www.connectify.me
Its for Windows and they are developing an android app as well. But the windows software is quite easy and makes your computer or laptop a "hotspot" to connect multiple devices too.
enjoy!
Bec07 said:
Any chance to enable this with an android phone? Wired tethering from the phone I mean.
Click to expand...
Click to collapse
i'll give it a try (i assume you mean via usb connection).
connectify is for wireless networking. the hole reverse usb tethering thing is based on usb connection without any participation of a wireless network at all.
the majority of the latest android phones can become a hotspot natively anyway.
He does not want to install the driver from HTC. There are other options?

Bridging Connections in Android

I've recently worked to get OpenVPN working on my Android CM7-based phone. This allows me to connect to my personal network from my phone which is great.
I'd like to take it a step further by allowing other computers to tether to my phone and then have access to the VPN that my phone is connected to. In other words, after connecting to my VPN from my phone, I want an arbitrary computer to USB or wifi tether to my phone, and then be able to access resources on the VPN.
I've found some semi-related posts, including one which describes reverse tethering over USB: http://blog.mycila.com/2010/06/reverse-usb-tethering-with-android-22.html
I think I know basically what needs to happen: The VPN and USB-tether network interfaces need to be "bridged" on the phone. This would allow the USB-tether network to talk to the VPN network. I'm sure this can be done via command line inputs but I'm not sure how. Any ideas? Thanks!
Bridging in Android
I'm actually looking into doing something like this but I want to bridge the wifi connection with a reverse-tether connection to fake a wifi connection to bypass the problems with the android market and other apps complaining about no wifi or 3g.
I've compiled a CM7 kernel for the nexus s with bridging as a module. I'll test this and see what happens. If anybody is interested in the kernel or the module let me know.
EasyVictor said:
I've recently worked to get OpenVPN working on my Android CM7-based phone. This allows me to connect to my personal network from my phone which is great.
I'd like to take it a step further by allowing other computers to tether to my phone and then have access to the VPN that my phone is connected to. In other words, after connecting to my VPN from my phone, I want an arbitrary computer to USB or wifi tether to my phone, and then be able to access resources on the VPN.
I've found some semi-related posts, including one which describes reverse tethering over USB: http://blog.mycila.com/2010/06/reverse-usb-tethering-with-android-22.html
I think I know basically what needs to happen: The VPN and USB-tether network interfaces need to be "bridged" on the phone. This would allow the USB-tether network to talk to the VPN network. I'm sure this can be done via command line inputs but I'm not sure how. Any ideas? Thanks!
Click to expand...
Click to collapse
i am pretty much doing this already for months now,,
i am using droidvpn(helluva lot easier than managing openvpn to work)
then i use another app to tether,,,
in my case i use open garden or wifi thether for root users...
works for me...i open droid vpn first once connected i open the tethering app,...
if youre using usb cable to tether just look for the app that does that...
i think clockwork tether should work..
here is the link
https://play.google.com/store/apps/...wsMSwxLDEsImNvbS5rb3VzaGlrZHV0dGEudGV0aGVyIl0.
reverse thethering is a different concept thou,,,your phone will get internet from pc.....
hope it helps..
Almost
zeusseuz said:
i am pretty much doing this already for months now,,
i am using droidvpn(helluva lot easier than managing openvpn to work)
then i use another app to tether,,,
in my case i use open garden or wifi thether for root users...
works for me...i open droid vpn first once connected i open the tethering app,...
if youre using usb cable to tether just look for the app that does that...
i think clockwork tether should work..
here is the link
https://play.google.com/store/apps/...wsMSwxLDEsImNvbS5rb3VzaGlrZHV0dGEudGV0aGVyIl0.
reverse thethering is a different concept thou,,,your phone will get internet from pc.....
hope it helps..
Click to expand...
Click to collapse
Thanks for the reply. Well, from what I can tell, DroidVPN is a service that lets you VPN into a public server for the purpose of redirecting your traffic and avoiding firewalls, etc. I'm not trying to redirect my traffic to a public VPN, I'm trying to connect to my own VPN. I have my own VPN server that I'd like to connect to, and then allow tethered computers from my phone access those VPN resources. Even if DroidVPN allows you to connect to your own VPN, I don't want to direct all my traffic to it; only requests for resources on that network. For example, with OpenVPN, if I make a website call to google.com, it goes through the phone's internet connection. But if I access an IP located on my VPN, it goes through the OpenVPN connection. Does DroidVPN allow that?
njdevi11 said:
I'm actually looking into doing something like this but I want to bridge the wifi connection with a reverse-tether connection to fake a wifi connection to bypass the problems with the android market and other apps complaining about no wifi or 3g.
I've compiled a CM7 kernel for the nexus s with bridging as a module. I'll test this and see what happens. If anybody is interested in the kernel or the module let me know.
Click to expand...
Click to collapse
Interesting. How does the bridging module work? Do you run a command to bridge certain interfaces? If you have success, I'd like to try it out for bridging the tether network to the vpn tunnel.
EasyVictor said:
Thanks for the reply. Well, from what I can tell, DroidVPN is a service that lets you VPN into a public server for the purpose of redirecting your traffic and avoiding firewalls, etc. I'm not trying to redirect my traffic to a public VPN, I'm trying to connect to my own VPN. I have my own VPN server that I'd like to connect to, and then allow tethered computers from my phone access those VPN resources. Even if DroidVPN allows you to connect to your own VPN, I don't want to direct all my traffic to it; only requests for resources on that network. For example, with OpenVPN, if I make a website call to google.com, it goes through the phone's internet connection. But if I access an IP located on my VPN, it goes through the OpenVPN connection. Does DroidVPN allow that?
Click to expand...
Click to collapse
i was just using droidvpn for example..
i am also using open vpn...
i use both vpns depending on the time of the day,
i am connected to vpns to make viber calls.
and also to tether to my pc ,make google voice calls as well...
maybe i am not understanding what you want to do i guess
Brctl
EasyVictor said:
Interesting. How does the bridging module work? Do you run a command to bridge certain interfaces? If you have success, I'd like to try it out for bridging the tether network to the vpn tunnel.
Click to expand...
Click to collapse
I got my nexus S back from my friend and compiled bridging into a cyanogenmod kernel, this yeilds a bunch of kernel modules you will need to load onto the device:
bridge.ko
llc.ko
p8022.ko
psnap.ko
stp.ko
The modules loaded and I was able to create a bridge i haven't had time to further test this yet but i have no reason to believe it wont work.
The command you use to control the bridging is brctl which is built into busybox.
Here's what you do:
You would have to remove all the ip's from both interfaces and then add them back to the bridge when you're done.
su
#create the bridge
busybox brctl addbr br0
#add usb0 to the bridge
busybox brctl addif br0 usb0
#add eth0 to the bridge
busybox brctl addif br0 eth0
#give the bridge interface an ip and bring it up
busybox ifconfig br0 192.168.1.1 netmask 255.255.255.0 up
'brctl' applet not found
njdevi11 said:
The command you use to control the bridging is brctl which is built into busybox.
Here's what you do:
You would have to remove all the ip's from both interfaces and then add them back to the bridge when you're done.
su
#create the bridge
busybox brctl addbr br0
#add usb0 to the bridge
busybox brctl addif br0 usb0
#add eth0 to the bridge
busybox brctl addif br0 eth0
#give the bridge interface an ip and bring it up
busybox ifconfig br0 192.168.1.1 netmask 255.255.255.0 up
Click to expand...
Click to collapse
What version of busybox you tried? Or I need more complete installation of busybox?
Here is what I got.
su
[email protected]:/ # busybox brctl
brctl: applet not found
My busybox is
Busybox v1.21.1-Stericson (2013-09-26 14:33:26) multicall-binary
I am interested
njdevi11 said:
I'm actually looking into doing something like this but I want to bridge the wifi connection with a reverse-tether connection to fake a wifi connection to bypass the problems with the android market and other apps complaining about no wifi or 3g.
I've compiled a CM7 kernel for the nexus s with bridging as a module. I'll test this and see what happens. If anybody is interested in the kernel or the module let me know.
Click to expand...
Click to collapse
I need to exactly that for Android-x86 4.3. I am using version android-x86-4.3-20130725.iso.
If you can patch this version and give ne a new ISO or an *.apk, I can compensate you via Pay Pal.
The key point is make-believe all apps that wifi is working, possibly 4 G as well.
I use KVM as virtualization platform, so there is no real hardware.
Hi,
I'm looking for a similar solution (I tried to connect with my wifi to an accesspoint to provide internetaccess to the accesspoint thru the mobile network)
Two challenges:
wifi and mobile network have to enabled and connected
create the bridge between wlan0 and rmnet0
expected result: the access point got a stable connection to wlan0 an the requests to the web from the accesspoint routet thru wlan0 to rmnet0 into the www
unfortunately my busybox throw this message:
Code:
1|[email protected]:/ # busybox brctl show
busybox brctl show
brctl: SIOCGIFBR: Package not installed
how could I fix it?
rooted HTC one mini with android 4.4.2

[GUIDE] Connect Android to Linux PC internet via USB

I've been playing 4 hours with my brand new Archos Titanium 40
and I was specifically trying to connect it to the internet
via the USB cable.
Here's what I have :
Archos Titanium 40, almost unmodified Android Jelly Bean 4.2.2, not rooted.
A fairly up do date "testing" Debian on my PC.
The Archos USB cable (standard stuff mind you) connecting my phone to the PC.
The first thing to note is that Jelly Bean 4.2.2 does provide
reverse tethering natively.
For that, just plug your USB cable in your PC and in your phone.
The phone then proposes to expose itself as a regular USB storage.
Don't accept that. Go to the settings page instead, look at the
"wireless & network" stuff, then "More...". There you'll find "USB Internet". Activate
that. Android will then take you by the hand. The first thing it'll
ask is the OS you want to connect to. You have a choice between
various Windows versions... But we're on Linux. So choose Windows 8
and just act as if everything was fine (clik "next" and then "finished"). After that
your USB connection is there. The setting string reports you're connected.
On the PC Linux now. There's a new network interface : usb0.
To see it use ifconfig (you must be root to do that).
The problem is that that interface has no IP address. Since we choose to work
as with windows 8, Android phone gave itself the 192.168.137.1 default
address (you can see that by opening a shell on your phone and
typing netcfg; the you look at the rndis0 interface...)
So, you know have to set that address properly, and then activate the IP
NAT stuff. This is done as root with :
ifconfig usb0 192.168.137.1
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/sbin/iptables -A FORWARD -i usb0 -o eth0 -j ACCEPT
(on my PC eth0 is the ethernet card wich is connected
to my router which is, in turn, connected to the internet)
And voilà. nothing to install, nothing to root. Everything works :
slashdot, youtube, etc. Super clean. No rooting needed, no additional software.
Somehow I didn't find that anywhere on the web... So I hope it helps...
stF

Problem with ethernet in Samsung Galaxy Tab 4 8' (SM-T330), android 5.1.1

Hi everybody,
I have a problem with the ethernet connection in the Samsung Galaxy Tab 4 8' WiFi (SM-T330).
I need to connect the tablet to a embedded system through ethernet with a static IP address, and in order to achieve this I use a MicroUSB-RJ45 adapter that in android 4.4.2 works perfectly fine, but when I upgraded to android 5.1.1 the ethernet connection stopped working.
A key requirement I have is that the IP address must be static. This is important because making some research I've connected the tablet to a LAN and with ethernet configured as DHCP and I have internet connection, but when I change the configuration of the connection to a static IP I can't even make ping to the gateway. If I execute in a terminal emulator the command 'netcfg' I can see the interface eth0 up with the correct IP assigned (192.168.1.98). If I run the command 'ip route show' I can see the following in the output:
default via 192.168.1.1 dev eth0
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.98
Which is apparently correct IMO, but the fact is that if I ping the 192.168.1.1 address I get "Network is unreachable" error.
Just to compare, the output of 'netcfg' and 'ip route show' in case of DHCP configuration is pretty much the same:
default via 192.168.1.1 dev eth0 metric 238
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.179 metric 238
But this time everything works fine.
I have no clue why it doesn't work with a static IP. Can anybody help me with this issue? I'm doing something wrong, or this is an android 5.1.1 bug?
Thanks in advance.
pazonks said:
Hi everybody,
I have a problem with the ethernet connection in the Samsung Galaxy Tab 4 8' WiFi (SM-T330).
I need to connect the tablet to a embedded system through ethernet with a static IP address, and in order to achieve this I use a MicroUSB-RJ45 adapter that in android 4.4.2 works perfectly fine, but when I upgraded to android 5.1.1 the ethernet connection stopped working.
A key requirement I have is that the IP address must be static. This is important because making some research I've connected the tablet to a LAN and with ethernet configured as DHCP and I have internet connection, but when I change the configuration of the connection to a static IP I can't even make ping to the gateway. If I execute in a terminal emulator the command 'netcfg' I can see the interface eth0 up with the correct IP assigned (192.168.1.98). If I run the command 'ip route show' I can see the following in the output:
default via 192.168.1.1 dev eth0
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.98
Which is apparently correct IMO, but the fact is that if I ping the 192.168.1.1 address I get "Network is unreachable" error.
Just to compare, the output of 'netcfg' and 'ip route show' in case of DHCP configuration is pretty much the same:
default via 192.168.1.1 dev eth0 metric 238
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.179 metric 238
But this time everything works fine.
I have no clue why it doesn't work with a static IP. Can anybody help me with this issue? I'm doing something wrong, or this is an android 5.1.1 bug?
Thanks in advance.
Click to expand...
Click to collapse
how to you connect tablet with LAN cable?
thelous said:
how to you connect tablet with LAN cable?
Click to expand...
Click to collapse
They said (and I quote):
in order to achieve this I use a MicroUSB-RJ45 adapter that in android 4.4.2 works perfectly fine, but when I upgraded to android 5.1.1 the ethernet connection stopped working.
Click to expand...
Click to collapse
thisisapoorusernamechoice said:
They said (and I quote):
Click to expand...
Click to collapse
Ohh i thought he mean tab 4 8.0 had ethernet port LOL., but why use LAN cable whek you can get same speed with wifi? Atleast i am getting same speed on tablet as i have on desktop computer....
I believe I am having the same problem. Any word on what is going on?
I was able to get UDP messages out to work intermittently by finding a network that it would connect with and then connecting it back into the network I wanted it to work with. I could not get the initial connection consistently, though.
I was able to get everything working again by flashing 4.4.2 onto the tablet, factory resetting, not letting anything update, and setting up my Ethernet network.

Ethernet connection - problem with some devices

Hi,
I want to connect few phones to ethernet network via USB ASIX AX88772B adapter. Some devices can connect without any problems, some need to install xposed and Fake WiFi module. And some... can't! They all have OTG support and drivers for this network card. All phones get IP from DHCP, on all DNSs are set to 8.8.8.8 and 8.8.4.4, all have the same gateway. On all devices traceroute and nslookup works properly, but on some doesn't work ping and internet generally. It looks like Android can't see internet connection. Even with Fake WiFi. I also tried to set IP of rmnet0 to 0.0.0.0, but it didn't help. This is steps which I'm doing:
Install xposed, fake wifi and turn it on
Plug ethernet card
Dhcpcd eth0
setprop net.dns1 8.8.8.8 and for second dns 8.8.4.4
route add default gw xxx.xxx.xxx.xxx dev eth0
Testing with nslookup, traceroute, ping
Did you have the same problem? I noticed that all LG Phones have this problem, and HTC ONE Max (I didn't test on other HTCs). Could you help me?

Categories

Resources