Android and Linux Tethering
-
Download
install.sh
-
Give permission for downloaded file using
chmod +x install.sh
-
Plug the Android Alcatel tab using USB Cable and make sure linux is connected to the internet.
-
Run
sudo ./install.sh -i
-
The script will request the vendorId and productId of the Android USB connection. You can find it in the script log or by entering the lsusb command in a different terminal tab.
-
After entering the vendorId and productId, the script will begin installation.
-
The script will install all necessary files and permissions itself.
-
After completion of the installation, reboot Linux.
-
Creates a virtual interface in a Linux system named
eth-v
and sets192.168.42.100
as static ipv4, it will also act as master IP. -
The tethering service will run every 5 seconds and check if there is any ADB device connected to Linux.
-
If any ADB device is found, the service will update the Android device in RNDIS mode. If it is already in RNDIS mode, no action is taken.
-
If RNDIS mode is set then it will create
android_rndis
network interface in linux system. -
Android Alcatel Tab defaults to creating
192.168.42.129
as a RNDIS gateway. Since it is an unrooted device, we cannot modify it, and that's why we are using the 42 series in the master IP. -
If the Android tablet is disconnected and connected again, the service runs the same as before.
-
Android uses
192.168.42.100
as master IP.
- This method doesn't allow internet sharing from a PC to a tablet.
- Remove any
.rules
files having same productId and vendorId of the Android USB connection.