Genymobile / gnirehtet

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

Raspbian Jessie 8 with Acer B3-A330 #34

Closed nikolakoco89 closed 6 years ago

nikolakoco89 commented 7 years ago

Hello, Previously I had opened an issue about connecting Nexus 5X, which was resolved. Now I have another problem, but this time with an Acer tablet B3-A330 with Android 6.0. On Windows 7 it worked perfectly, but I'm trying to use it on Raspberry Pi with Raspbian Jessie 8, and I can't connect it. Attached you can find logcat output logcat.txt

nikolakoco89 commented 7 years ago

I have the same problem with the Nexus 5x, Android 7.1.2 and the Raspberry Pi with Raspbian Jessie 8

rom1v commented 7 years ago

In the logs, I see:

GnirehtetControlService: Received request com.genymobile.gnirehtet.STOP

But never the STARTrequest.

Anyway, this is the relay server that runs on the Raspberry (logcat is what happen on the Android side). What do the server logs say?

nikolakoco89 commented 7 years ago

I only get: "Main: Starting server...", but I guess that this is only logging level info.

rom1v commented 7 years ago

In another terminal, execute:

adb reverse tcp:31416 tcp:31416
adb shell am startservice -a com.genymobile.gnirehtet.START

What does it say?

Is the START visible in adb logcat?

What is the result of:

adb version
adb reverse --list

?

nikolakoco89 commented 7 years ago

Attached you can find the outputs of the terminal and logcat logcat.txt terminal_output.txt

rom1v commented 7 years ago

OK, the cause is that your adb (1.0.31) does not support adb reverse. You need a more recent version of adb. I know that 1.0.36 supports it.

nikolakoco89 commented 7 years ago

Ok, I will try to get it to the raspbian, I use android-tools-adb right now and the latest version is 1.0.31. Thanks a lot

numanair commented 6 years ago

@nikolakoco89 Were you able to get this working?

rom1v commented 6 years ago

Note that v1.1 should work even on older versions of adb, since it now fallbacks to adb forward when adb reverse does not work.

numanair commented 6 years ago

I've got it to a point where it says: E Gnirehtet: Cannot start client com.genymobile.gnirehtet.relay.CommandExecutionException: Command [adb, reverse, localabstract:gnirehtet, tcp:31416] returned with value 1

Is this where it should be falling back? I am also on adb 1.0.31

rom1v commented 6 years ago

Note that v1.1 should work even on older versions of adb, since it now fallbacks to adb forward when adb reverse does not work.

Sorry, I thought I answered to an issue on scrcpy. This is not true on gnirehtet.

nikolakoco89 commented 6 years ago

@numanair Yes, I got it working, and it worked great for my needs :)

numanair commented 6 years ago

I just got it working using ADB 1.0.37 found here: https://github.com/bonnyfone/adb-arm/issues/5 I'm surprised to see speed tests report it's slower than my wifi, but I don't mind too much as I mainly wanted to reduce congestion.

rom1v commented 6 years ago

@numanair Do you use the Rust or Java version?

numanair commented 6 years ago

I'm using the Rust version.