Using a USB cable to give a computer internet access is often called reverse tethering. It is especially handy when the PC has no Wi‑Fi adapter, the Wi‑Fi network is unreliable, or you simply prefer the stability of a wired connection. The method described here works on Android 5.0 (Lollipop) and newer, requires no root access, and relies on the open‑source gnirehtet utility.
If you have never used ADB before, the official Platform‑Tools download page provides a zip file for all major OSes. Extract the zip to a convenient folder – you will reference this folder in the steps that follow.
Enable Developer options if you haven’t already:
Settings → About phone.Build number seven times. You’ll see a toast saying “You are now a developer!”.Turn on USB debugging:
Settings → System → Developer options (or directly Developer options on some OEM skins).USB debugging and toggle it on. Confirm any security prompt.Set the default USB mode to File Transfer / MTP (or “Charging” if the dialog appears, you can change it later). This ensures the PC can see the device for ADB communication.
gnirehtet (pronounced “reverse‑tether”) is a lightweight Java‑based tool that creates a virtual Ethernet interface on the PC and forwards traffic through the Android device via ADB. Follow the steps for your operating system.
gnirehtet‑windows‑vX.Y.Z.zip for Windowsgnirehtet‑mac‑vX.Y.Z.tar.gz for macOSgnirehtet‑linux‑vX.Y.Z.tar.gz for LinuxC:\gnirehtet on Windows or ~/gnirehtet on macOS/Linux.gnirehtet’s server component runs on Java. Most modern systems already have a JRE, but you can verify by opening a terminal (or Command Prompt) and typing:
java -version
If you see a version line (e.g., openjdk version "11.0.12"), you are good. If not, install the latest OpenJDK from your OS’s package manager or from AdoptOpenJDK.
The client is a tiny APK that runs in the background and forwards traffic. It does not require root because it uses the adb forward mechanism.
cd C:\gnirehtet # Windows example
adb install -r gnirehtet.apk
The -r flag tells ADB to replace any existing version, which is useful if you repeat the tutorial.
Success, the client is ready. If you see an error like device unauthorized, check the phone’s screen for a dialog asking to trust the computer and tap Allow.PATH lets you run gnirehtet from any directory.Now the actual network sharing begins. The gnirehtet server creates a virtual Ethernet adapter on the PC (named gnirehtet0 on Linux/macOS or a network interface on Windows) and forwards all traffic to the Android device.
gnirehtet run
On Windows, you may need to use gnirehtet.exe run. The command will output something like:
Waiting for device...
Device connected: XYZ123
Starting VPN on device...
VPN started, forwarding traffic.
ipconfig /all # Windows
ifconfig -a # macOS/Linux
Look for an interface named gnirehtet0 (Linux/macOS) or a network adapter with a description containing “gnirehtet”. It will typically have an IP like 192.168.42.2.
If you see a “No internet” message, proceed to the troubleshooting section.
Some users prefer a point‑and‑click experience. The same GitHub project ships a small GUI wrapper for Windows and macOS called gnirehtet-gui. The steps are identical, except you launch gnirehtet-gui.exe and press the Start button. The GUI shows connection status and lets you stop the tunnel with a single click.
Reverse tethering can fail for a handful of common reasons. Below is a decision tree you can follow.
adb devices. If the device is listed as unauthorized, re‑authorize the PC on the phone.gnirehtet0 interface.Developer options → Stay awake (Screen will never sleep while charging).gnirehtet from battery optimisation (Settings → Apps → gnirehtet → Battery → “Not optimized”).Once the basic tunnel works, you can fine‑tune the experience.
192.168.42.10) to the gnirehtet interface via the OS network settings. This helps scripts that expect a stable IP.127.0.0.1:8080 and run a local proxy (e.g., tinyproxy) on the Android device via Termux. This is an advanced scenario and outside the scope of this tutorial.gnirehtet0 interface.Reverse tethering routes all PC traffic through your phone’s network connection. Keep the following in mind:
By following the steps above you have turned an ordinary Android phone into a functional USB Ethernet adapter for your PC, all without rooting or installing any paid software. The solution is lightweight, reversible, and works across Windows, macOS, and Linux. Should you need to stop sharing, simply close the terminal window running gnirehtet run or press the Stop button in the GUI. Remember to disable USB debugging if you don’t need it afterwards, and keep an eye on your mobile data consumption.
This workflow is ideal for developers who need a quick internet connection on a headless laptop, travelers with limited Wi‑Fi options, or anyone who prefers a wired‑like experience without buying extra hardware.









