Genymobile / gnirehtet

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

Connection Request confirmation does not appear #135

Closed realn3wb13 closed 5 years ago

realn3wb13 commented 5 years ago

image

But the connection request confirmation did not appear. I tried to re-install, reboot both phone and PC. I also tried both java and rust but the same result.

image

rom1v commented 5 years ago

I already had this problem, on some devices (but make it work after uninstall/reinstall gnirehtet). I don't know the cause.

Are there relevant logs in adb logcat?

realn3wb13 commented 5 years ago

Sorry I don't know who to view logcat

rom1v commented 5 years ago

Sorry I don't know who to view logcat

Just execute adb logcat from a terminal (the directory containing adb must be in PATH).

On one of my devices, if the dialog opens when the phone is locked, when I unlock the app showing the dialog crashes with this stack trace:

E VpnConfirm: onResume
E VpnConfirm: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
E VpnConfirm:   at com.android.internal.policy.PhoneWindow.requestFeature(PhoneWindow.java:317)
E VpnConfirm:   at com.android.internal.app.AlertController.installContent(AlertController.java:231)
E VpnConfirm:   at com.android.internal.app.AlertActivity.setupAlert(AlertActivity.java:90)
E VpnConfirm:   at com.android.vpndialogs.ConfirmDialog.onResume(ConfirmDialog.java:72)
E VpnConfirm:   at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1258)
E VpnConfirm:   at android.app.Activity.performResume(Activity.java:6327)
E VpnConfirm:   at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3092)
E VpnConfirm:   at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134)
E VpnConfirm:   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1388)
E VpnConfirm:   at android.os.Handler.dispatchMessage(Handler.java:102)
E VpnConfirm:   at android.os.Looper.loop(Looper.java:148)
E VpnConfirm:   at android.app.ActivityThread.main(ActivityThread.java:5417)
E VpnConfirm:   at java.lang.reflect.Method.invoke(Native Method)
E VpnConfirm:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
E VpnConfirm:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
realn3wb13 commented 5 years ago

I hope this is the right one.

image

rom1v commented 5 years ago

@realn3wb13 It seems there is a crash, indeed, but the backtrace is above your screenshot :)

Save the result in a file and paste the relevant parts:

adb logcat -d > file.txt
realn3wb13 commented 5 years ago

Thanks. I hope this has all the info.

file.txt

rom1v commented 5 years ago

Thanks.

So, no, it's not related to any crash. It's only:

W BroadcastQueue: Reject to launch app com.genymobile.gnirehtet/10138 for broadcast: App Op 63

Don't know how to avoid it. It seems related to an app in "forced stop" state, but since gnirehtet has no activity, an user may never start it manually to change its state.

realn3wb13 commented 5 years ago

@rom1v Thanks bro I found a solution in stackoverflow turns out it's an embedded app in my phone.