Ethernet partial working on Lenovo YT3-X50L - General Topics

I have a (rooted) Lenovo Yoga Tablet 3 with Android 6.0.1 with broken RF interface (no Wifi, no Bluetooth...). So I tried to get up the Ethernet.
I used 3 different dongles, but no one was plug and play with this tablet (but all 3 work plug and play on other tablets...)
As it didn't come up with simply plug in, I managed the connection by adding (after plug in the dongle):
Code:
su
# as dhcpcd uses default table main and it isn't in the rules
ip rule add from all lookup main pref 1
# set up eth0 via dhcp
dhcpcd eth0
# here only ip addresses work, so for the dns I have to set the (android) resolver
ndc resolver setnetdns eth0 <MYROUTER> 8.8.8.8 8.8.4.4
Now all browsers and a ping app work fine, but messengers (Whatsapp, Telegram...) say 'no internet'.
When I connect via usb with gnirehtet everything works fine but I don't like to spend an extra PC for the reverese tethering server. So I changed the usb cable with the ethernet dongle and everything works fine until I stop the VPN left open. Ifconfig shows me that there are no packeges routet via tun0, just via eth0. Unfortunally I couldn't get up another VPN setup as all clients tried (even the android built in VPN) showed up 'no internet'.
So, has anybody an idea what I can do without the gnirehtet workaround?

Related

[REQ] Reverse wired tethering

Before i start i want to let people know YES I DO HAVE A WIRELESS ROUTER!! So please do not respond telling me to just go buy a router.
REQUEST - Reverse wired tethering. I.E. Sharing PC's iNet connection with your phone via USB.
REASON - My university's wireless is locked down and does not allow mobile phones, pda's to connect up to our wireless without submitting MAC for approval. Looking to sync certain apps without using my data connection.
I dont know if anyone has played around with trying to get this working or not. I know its a small market of people who may be interested in this, but for certain places (CANADA) where data charges are WAY to expensive this could be handy for students at UNI where wireless is not an option.
get a second wifi adapter on your laptop, and share your uni wireless network connection with the second wifi adapter. Use a hidden SSID, then no one will know what is going on
This was asked a couple of times before here and I remember people saying you couldn't reverse the tethering.You could try though.
alexperkins said:
get a second wifi adapter on your laptop, and share your uni wireless network connection with the second wifi adapter. Use a hidden SSID, then no one will know what is going on
Click to expand...
Click to collapse
Thats a good idea xD
Hey guys,
I have been trying to find a way to do this for a long time.
The best solution i have found (actually the only solution) is Connectify. The only downside is you must have Win7.
What it does is turns your wifi adapter into a HotSpot, even if you are using wifi to get the net in the first place. Its a great tool and should be what your after.
http://www.connectify.me/
memphisraynz said:
Hey guys,
I have been trying to find a way to do this for a long time.
The best solution i have found (actually the only solution) is Connectify. The only downside is you must have Win7.
What it does is turns your wifi adapter into a HotSpot, even if you are using wifi to get the net in the first place. Its a great tool and should be what your after.
http://www.connectify.me/
Click to expand...
Click to collapse
thank you so much for this
Your best solution is the WiFi adapter. You could most likely get away with a SOCKS proxy over USB, possibly using adb, but it would be complicated, unstable, and messy.
I still don't know you just don't use your wireless router. I assume they have wired. Clone your PC's mac address and hook it up. Universities are retarded with that crap. They have the worst networks and security.
If no wired, then what podunk place is it? haha
Even if they had only wireless , you could set up a wlan client and repeat it. DDWRT, etc, ftw.
Just get backtrack for your laptop and spoof your mac to all 0 then grab connect to the network at your school the spoofed mac will allow you to browse so long as no other encyption is on the network such as WEP or WPA.
then you can try to flood all the ports on the network so no one else can connect then spoof your phones mac by conneecting to your laptop through wireless as an adhoc connection and while staying connected through adhoc load a second server through the same wireless network card and you can connect to the achools network again. and walla...
death1246 said:
Just get backtrack for your laptop and spoof your mac to all 0 then grab connect to the network at your school the spoofed mac will allow you to browse so long as no other encyption is on the network such as WEP or WPA.
then you can try to flood all the ports on the network so no one else can connect then spoof your phones mac by conneecting to your laptop through wireless as an adhoc connection and while staying connected through adhoc load a second server through the same wireless network card and you can connect to the achools network again. and walla...
Click to expand...
Click to collapse
so simple, i dunno why i didnt think of that. thanks! lol
Well its quit simple once you learn your way around linux...
If you have any experience with *nix, you may want to look at Cyanogen's original usb tether shell script:
http://github.com/cyanogen/android_vendor_cyanogen/blob/master/bin/usb-tether
Basically you could use the internet connection sharing function that comes with all popular OSes and access your uni's network on your phone. You must have Cyanogen mod or another mod using his kernel. Not yet working on OSX for some reason. Tested under Windows 7.
First you'll need to figure out what IP address range your computer's DHCP server is using. This is normally fixed for each OS. For Windows 7, it's always 192.168.137.0/24.
For OSX or Linux, you can setup connection sharing (for some other connection because we don't have the USB interface yet) and ifconfig.
Second is to enable the USB connection on the phone's side. Type the following command in any console program, like Connectbot. (You must use a console program as opposed to adb because you will lose USB debugging once the USB network interface is enabled.)
Code:
su
cd /sys/devices/virtual/net/usb0
ifconfig usb0 192.168.137.200 mask 255.255.255.0
echo 1 > enable
The first line makes you the superuser. (Skip if the command prompt is #)
The second line land you in usb0's directory under sys. We'll need to type the disable command later, so it's easier if we're here.
The third line brings up the virtual usb network interface and sets its IP address.
The IP address should be in the same network (i.e. IP address range) you obtained in step 1. Say if the original is 192.168.137.1 in a /24, you can use 192.168.137.2 through 192.168.137.254
This actually enables the usb interface.
You will now see a new network adapter is recognized by your computer. Set up connection sharing to share your internet TO that adapter.
Make sure you have connection by pinging your computer from your phone.
For example:
ping 192.168.137.1
Now you'll have to change the routes so traffic go through the USB cable instead of the mobile network.(# is the command prompt, do not enter)
# busybox route
check the line starting with "default". Write down the ip address after it; call it IP1.
# getprop net.dns1
Call the IP returned IP2.
Code:
busybox route del default gw IP1
busybox route add -host IP2 rmnet0
busybox route add default gw 192.168.137.1
The first line deletes the old default route via the mobile network.
The second line adds an "exception" for your carrier's DNS server.
The third line adds the new route via USB. You should replace the address at the end with the IP address from the first step.
Your network should be working now. Test by visiting some website that is only available on campus or by traceroute.
You must make sure the mobile network is always connected though. This is because domain names are still resolved by your mobile carrier. If you ever lose your mobile connection, the routing table will be changed as well.
To disconnect:
Make sure you're still in /sys/devices/virtual/net/usb0.(Use pwd if unsure.)
Code:
netcfg usb0 down
echo 0 > enable
The usb interface will disappear on your computer.
Now switch the phone to airplane mode and back to re-enable mobile network.
The disconnect step should always restore your phone's state.
// This is written at 3am, so use it at your own risk...
help?
look at this
http://superuser.com/questions/91699/spoof-mac-address-from-ip-command
bg
It's really sad that Android can't reverse tether. If you want to use your laptop's AdHoc connection you have to do serious hacking to the tiwlan.ini and the wpa_supplicant.conf. There is no way to connect via bluetooth ar USB.
I'm seriously considering WP7 now for my next OS of choice... A nd for everyone saying "go buy a router" - go buy a router and stick it up your .... nose.
Hi,
I have the same problem. No WiFi in my work and no WiFi in my current home (a Resident Hall). There's no possibility to buy a WiFi router, of course. I tried to hack the system to connect ad-hoc networks but it didn't work.
I have found some interesting resources:
sluniverse.com/php/vb/blogs/psyke+phaeton/1042-making-android-phone-use-your.html
letsgoustc.spaces.live.com/blog/cns!89AD27DFB5E249BA!877.entry
I have a HTC Magic with the ADP-DRC83 hacked ROM with Usb tethering integrated. But usb0 interface in the mobile is configured to provide Internet connection (as gateway) to the PC, not the reverse functionality: connecting the mobile to Internet through the PC. So, all I need is to change the gateway in Android and then configure a NAT-DNS in my linux PC (easy with iptables and dnsmasq). But, I don't know how automatize the process exactly.
digitaljeff said:
but for certain places (CANADA) where data charges are WAY to expensive this could be handy for students at UNI where wireless is not an option.
Click to expand...
Click to collapse
Wind will be launching in vancouver soon.
$35 unlimited data.
Silly ragin' cajun.
Ok, now it works. Here it's my procedure for a HTC Magic (Sapphire) without any APN previously configured from Telecom provider and ROM CSDIv4.
In the mobile by using Better Terminal:
Code:
su
cd /sys/devices/virtual/net/usb0
echo 1 > enable
ifconfig usb0 192.168.2.2 mask 255.255.255.0
busybox route add default gw 192.168.2.1
setprop net.dns1 8.8.8.8
In the linux computer:
Code:
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i usb0 -j ACCEPT
sudo ifconfig usb0 192.168.2.1 netmask 255.255.255.0
Android Market downloads and location service don't work but I think is possible if you switch on the WiFi.
Update: Syncronization, Android Market downloads and location service don't work even the WiFi antenna is switched on. I have added the iptables commands also.
Well gosh, reverse wireless tethering is so much simpler
There are another similar thread: http://forum.xda-developers.com/showthread.php?t=522498

[Q] Motorola BackFlip doesn't connect to my Wi-Fi

Greetings. Sorry if my question maybe is a noob question, I don't know... I'm new of the forum...
I have a problem with my mobile phone. Recently I've bought a Motorola BackFlip, which mounts Android 1.5. I'm generally very satisfied with it, except for a very annoying thing: I can't connect to Internet via Wi-Fi.
My wireless network uses a computer connected to Internet by a USB modem; this PC, by a Wi-Fi adapter, is connected to a Wi-Fi Access Point. The other computers which use this connection use TCP/IP parameters such as:
IP Address: 192.168.0.2
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.0.1 (which is the PC connected by the USB modem)
DNS 1: 192.168.0.1
DNS 2: ---
These are the parameters that I use with one of my computers. I tried to insert them in the phone (using, as IP Address, 192.168.0.3, or 192.168.0.5, but with the same result), and although it appears "connected to Untitled (Untitled is the name of the AP)", I obtain a very strange result: I can go on Google, access the Android Market, do searches on Google and use any other Google service (such as Images), but when I try to go on any other site - even starting from a Google Search result -, such as Facebook or Wikipedia, or when I try to use applications such as eBuddy Messenger to access MSN, I can't. It passes some time and then it appears an error such as "unable to access the page".
How can I solve this very annoying problem? I must start by saying that I can't use the DHCP with my Access Point, because I can't set automatically 192.168.0.1 as default DNS and Gateway for any computer connected: my AP doesn't have this function.
Thanks in advance. And excuse me for my bad English, if it is so: I'm a 17-years-old Italian...
how to connect
How to conect internet via proxy local

Motorola Milestone Ad-hoc wifi for the needed

After trying several methods (tiwlan.ini, wpa_supplicant.conf, wpa_supplicant patch) to get my Motorola Milestone to connect to my Laptop's Adhoc wifi network with no success, i finally come up with a solution. Now I am sharing it here hoping it will help those with the same problem.
The idea is to use Barnacle (on Market) to first setup a connection with the laptop, then re-config it to make the sharing work in the reverse direction.
Steps are as followed:
1. Start Barnacle (you may check "Local Mode" in Settings to go ahead without a data connection in phone), then connect your laptop to the wireless network it creates (named milestones or so). After this step, your phone's IP will be something like :192.168.5.1, and your Laptop's IP will be something like: 192.168.5.100
2. Start sharing your data connection from Laptop, in doing that, your Laptop's IP will be forcibly set to 192.168.0.1 (yours may be different, just note that this IP will be used as default gateway we use in the next step)
3. Now the configuration part:
//Start adb shell by entering at Cmd prompt
adb shell
$
su
#
//mannualy set IP for your phone, can be anything in form of 192.168.0.xxx
# ifconfig tiwlan0 192.168.0.2 netmask 255.255.255.0
//manually set the default gateway of the phone to the Laptop's IP at this time
# route add default gw 192.168.0.1 dev tiwlan0
After these steps, the phone can access the internet via the Laptop's connection. We will complete the remaining by manually specifying a DNS for the phone
# setprop net.dns1 #.#.#.# (here you should replace the #.#.#.# to a known IP address of your ISP's DNS, in worst case you may use Google's DNS)
//Now test with ping to see if we receive any response:
# ping -c 4 192.168.0.1 => the Laptop should answer
# ping -c 4 191.168.0.2 => phone are pinging itself, the phone should answer
# ping -c 4 209.85.175.106 => some server in the Internet should answer
# ping -c 4 www dot google dot com => Google should answer
If the tests above are all OK, you are done, enjoy the internet from your phone !
have tried :
+ Mail OK
+ Browser OK
+ Internet radio OK
+ Market nearly OK (in here the app browsing is OK, but download seem stuck)
Please confirm your result,
Codelavie
not working. i follow your guide exactly, but it didn't work. how can you do that? where am i wrong?
Didn't work for me either. After quite a hard experience I've managed to compile a wpa_supplicant with adhoc support for Milestone 2.1-update1 after applying szym's patch, and so far it works fine. The only thing you need to do is substituting the original system/bin/wpa_supplicant for the patched one, and restart wifi. I cant post the link yet because I'm new in the forums, but I'll post it as soon as i can.

setting up Ethernet connection (progress report)

Hello, I'm attempting to setup up ethernet on my G920F using bobjgear usb 2.0 ethernet adapter.
Here is my progress:
1. Rooted with Xtrestolite 5.1.1, Vindicator kernel, busybox.
2. app to turn on eth0 is called "Ethernet Droid":
-assigned IP (within range) (192.168.1.67)
-assigned default gateway (192.168.1.254)
-assigned subnetmask (255.255.255.0)
-NOT assigned DNS
3. terminal emulator shows eth0 as UP with the IP assigned.
4. my ATT U-verse router shows a device connected with the assigned IP.
in terminal emulator when typing:
# netcfg eth0 dhcp
I get:
# action 'dhcp' failed (operation not permitted)
in terminal emulator when typing:
# ifconfig eth0
I get:
# eth0: ip 192.168.1.254 mask 255.255.255.0 flags [up broadcast running multicast]
in terminal emulator when typing:
# ping -c 4 192.168.1.254
I get:
# connect: Network is unreachable
-----------------------------------------
This is as far as I've been able to get, any further progress would be greatly appreciated, as I'm really trying to set up ethernet chromecast with a portable router for display out. A lot of people have complained of the lack of MHL and HDMI support which was really a shock to me when I found out...
I'm not a coder, nor an export on linux, so any help please keep the instructions simple and clear, thank you really truly.
sergeivich said:
# ping -c 4 192.168.1.254
I get:
# connect: Network is unreachable
Click to expand...
Click to collapse
I guess this is a Android 5.x bug or missing permission.
Please try the following:
1. su (in your terminal)
2. netcfg eth0 dhcp (this should work as superuser)
3. exit
4. ping your IP of your mobile phone ping -c4 192.168.1.XXX (this should work)
5. su
6. ping your gateway ip ping -c 4 192.168.1.YYY (this should work as superuser)
7. exit
8. ping your gateway ip ping -c 4 192.168.1.YYY (do you get now: android connect network is unreachable ?)
Until CM11 (Android 4.4.4) I could use my eth0 interface as normal user for everything. In oder to switch between wlan0 and eth0 you can use the ethernet-2.XX.apk. Some APPs absolutely want wlan0. For these APPs you could install one of the xposed framework modules HACK CONNECTIVITY SERVICE 1.4 or Fake Wifi Connection
BUT obviously since CM12 (Android 5.x) I have the same problem as you:
BUG/missing permissions? eth0 (USB->LAN) interface only usable as root user in terminal since CM12
When I try to ping my router ping 192.168.1.1 or any internet IP I get a android connect network is unreachable.
The only IP-adrress I can ping as normal user is my own IP-adress of the eth0 interface (for expample 192.168.1.XX).
After login as root with the su command in the terminal I can ping the router IP and every internet IP.
Even disabling the iptables filters/firewall did not help.
When I switch to the wlan0 interface I can ping everything with my normal user and the internet connection is available for every app.
My configuration:
S3 i9300, asix USB-LAN adapter, kernel: boeffla 4.0-alpha-11-CM12.1, cm-12.1-20150825-UNOFFICIAL-i9300.zip
Hello, any progress on the ethernet connectivity? Would any of the M or N roms support this?
Try this:
Hi
Have you tried this (for Lollipop):
Code:
ndc resolver setnetdns eth0 "" 8.8.8.8 8.8.4.4
I had the same problem as you and this solved the problem on Galaxy Note 4 with 5.1.1 (was able to ping 8.8.8.8 and 8.8.4.4 but not google.com. after typing this in the terminal, the ping worked !)
However, I am stuck at a step further: Even with this, it seems all apps do not recognize the internet connection through ethernet (no problem with WiFi).
I am pretty sure that it's not a matter of ConnectivityHackService or Fake Wifi (that I have installed by the way), since I have the problem for all the apps I was able to check (many).
Does anyone know how to solve this ?

How to access wifi hotspot on phone with active VPN connectio?

I have to access the Internet through my phone data connection, from both Windows 10 laptop and Android 6.0.1 tablet. Both devices can connect fine to the wifi hotspot and they can use the Internet. However, if I connect the VPN client (Private Internet Access), neither the Windows 10 laptop, nor the Android tablet can connect anymore. If they were already connected before activating VPN, Internet access stops on both devices. The OnePlus One phone is rooted.
I googled for a solution and I found something with using iptables. The following commands should be pasted in a terminal window under root:
iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t filter -I FORWARD -j ACCEPT
iptables -t nat -I POSTROUTING -j MASQUERADE
ip rule add from 192.168.43.0/24 lookup 61
ip route add default dev tun0 scope link table 61
ip route add 192.168.43.0/24 dev wlan0 scope link table 61
ip route add broadcast 255.255.255.255 dev wlan0 scope link table 61
After these commands, the Windows 10 laptop can access the Internet, even if the VPN connection is active. However, the traffic from the laptop doesn't go through the VPN connection on the phone. If I check the IP address at whatismyip.com from the laptop, I get the T-Mobile ip address. If I do the same thing from the phone, I get the PIA server ip address.
Unfortunately, this solution does not work for the Android tablet. If already connected to the wifi hotspot, before activating VPN on the phone, Internet access stops. If I try to connect the tablet after activating VPN, it gets stuck in "obtaining IP address".
It seems that somehow, the Windows DHCP client knows how to access the DHCP server running on the phone (at 192.168.143.1). However, the request from the Android tablet is probably sent to the Internet, and does not reach the DHCP server (or the DNS server.) I suspect the local network (192.168.143.0/24) should be somehow excluded in iptables, but I don't know how to do that. Also, I'm not sure if I exclude it, the connection from Windows laptop will be affected.
So my main question is:
Is there a solution to access the wifi hotspot on the phone while VPN is active, from BOTH Windows and Android devices?
My second question is:
Is there a solution to direct the network traffic coming from the devices connected to the wifi hotspot, THROUGH the VPN connection running on the phone?
XDA:DevDB Information
Tethering with active VPN connection, Kernel for the OnePlus One
Contributors
alanPr
Kernel Special Features:
Version Information
Status: Testing
Created 2018-07-09
Last Updated 2018-07-09

Categories

Resources