Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.23k stars 571 forks source link

App crashes on Oculus Quest #219

Open zoller27osu opened 5 years ago

zoller27osu commented 5 years ago
08-15 23:40:28.482  1023  1461 E VpnJni  : Cannot allocate TUN: Bad file descriptor
--------- beginning of crash
08-15 23:40:28.486  3394  3394 E AndroidRuntime: FATAL EXCEPTION: main
08-15 23:40:28.486  3394  3394 E AndroidRuntime: Process: com.genymobile.gnirehtet, PID: 3394
08-15 23:40:28.486  3394  3394 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.genymobile.gnirehtet.GnirehtetService@96e36e5 with Intent { act=com.genymobile.gnirehtet.START_VPN cmp=com.genymobile.gnirehtet/.GnirehtetService (has extras) }: java.lang.IllegalStateException: Cannot create interface
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3367)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at android.app.ActivityThread.-wrap21(ActivityThread.java)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1582)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:154)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6144)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
08-15 23:40:28.486  3394  3394 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Cannot create interface
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:1700)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:1645)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at android.net.IConnectivityManager$Stub$Proxy.establishVpn(IConnectivityManager.java:1981)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at android.net.VpnService$Builder.establish(VpnService.java:769)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at com.genymobile.gnirehtet.GnirehtetService.setupVpn(GnirehtetService.java:143)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at com.genymobile.gnirehtet.GnirehtetService.startVpn(GnirehtetService.java:107)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at com.genymobile.gnirehtet.GnirehtetService.onStartCommand(GnirehtetService.java:93)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3350)
08-15 23:40:28.486  3394  3394 E AndroidRuntime:    ... 8 more

And there is no "tun" in "adb shell ls /dev"

PLTGit commented 5 years ago

Part of this appears to be a user privilege issue - manual execution of related commands under the ADB shell also encounter issues. Here's a similar but somewhat more complete log from a crash event:

08-21 13:51:28.914  1092  1117 I ActivityManager: START u0 {cmp=com.android.vpndialogs/.ConfirmDialog} from uid 10076 on display 0
08-21 13:51:29.005  1092  1519 I ActivityManager: Start proc 4117:com.android.vpndialogs/u0a18 for activity com.android.vpndialogs/.ConfirmDialog
08-21 13:51:29.372  1092  1286 W AppOps  : Bad call: specified package com.genymobile.gnirehtet under uid 10018 but it is really 10076
08-21 13:51:29.372  1092  1286 W AppOps  : java.lang.RuntimeException: here
08-21 13:51:29.372  1092  1286 W AppOps  :  at com.android.server.AppOpsService.getOpsRawLocked(AppOpsService.java:1302)
08-21 13:51:29.372  1092  1286 W AppOps  :  at com.android.server.AppOpsService.noteOperationUnchecked(AppOpsService.java:1043)
08-21 13:51:29.372  1092  1286 W AppOps  :  at com.android.server.AppOpsService.noteOperation(AppOpsService.java:1036)
08-21 13:51:29.372  1092  1286 W AppOps  :  at android.app.AppOpsManager.noteOpNoThrow(AppOpsManager.java:1800)
08-21 13:51:29.372  1092  1286 W AppOps  :  at com.android.server.connectivity.Vpn.isVpnUserPreConsented(Vpn.java:560)
08-21 13:51:29.372  1092  1286 W AppOps  :  at com.android.server.connectivity.Vpn.prepare(Vpn.java:440)
08-21 13:51:29.372  1092  1286 W AppOps  :  at com.android.server.ConnectivityService.prepareVpn(ConnectivityService.java:3500)
08-21 13:51:29.372  1092  1286 W AppOps  :  at android.net.IConnectivityManager$Stub.onTransact(IConnectivityManager.java:544)
08-21 13:51:29.372  1092  1286 W AppOps  :  at android.os.Binder.execTransact(Binder.java:565)
08-21 13:51:29.512  4117  4117 E SchedPolicy: add_tid_to_cgroup failed; fd=-1
08-21 13:51:29.513  4117  4136 E SchedPolicy: add_tid_to_cgroup failed; fd=-1
08-21 13:51:32.107  1092  1212 E TaskPersister: File error accessing recents directory (directory doesn't exist?).
08-21 13:51:36.090  4117  4117 E SchedPolicy: add_tid_to_cgroup failed; fd=-1
08-21 13:51:36.344  1092  1331 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@5581365 attribute=android.view.inputmethod.EditorInfo@187383a, token = android.os.BinderProxy@cdfa7d3
--------- beginning of crash
08-21 13:51:36.399  4102  4102 E AndroidRuntime: FATAL EXCEPTION: main
08-21 13:51:36.399  4102  4102 E AndroidRuntime: Process: com.genymobile.gnirehtet, PID: 4102
08-21 13:51:36.399  4102  4102 E AndroidRuntime: java.lang.RuntimeException: Unable to start service com.genymobile.gnirehtet.GnirehtetService@3dd9ac9 with Intent { act=com.genymobile.gnirehtet.START_VPN cmp=com.genymobile.gnirehtet/.GnirehtetService (has extras) }: java.lang.IllegalStateException: Cannot create interface
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3367)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at android.app.ActivityThread.-wrap21(ActivityThread.java)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1582)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:154)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6144)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
08-21 13:51:36.399  4102  4102 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Cannot create interface
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:1700)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:1645)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at android.net.IConnectivityManager$Stub$Proxy.establishVpn(IConnectivityManager.java:1981)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at android.net.VpnService$Builder.establish(VpnService.java:769)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at com.genymobile.gnirehtet.GnirehtetService.setupVpn(GnirehtetService.java:139)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at com.genymobile.gnirehtet.GnirehtetService.startVpn(GnirehtetService.java:103)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at com.genymobile.gnirehtet.GnirehtetService.onStartCommand(GnirehtetService.java:89)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3350)
08-21 13:51:36.399  4102  4102 E AndroidRuntime:    ... 8 more
08-21 13:51:36.621  1092  1141 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1421 android.content.ContextWrapper.bindService:636 android.content.ContextWrapper.bindService:636 com.oculus.vrapi.LoggingService.bind:102 oculus.internal.ui.VrBase.nativeOnCreate:-2 
08-21 13:51:36.677  1092  1141 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1357 android.content.ContextWrapper.startService:613 android.content.ContextWrapper.startService:613 com.oculus.vrapi.VrRuntimeClient.initialize:123 oculus.internal.ui.VrBase.nativeOnCreate:-2 
08-21 13:51:36.678  1092  1141 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1357 android.content.ContextWrapper.startService:613 android.content.ContextWrapper.startService:613 com.oculus.vrapi.VrRuntimeClient.EnsureRuntimeService:285 com.oculus.vrapi.VrRuntimeClient.connectToService:385 
08-21 13:51:36.774  1092  1141 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.oculus.os.clearactivity cmp=com.oculus.os.clearactivity/.ClearActivity (has extras)} from uid 1000 on display 0
08-21 13:51:36.839  1092  1140 W ActivityManager: Activity pause timeout for ActivityRecord{d8a9ed0 u0 com.genymobile.gnirehtet/.AuthorizationActivity t155 f}
08-21 13:51:36.905  1092  1140 I ActivityManager: Start proc 4168:com.oculus.os.clearactivity/1000 for activity com.oculus.os.clearactivity/.ClearActivity
08-21 13:51:36.958  1092  4166 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1357 android.content.ContextWrapper.startService:613 android.content.ContextWrapper.startService:613 com.oculus.vrapi.ScreenCaptureHelper.advertiseStreamablePackage:54 <bottom of call stack> 
08-21 13:51:39.048  1092  1538 I ActivityManager: Killing 4102:com.genymobile.gnirehtet/u0a76 (adj 200): crash
marospekarik commented 3 years ago

Having the same issue. The app won't start on my oculus quest 2

Lyon-Jiang commented 2 years ago

Does anyone konw how to fix it

septag commented 2 years ago

Bump... same here , anyone ?

steevenlee commented 2 years ago

vote!