This App Lets You Share Your Ubuntu’s WiFi With Android
“Gnirehtet” is an open-source app from the popular makers of ScrCpy – Genymobile. The app functions over ADB and hence you would require to connect your Android to the laptop via a USB cable. The app makes use of reverse tethering which is an “adb reverse” command that was introduced way back in Android 5.0. So in simple words, it sends your Android web requests to the webserver via your laptop. Hence, the webserver believes that the request is made by the laptop itself. This way, it is using the laptop as a proxy. For the Gnirehtet app to work, you would need to install ADB on Ubuntu. Use the following command to do that.
Once you have ADB installed, download the Gnirehtet zip file for Linux. Note that, there are 2 variants: Linux and Rust. Use the Rust one as it doesn’t require setting up a Java runtime environment.
After you have downloaded the zip file, extract it. You would see 2 files within it – a compiled Rust file and an APK file. The APK file has to be installed on the Android device. Now, you can either send the APK file to your Android device and install it or use the Gnirehtet command to automatically do it. But before you run the command, connect your Android to the laptop and enable USB Debugging through the developer options on your Android phone. Next, navigate to the extracted Gnirehtet folder to run the following command.
After the successful installation of the client app, run the following command on your computer to start sharing the Wi-Fi connection.
You would also receive a prompt on the Android to accept the VPN creation by Gnirehtet. This is because Gnirehtet transfers the data from your Android device to the laptop via a VPN channel.
This method works with multiple Android devices. Although I haven’t tried the limit, it seemed to be working fine for 2 Android devices simultaneously. However, when you have multiple devices connected to your laptop, you need to append the adb device number along with the run command. To find the device number, use the following adb command.
Next, use the serial number to start the Internet on a specific Android device.
Now, adb can also function over Wi-Fi but that still requires connecting your device with a USB cable for the initial setup. Hence, I am ignoring that particular part. For more issues or queries, let me know in the comments below. Also Read: How to Quickly Create Keyboard Shortcuts in Ubuntu