Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.36k stars 583 forks source link

Doesn't prompt for VPN connection #545

Open ibahnasy opened 2 months ago

ibahnasy commented 2 months ago

I installed the tool on Linux PC and enabled USB debugging and also installed the provided .apk. After running the tool on the PC, it doesn't prompt for VPN connection on the phone at all.

./gnirehtet run
2024-08-01 09:56:06.332 INFO Main: Starting relay server on port 31416...
2024-08-01 09:56:06.332 INFO Main: Checking gnirehtet client...
2024-08-01 09:56:06.332 INFO Relay: Relay server started
2024-08-01 09:56:06.375 INFO Main: Starting client...
Starting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetActivity }
NA0341 commented 2 months ago

Use gnirehtet autorun It'll automatically connect to all devices which have USB Debugging enabled & Gnirehtet APK installed.

I made myself a .desktop file for gnirehtet with all the functions I need as Desktop Actions. As well as a .desktop file in autostart to autorun gnirehtet in multi-client mode (autorun).


File: ~/.local/share/applications/gnirehtet.desktop

[Desktop Entry]
Type=Application
Name=Android Reverse Tethering (gnirehtet)
Comment=Share this Computers Internet Connection with all connected Android Devices via ADB.
Exec=/usr/local/bin/gnirehtet autorun
Icon=network-vpn
Categories=Network;Utility;
Terminal=false
Actions=SetupNewDevice;SetupDeviceADB;Quit;

[Desktop Action SetupNewDevice]
Name=Setup new device (install APK)
Exec=/usr/local/bin/gnirehtet install
Terminal=true
Icon=add

[Desktop Action SetupDeviceADB]
Name=Setup new device using ADB
Exec=adb install -r /usr/local/bin/gnirehtet.apk
Terminal=true
Icon=add

[Desktop Action Quit]
Name=Quit: Kill Gnirehtet Server
Exec=killall gnirehtet
Terminal=true
Icon=exit

File: ~/.config/autostart/gnirehtet.desktop

[Desktop Entry]
Type=Application
Name=Android Reverse Tethering (gnirehtet)
Exec=/usr/local/bin/gnirehtet autorun
Icon=network-vpn
Terminal=false
StartupNotify=false
X-GNOME-Autostart-enabled=true