Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I use gnirehtet-autorun to connect normally, calling the adb command will cause the connection to be lost. Is there any way to ensure the connection? #423

Closed
lswanys opened this issue Dec 25, 2021 · 10 comments

Comments

@lswanys
Copy link

lswanys commented Dec 25, 2021

When I use gnirehtet-autorun to connect normally, calling the adb command will cause the connection to be lost. Is there any way to ensure the connection?

@rom1v
Copy link
Collaborator

rom1v commented Dec 25, 2021

Probably because your adb and the one used by gnirehtet have a different version. What's the error message in the console?

@lswanys
Copy link
Author

lswanys commented Dec 25, 2021

image
This is the error message it reported. I have another question I would like to ask: it does not work when I use an "oppo" or "Xiaomi" brand mobile phone to connect to it.

@rom1v
Copy link
Collaborator

rom1v commented Dec 25, 2021

It seems you are using a very old adb (32) for gnirehtet. Check your PATH.

(please do not post screenshot of text, just the text itself)

@rom1v
Copy link
Collaborator

rom1v commented Dec 25, 2021

t does not work when I use an "oppo" or "Xiaomi" brand mobile phone to connect to it.

Define "does not work".

@lswanys
Copy link
Author

lswanys commented Dec 25, 2021

I connect my phone to the computer and run "gnirehtet-autorun", it will not automatically create a VPN connection (This problem will only appear on Xiaomi and OPPO)

@rom1v
Copy link
Collaborator

rom1v commented Dec 25, 2021

Ok, but what is the error message (in the console or in adb logcat)?

@lswanys
Copy link
Author

lswanys commented Dec 25, 2021

This is what I did and the information it returned to me :PS C:\Users\admin\Desktop\gnirehtet-rust-win64-v2.5_> .\gnirehtet-autorun
2021-12-26 01:42:21.557 INFO Main: Starting relay server on port 31416...
2021-12-26 01:42:21.559 INFO Relay: Relay server started
2021-12-26 01:42:21.559 INFO Main: Checking gnirehtet client...
2021-12-26 01:42:21.738 INFO Main: Starting client...
Starting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetActivity }
Security exception: Permission Denial: starting Intent { act=com.genymobile.gnirehtet.START flg=0x10000000 cmp=com.genymobile.gnirehtet/.GnirehtetActivity } from null (pid=12866, uid=2000) requires android.permission.WRITE_SECURE_SETTINGS

java.lang.SecurityException: Permission Denial: starting Intent { act=com.genymobile.gnirehtet.START flg=0x10000000 cmp=com.genymobile.gnirehtet/.GnirehtetActivity } from null (pid=12866, uid=2000) requires android.permission.WRITE_SECURE_SETTINGS
at com.android.server.wm.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:1065)
at com.android.server.wm.ActivityStarter.startActivity(ActivityStarter.java:792)
at com.android.server.wm.ActivityStarter.startActivity(ActivityStarter.java:591)
at com.android.server.wm.ActivityStarter.startActivityMayWait(ActivityStarter.java:1435)
at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:522)
at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1122)
at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1093)
at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:3650)
at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:543)
at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:174)
at android.os.ShellCommand.exec(ShellCommand.java:111)
at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:10197)
at android.os.Binder.shellCommand(Binder.java:881)
at android.os.Binder.onTransact(Binder.java:765)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:4699)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2849)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)
2021-12-26 01:42:21.968 ERROR Main: Cannot start client: Command adb ["-s", "NNUS6HU8R4PNS4TC", "shell", "am", "start", "-a", "com.genymobile.gnirehtet.START", "-n", "com.genymobile.gnirehtet/.GnirehtetActivity"] returned with value 255

@rom1v
Copy link
Collaborator

rom1v commented Dec 25, 2021

See #5

@rom1v
Copy link
Collaborator

rom1v commented Dec 25, 2021

And #302 (comment)

@lswanys
Copy link
Author

lswanys commented Dec 25, 2021

okay, thank you

@lswanys lswanys closed this as completed Dec 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants