Reverse Tethering with MI-2S


Jul 26, 2013
291
43
52
#1
I want to use my computer's internet connection to download things. I've followed a guide here, but stuck because when I enable USB tethering, then adb will disconnect so I can't tell the phone to query for ip address.
Is there any working method for MI-2S? My computer is Linux (Kubuntu 13.04) by the way.
 
Jul 19, 2013
19
3
13
#2
Hi, I was able to set up the reverse tethering by using WiFi hotspot on the phone, connecting my notebook at the hotspot and sharing the connection on eth0 by activating IP forward and masquerading in iptables (I use Debian) and then setting un the correct default gw on the phone by using the "ip" command in the terminal emulator (maybe you'll have to set up the DNS too); it requires root though.
 
Jul 26, 2013
291
43
52
#3
Would you mind sharing the commands for terminal both on host (linux) and the phone? I use the development version of the ROM available from this website, so it's rooted (well, at least I can give root permissions to many apps).
 
Jul 19, 2013
19
3
13
#4
commands on the host :
Code:
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
on the phone i'm not 100% sure but it should be this:
Code:
ip route add default via <host_address>
you must execute every command (host & phone) as root.

I found an app that should help you with the address configuration: ipconfig, i've never tried it though.
If you need to set the DNS on the phone you can use setDNS.
 
Jul 26, 2013
291
43
52
#5
*doh* just remembered that my PC doesn't have any wi-fi component so I can't use this method, I need to use reverse USB tethering,
 
Jul 19, 2013
19
3
13
#6
I'm sorry i've never used USB tethering but it should work pretty much the same changing only the interfaces.
 
Oct 13, 2012
282
23
40
#7
Why not just transfer the files to the phone via file transfer after they are downloaded by the computer.

Or buy a wireless router. Iirc the mi2s supports WiFi a.c.

Sent from my Xiaomi MI2S
 
Jul 26, 2013
291
43
52
#8
I'm sorry i've never used USB tethering but it should work pretty much the same changing only the interfaces.
The OLD method here seems to work, thanks anyway
Why not just transfer the files to the phone via file transfer after they are downloaded by the computer.
Because I want to download apps from play store (I know there are ways to get apk downloaded, but I guess it's better to install it directly to my phone)