Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.13k stars 565 forks source link

Can't run it on S9+ (it worked well on S7Edge) #131

Closed ghost closed 6 years ago

ghost commented 6 years ago

2018-07-22 14:59:07.139 INFO Main: Starting relay server... 2018-07-22 14:59:07.140 INFO Main: Checking gnirehtet client... 2018-07-22 14:59:07.142 INFO Relay: Relay server started 2018-07-22 14:59:07.261 INFO Main: Starting client... Broadcasting: Intent { act=com.genymobile.gnirehtet.START flg=0x400000 cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver } Broadcast completed: result=0 2018-07-22 14:59:09.720 INFO TunnelServer: Client #0 connected thread 'main' panicked at 'Not an Ipv4 packet, version=6', src/relay/ipv4_packet_buffer.rs:38:13 note: Run with RUST_BACKTRACE=1 for a backtrace. Appuyez sur une touche pour continuer...

rom1v commented 6 years ago

Thank you for your report.

This is a duplicate of https://github.com/Genymobile/gnirehtet/issues/69. This is fixed on master.

ghost commented 6 years ago

Thank you, how do I use it please?

rom1v commented 6 years ago

You need to build it manually.

ghost commented 6 years ago

Could you please help me build it? I'm a beginner..

ghost commented 6 years ago

I installed Gradle and everything, but now my only issue is this:

Execution failed for task ':relay-java:checkstyleMain'.

After this it'll work

rom1v commented 6 years ago

Check the logfile given in the error message.

ghost commented 6 years ago

Could you please build it for me? I'm like so unexperienced...

bafxyz commented 6 years ago

Same here, have problems with building FAILURE: Build failed with an exception.

Could you please update build in repo description

rom1v commented 6 years ago

See https://github.com/Genymobile/scrcpy/issues/3.

bafxyz commented 6 years ago

Now i have another error FAILURE: Build failed with an exception.

BUILD FAILED in 0s

The thing is what i have in path ANDROID_HOME, ANDROID_SDK and in local.properties sdk.dir=/Users/andrei.bunulu/Library/Android/sdk

bafxyz commented 6 years ago

Ok i solved my issues by accepting android licences, downgrading java to version 8. After that grudle build ran successfully. After i did this java -jar gnirehtet.jar run and i see this:

2018-07-23 00:15:44.895 I Gnirehtet: Checking gnirehtet client...
2018-07-23 00:15:44.895 I Gnirehtet: Starting relay server...
2018-07-23 00:15:44.926 I Relay: Relay server started
2018-07-23 00:15:45.015 I Gnirehtet: Starting client...
Broadcasting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver }
Broadcast completed: result=0
2018-07-23 00:15:45.167 I TunnelServer: Client #0 connected

And looks like everything should work, but i don't have internet on my android. Lock icon appeared and "Reverse tethering enabled" as well in notifications

What can be wrong?

rom1v commented 6 years ago

You might get some clues in the output of adb logcat.

Also, did you reinstall the app you built manually (gnirehtet reinstall)?

bafxyz commented 6 years ago

Nope i didn't reinstall it on my Oneplus6 device, the thing is what the apk from official zip for mac just worked on my OnePlus3 device with new gnirehtet.jar file. Probably reinstall will fix the issue on my Oneplus6 as well, can you explain how can i generate new apk? Thank you

bafxyz commented 6 years ago

And another problem: So i have macbook with VPN which shares internet to my android phone with gnirehtet, whatismyip and speedtest are good here. Now i want to share this internet further from android device, so i'm creating portable Wifi hotspot on android, with another device connect to my android and i don't have internet on another device. In terminal i see this:

2018-07-23 00:56:42.498 W Router: Dropping invalid packet
2018-07-23 00:56:46.769 W Router: Dropping invalid packet
2018-07-23 00:56:47.798 W Router: Dropping invalid packet
2018-07-23 00:56:51.017 W Router: Dropping invalid packet
2018-07-23 00:56:53.084 W Router: Dropping invalid packet
2018-07-23 00:56:54.109 W Router: Dropping invalid packet
2018-07-23 00:57:00.266 W Router: Dropping invalid packet
2018-07-23 00:57:01.278 W Router: Dropping invalid packet
rom1v commented 6 years ago

Now i want to share this internet further from android device, so i'm creating portable Wifi hotspot on android, with another device connect to my android and i don't have internet on another device.

Sorry, it's not expected to work. Gnirehtet only forwards TCP and UDP. https://github.com/Genymobile/gnirehtet/issues/126

bafxyz commented 6 years ago

Ok, i did it today. Wors perfectly. The only issue is what root is required to share internet from android. And i installed "vpn hotspot tethering app" from Google play with green logo.

ghost commented 6 years ago

Anyone knows how to fix the checkstyleMain issue?