Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.1k stars 564 forks source link

MI redmi note3: unable to connect to internet #81

Open sant527 opened 6 years ago

sant527 commented 6 years ago

I am having a laptop with archlinux. I am trying to share my laptop internet on the MI redmi note3. I successfully installed gnirehtet.apk on my MI phone. I also enabled the developer mode and USB debugging.

And then i start the script on my laptop: $ ./gnirehtet run 2018-01-31 16:28:12.662 INFO Main: Checking gnirehtet client... 2018-01-31 16:28:12.738 INFO Main: Starting relay server... 2018-01-31 16:28:12.738 INFO Relay: Relay server started 2018-01-31 16:28:12.738 INFO Main: Starting client... Broadcasting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver } Broadcast completed: result=0

After this nothing happens.

Where as I was able to share my internet on Micromax android phone using the above method.

rom1v commented 6 years ago

Probably https://github.com/Genymobile/gnirehtet/issues/5#issuecomment-297045539. Could you confirm, please?

Also see https://github.com/Genymobile/gnirehtet/issues/65.

sant527 commented 6 years ago

I remove the android:permission="android.permission.WRITE_SECURE_SETTINGS" line from AndroidManifest.xml file. And now everything works on XIAOMI

I have removed the line and trying to rebuild. I get

Error:Execution failed for task ':relay-rust:clean'.

A problem occurred starting process 'command 'cargo''

So i have removesd the relay-rust folder and then i build the apk.

I have installed the apk. But still i get only the following:

$ ./gnirehtet run                     
2018-01-31 17:50:27.346 INFO Main: Checking gnirehtet client...
2018-01-31 17:50:27.391 INFO Main: Starting relay server...
2018-01-31 17:50:27.391 INFO Relay: Relay server started
2018-01-31 17:50:27.392 INFO Main: Starting client...
Broadcasting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver }
Broadcast completed: result=0
rom1v commented 6 years ago

Do you see any relevant logs in adb logcat?

ranaparamveer commented 6 years ago

I have removed the line and trying to rebuild. I get Error:Execution failed for task ':relay-rust:clean'.

Just generate apk, don't try to rebuild or run the default app cofiguration.

Then follow the steps as:

  1. Start the relay server and keep it open:

./gnirehtet relay

  1. From some other terminal install apk

  2. Fire a broadcast to start service from terminal: adb shell am broadcast -a com.genymobile.gnirehtet.START \ -n com.genymobile.gnirehtet/.GnirehtetControlReceiver

Qatel commented 5 years ago

i am tryng to reverse tether my Galaxy S5 running lineage OS and the scripts stops here

2018-07-16 10:04:33.754 INFO Main: Checking gnirehtet client... 2018-07-16 10:04:33.879 INFO Main: Starting relay server... 2018-07-16 10:04:33.879 INFO Main: Starting client... 2018-07-16 10:04:33.895 INFO Relay: Relay server started Broadcasting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver } Broadcast completed: result=0 2018-07-16 10:04:34.941 INFO TunnelServer: Client #0 connected