Genymobile / gnirehtet

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

Internet not working after few days #153

Open caburet opened 5 years ago

caburet commented 5 years ago

Hi, i was using gnirehtet for a few weeks. Sudenly i disconect my phono and try back and now its not working. I`ve already try restart PC (ubuntu 18) and the phone (samsung S6 edge). I reintall gnirehtet in another folder and delete the VPN in the phone and keep happend. My friend try this in his PC and have the same problem after a few days with diferrent OS and diferent Phone. The disconect was generated by me unplugin the phone and change the USB modo to try File-Mode, Picture-Phono or Charge-Mode.

The command line only show this.

./gnirehtet autorun 2018-11-07 14:01:22.372 INFO Main: Starting relay server... 2018-11-07 14:01:22.372 INFO Relay: Relay server started 2018-11-07 14:01:22.372 INFO Main: Checking gnirehtet client... 2018-11-07 14:01:22.491 INFO Main: Starting client... Broadcasting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } } Broadcast completed: result=0 2018-11-07 14:01:27.279 INFO TunnelServer: Client #0 connected 2018-11-07 14:01:34.509 INFO TunnelServer: Client #0 disconnected 2018-11-07 14:01:36.446 INFO Main: Checking gnirehtet client... 2018-11-07 14:01:36.568 INFO Main: Starting client... Broadcasting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } } Broadcast completed: result=0 2018-11-07 14:01:39.516 INFO TunnelServer: Client #1 connected 2018-11-07 14:01:48.858 INFO TunnelServer: Client #1 disconnected 2018-11-07 14:01:49.490 INFO Main: Checking gnirehtet client... 2018-11-07 14:01:49.544 INFO Main: Starting client... Broadcasting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } } Broadcast completed: result=0 2018-11-07 14:01:53.862 INFO TunnelServer: Client #2 connected

After several minutes i try again and its working now.

This LOG is continues to the previus one..

2018-11-07 14:01:53.862 INFO TunnelServer: Client #2 connected 2018-11-07 14:02:25.369 INFO TunnelServer: Client #2 disconnected 2018-11-07 14:13:24.329 INFO Main: Checking gnirehtet client... 2018-11-07 14:13:24.461 INFO Main: Starting client... Broadcasting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } } Broadcast completed: result=0 2018-11-07 14:13:25.759 INFO TunnelServer: Client #3 connected 2018-11-07 14:13:25.837 INFO TcpConnection: 10.0.0.2:60573 -> 31.13.85.34:443 Open 2018-11-07 14:13:25.937 INFO TcpConnection: 10.0.0.2:56338 -> 34.254.141.81:5223 Open 2018-11-07 14:13:25.978 INFO TcpConnection: 10.0.0.2:54899 -> 31.13.94.14:443 Open 2018-11-07 14:13:26.074 INFO TcpConnection: 10.0.0.2:38388 -> 31.13.94.54:5222 Open 2018-11-07 14:13:26.083 INFO UdpConnection: 10.0.0.2:28237 -> 8.8.8.8:53 Open 2018-11-07 14:13:26.109 INFO UdpConnection: 10.0.0.2:19648 -> 8.8.8.8:53 Open

rom1v commented 5 years ago

IIUC, gnirehtet works, but if you disconnect, it does not work immediately when you reconnect, and you have to wait some time before it is connected again. Is it correct?

During this time, does adb devices show the device connected?

If you track devices connections, you should be able to detect when a new device is detected over adb (this is what gnirehtet does) :

echo 0012host:track-devices | nc localhost 5037 | hd

Could you also check for relevant logs in the oitput of adb logcat when this happens?

caburet commented 5 years ago

Sure. If it happend again i do it. I can add that when i plug the phone in linux recognize it and show the android phone is plugged. [Off-topic] Love this idea and this sofware!

caburet commented 5 years ago

It may be problem with the internet conexion. It stop working at the same time in 2 different pc with different SO and different Android Phones but in the same LAN. Its a Optical fiber conexion of 100mb symmetrical and the rest of the webpage working well in the respective pc. After several minutes i try again and its working well again.

Here is the command asked before (while it was't working)

echo 0012host:track-devices | nc localhost 5037 | hd

00000000  4f 4b 41 59 30 30 31 38  30 36 31 35 37 64 66 36  |OKAY001806157df6|
00000010  33 64 64 37 36 35 30 39  09 64 65 76 69 63 65 0a  |3dd76509.device.|

adb logcat


11-09 14:00:26.461  3624 18883 V WifiNetworkHistory: writeKnownNetworkHistory write config "Hotel_Avenida"WPA_PSK
11-09 14:00:26.462  3624 18883 D WifiNetworkHistory: saving network history: "BVNET-9A42"WPA_PSK gw: null Network Selection-status: NETWORK_SELECTION_ENABLED ephemeral=false choice:null link:0 status:1 nid:74 hasEverConnected: false
11-09 14:00:26.462  3624 18883 V WifiNetworkHistory: writeKnownNetworkHistory write config "BVNET-9A42"WPA_PSK
11-09 14:00:26.462  3624 18883 D WifiNetworkHistory: saving network history: "sonita"WPA_PSK gw: null Network Selection-status: NETWORK_SELECTION_ENABLED ephemeral=false choice:null link:0 status:1 nid:10 hasEverConnected: false
11-09 14:00:26.462  3624 18883 V WifiNetworkHistory: writeKnownNetworkHistory write config "sonita"WPA_PSK
11-09 14:00:26.467 15514 15514 D InputTransport: Input channel destroyed: fd=81
11-09 14:00:26.469  3624  4754 D ActivityManager: moveToFront() : reason=finishActivity adjustFocus setFocusedActivity isAttached=true TaskRecord{2fbaa72d0 #299 A=co.dift.ingame U=0 StackId=1 sz=1}
11-09 14:00:26.470  3624  3644 D WindowManager: set systemUiVisibility of statusbar : vis= 0x608
11-09 14:00:26.471 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.473 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.474 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.475  3624  5510 D InputTransport: Input channel constructed: fd=439
11-09 14:00:26.476  3624  5510 D InputTransport: Input channel destroyed: fd=439
11-09 14:00:26.476 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.476 18681 18695 D InputTransport: Input channel constructed: fd=69
11-09 14:00:26.477 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.478 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.479 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.480 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.482 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.483 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.483 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.484 18740 18740 W ResourceType: Failure getting entry for 0x7f090007 (t=8 e=7) (error -75)
11-09 14:00:26.484 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.484 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.484 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.485 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.485 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.485 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.486 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.486 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.486 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.486 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.487 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.487 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.487 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.487 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.489 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.489  3624  4754 D InputDispatcher: Focus left window: 18681
11-09 14:00:26.489  3624  4754 D InputDispatcher: Focus entered window: 15514
11-09 14:00:26.490  3624  4754 D InputDispatcher: Focused application set to: xxxx
11-09 14:00:26.490 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.491 18740 18740 W ResourceType: No package identifier when getting value for resource number 0x00000000
11-09 14:00:26.491 15514 15514 D ViewRootImpl@b6b39e3[NavigationActivity]: MSG_WINDOW_FOCUS_CHANGED 1
11-09 14:00:26.491 32370 32370 D TelephonyManager: getAllCellInfo : Caller (PID / UID / TID): 32370 / 10327 / 32370
11-09 14:00:26.491 18740 18740 I SA      : phone number id is : supported
11-09 14:00:26.491 18740 18740 I SA      : [DM] Supports Ref Jpn : true
11-09 14:00:26.491 15514 15514 D ViewRootImpl@b6b39e3[NavigationActivity]: mHardwareRenderer.initializeIfNeeded()#2 mSurface={isValid=true -1156931584}
11-09 14:00:26.491  3624  4754 D ActivityTrigger: ActivityTrigger activityPauseTrigger 
11-09 14:00:26.492 15514 15514 V InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@aa7df21 nm : co.dift.ingame ic=null
11-09 14:00:26.492 15514 15514 I InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
11-09 14:00:26.492 18740 18740 I SA      : [DM] init END
11-09 14:00:26.492  3624  4822 D InputMethodManagerService: windowGainedFocus mCurrentFocusedUserId - 0 and mSecureKeypadEnabled-false
11-09 14:00:26.493  3624  4822 V InputMethodManagerService: windowGainedFocus: reason=WINDOW_FOCUS_GAIN client=android.os.BinderProxy@f606634 inputContext=null missingMethods= attribute=android.view.inputmethod.EditorInfo@6ed0cd0 nm = co.dift.ingame controlFlags=#101 softInputMode=#20 windowFlags=#81810180
11-09 14:00:26.493  3624  4822 V InputMethodManagerService: Unspecified window will hide input
11-09 14:00:26.493  3624  4822 D InputMethodManagerService: mDesktopModeManager null!
11-09 14:00:26.494  3624  4822 D InputTransport: Input channel constructed: fd=439
11-09 14:00:26.494  3624  4822 D InputTransport: Input channel destroyed: fd=439
11-09 14:00:26.494 15514 15514 D InputTransport: Input channel constructed: fd=81
11-09 14:00:26.495 18740 18740 I SA      : [OR] onReceive log=[SA = 2.2.04.61 V = 24 HWD = 2560X1440 4.0 dpi = 640  SIZE = 2 LOCALE = es_ES CSC = TTT MCC = 722 MNC 7 T = user DEVICE = zerolte P = zeroltedv I = NRD90M M = SM-G925I OKLEFT false DIS NRD90M.G925IDVS4FRC9 PSS = 5.059173621445858  ]
11-09 14:00:26.502  3624  4754 D GameManagerService: there is not sem_perfomance_mode on setting
11-09 14:00:26.505 18740 18740 I SA      : [OR] onReceive Intent=[ conn.CONNECTIVITY_CHANGE. networkInfo:[type: VPN[] - VPN, state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false, metered: false] networkType:17 inetCondition:100 ]
11-09 14:00:26.505 18740 18740 I SA      : [OR] == ACTION_CONNECTIVITY_CHANGE ==
11-09 14:00:26.506  3624  4752 D SamsungAlarmManager: setInexact Listener (T:2/F:0/AC:false) 20181109T145342 - CU:1000/CP:3624
11-09 14:00:26.508 18740 18740 I SA      : [SLFUCHKMGR] constructor called
11-09 14:00:26.509 18681 18681 V InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@230c28a nm : com.samsung.android.MtpApplication ic=null
11-09 14:00:26.509 18681 18681 D ViewRootImpl@13f9483[USBConnection]: MSG_WINDOW_FOCUS_CHANGED 0
11-09 14:00:26.510 18681 18681 D InputTransport: Input channel destroyed: fd=69
11-09 14:00:26.512  3624 17347 D ActivityManager: resumeTopActivityInnerLocked() : #1 prevTask=null next=ActivityRecord{b979c8ad0 u0 co.dift.ingame/com.reactnativenavigation.controllers.NavigationActivity t299} mFocusedStack=ActivityStack{a85cf8ad0 stackId=1, 6 tasks}
11-09 14:00:26.512  3624 17347 D ActivityManager: resumeTopActivityInnerLocked() : #1 prevTask=TaskRecord{3ea2927d0 #304 A=com.samsung.android.MtpApplication U=0 StackId=1 sz=1} next=ActivityRecord{b979c8ad0 u0 co.dift.ingame/com.reactnativenavigation.controllers.NavigationActivity t299} mFocusedStack=ActivityStack{a85cf8ad0 stackId=1, 6 tasks}
11-09 14:00:26.513  3624 17347 D CustomFrequencyManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT  frequency : 1300000  uid : 1000  pid : 3624  pkgName : AMS_ACT_RESUME@CPU_MIN@45
11-09 14:00:26.516 18740 18740 I SA      : [TPMU]  strSIMState  :SIM_STATE_READY
11-09 14:00:26.518  3624 17347 D ActivityManagerPerformance: AMP_acquire() ACT_RESUME
11-09 14:00:26.518  3624 17347 D ActivityManager: applyOptionsLocked(), pendingOptions : null
11-09 14:00:26.527  3624  3624 D EnterprisePremiumVpnPolicyServiceV2: Vpn Receiver : android.net.conn.CONNECTIVITY_CHANGE
11-09 14:00:26.527  3624  3624 I EnterprisePremiumVpnPolicyServiceV2: Vpn Receiver : Connection change = false
11-09 14:00:26.530  3624  3624 D KnoxVpnEngineService: Vpn Receiver : android.net.conn.CONNECTIVITY_CHANGE
11-09 14:00:26.530  3624  3856 I EnterprisePremiumVpnPolicyServiceV2: vpn handle : Message received
11-09 14:00:26.533  3624  3624 D KnoxVpnEngineService: change in connectivity has occured  for the network type17
11-09 14:00:26.533  3624  3856 D EnterprisePremiumVpnPolicyServiceV2: vpn handle : connectivity action : Handle MSG CONNECTIVITY_ACTION
11-09 14:00:26.536  3624  3624 D Tethering: Tethering got CONNECTIVITY_ACTION
11-09 14:00:26.539  3624  3902 D Tethering: InitialState got CMD_UPSTREAM_CHANGED
11-09 14:00:26.541  3624  3902 D Tethering: MasterInitialState.processMessage what=327683
11-09 14:00:26.541  3624  3856 D EnterprisePremiumVpnPolicyServiceV2: run all vpn : runAllVpnService beginning
11-09 14:00:26.543 18740 18740 I SA      : [TPMU] getMccFromUsim : 722
11-09 14:00:26.543 18740 18740 I SA      : [SCU] saveMccToPreferece Start
11-09 14:00:26.543 18740 18740 I SA      : [SCU] Save MCC to Preference : 722
11-09 14:00:26.544 18740 18740 I SA      : [SSP] query invoked
11-09 14:00:26.545 17001 17001 D MusicLifecycle: com.google.android.music.download.EncapsulatedBroadcastReceiver$1 generated event: Broadcast received with context com.google.android.music.ui.PhoneMusicApplication@9ce7e77 and intent Intent { act=com.google.android.music.download.keepon.KeeponSchedulingService.START_DOWNLOAD flg=0x10 launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } bqHint=1 }
11-09 14:00:26.554  3624  3972 D ConnectivityManager: getMobileDataEnabled()+ subId=1
11-09 14:00:26.556  3624  3624 D SLocation: BroadcastReceiver : CONNECTIVITY_ACTION
11-09 14:00:26.557  3624  4367 D SLocation: checkWifiInfo
11-09 14:00:26.558  3624  3972 D ConnectivityManager: getMobileDataEnabled()- subId=1 retVal=true
11-09 14:00:26.560  3624  3624 V MARsPolicyManager: DataConnection: true
11-09 14:00:26.563  3624 17347 D GameManagerService: there is not sem_perfomance_mode on setting
11-09 14:00:26.564  3624 17347 D MARsPolicyManager: handlePackageResumedFG pkgName = co.dift.ingame, userId = 0
11-09 14:00:26.565  3624  4367 D TelephonyManager: getCellLocation : Caller (PID / UID / TID): 3624 / 1000 / 4367
11-09 14:00:26.567  3624  3624 V NotificationService: pkg=com.genymobile.gnirehtet canInterrupt=false intercept=true
11-09 14:00:26.575 18681 18681 W IInputConnectionWrapper: getExtractedText on inactive InputConnection
11-09 14:00:26.576  3624 17349 I Sensors : Acc old sensor_state 16384, new sensor_state : 16385 en : 1
11-09 14:00:26.578 15514 15514 D SensorManager: registerListener :: 0, MPU6500 Acceleration Sensor, 66667, 0,  
11-09 14:00:26.578 18740 18740 I SA      : is signin new: false
11-09 14:00:26.582  3624  3638 D SamsungAlarmManager: setExact Listener (T:2/F:0/AC:false) 20181109T140031 - CU:1000/CP:3624
11-09 14:00:26.582  3624  3638 I SamsungAlarmManager: setLocked to kernel - T:2 / 20181109T140031, SetElapsed=104816210, nowELAPSED=104811283
11-09 14:00:26.582  3624  5510 D WindowManager: adjustSystemUiVisibilityLw : vis= 0x608
11-09 14:00:26.584  3624  3624 D GameManagerService: NotifyRunnable. pkg: co.dift.ingame, type: 4, isMinimized: false, isTunableApp: false
11-09 14:00:26.584  3624  3624 D GameManagerService: unexpected mPrevNotiType: -1
11-09 14:00:26.584  3624  4367 D TelephonyManager: getAllCellInfo : Caller (PID / UID / TID): 3624 / 1000 / 4367
11-09 14:00:26.586  5195  5195 D CatchNotificationsService: onNotificationPosted
11-09 14:00:26.589  3624  4367 D SLocation: cellList : 1
11-09 14:00:26.591  2531  2544 D BadgeProvider: query, [selection] : null
11-09 14:00:26.592 18681 18681 D ViewRootImpl@13f9483[USBConnection]: mHardwareRenderer.destroy()#1
11-09 14:00:26.594  3624  5510 V WindowManager: Relayout Window{8a9e04d0 u0 com.samsung.android.MtpApplication/com.samsung.android.MtpApplication.USBConnection}: viewVisibility=8 req=1368x128 WM.LayoutParams{(0,0)(wrapxwrap) sim=#120 ty=1 fl=#1800002 fmt=-3 wanim=0x1030466 surfaceInsets=Rect(128, 128 - 128, 128) needsMenuKey=2 naviIconColor=0}
11-09 14:00:26.599  3624  4367 W SLocation: handleEvent ENTER : currentDirection 1
11-09 14:00:26.600  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.600  5195  5195 E CatchNotificationsService: Invalid notification data
11-09 14:00:26.602  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.603  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.605  3624  4367 W SLocation: handleEvent ENTER : currentDirection 1
11-09 14:00:26.608  3108  3108 W AudioPolicyIntefaceImpl: Skipped to add effects on session 4569
11-09 14:00:26.608  3108  3108 I APM_AudioPolicyManager: startOutput() output 13, stream 3, session 4569
11-09 14:00:26.608  3108  3108 I AudioEffectStage: getBuffer primary_output_sub1_normal, 0xe8d97000
11-09 14:00:26.608  3108  3108 I AudioEffectStage: getBuffer primary_output_sub1_normal
11-09 14:00:26.611 18681 18681 D ViewRootImpl@13f9483[USBConnection]: Relayout returned: oldFrame=[36,1264][1404,1392] newFrame=[36,1264][1404,1392] result=0x5 surface={isValid=false 0} surfaceGenerationChanged=true
11-09 14:00:26.611 18681 18681 W IInputConnectionWrapper: getTextBeforeCursor on inactive InputConnection
11-09 14:00:26.625  3624  5511 D ActivityManager: post active user change for 0 fullscreen true isHomeActivity() false
11-09 14:00:26.625  3624  5511 D KnoxTimeoutHandler: postActiveUserChange [MsgParam] userId: 0 fullscreen is true showWhenlocked is false isMutiwindowRecord is false multiwindowstyle is 0
11-09 14:00:26.625  3624  3624 D KnoxTimeoutHandler: handleActiveUserChange [MsgParam] userId: 0 fullscreen is true showWhenlocked is false isMutiwindowRecord is false multiwindowstyle is 0
11-09 14:00:26.626  3108  3324 I AudioSAEffectSecPlus: EFFECT_CMD_SET_VOLUME
11-09 14:00:26.626  3108  3324 I AudioSAEffectSecPlus: command EFFECT_CMD_SET_VOLUME left = 0.199836, right =0.199836
11-09 14:00:26.626  3108  3324 D AudioSAEffectSecPlus: Don't apply mixer volume!
11-09 14:00:26.626  3108  3324 I AudioSAEffectSecPlus: EFFECT_CMD_SET_VOLUME
11-09 14:00:26.626  3108  3324 I AudioSAEffectSecPlus: command EFFECT_CMD_SET_VOLUME left = 0.199836, right =0.199836
11-09 14:00:26.626  3108  3324 D AudioSAEffectSecPlus: Don't apply mixer volume!
11-09 14:00:26.626  3108  3324 D SoundAliveResampler: [SoundAliveResampler] Init+++
11-09 14:00:26.626  3624  3624 I KnoxTimeoutHandler: Shared devices show user statefalse
11-09 14:00:26.627 14436 14436 E FullInputEventModel: onStartInput event aborted: emg: could not obtain extracted text (class emg)
11-09 14:00:26.635 18681 18681 D MTPUSBConnection: on destroy
11-09 14:00:26.636 18681 18681 I MTPUSBConnection: Inside MtpGSIMLogging
11-09 14:00:26.636  4710  4724 D ForegroundUtils: could not check pending caller
11-09 14:00:26.636 18681 18681 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:906 android.content.ContextWrapper.sendBroadcast:452 com.samsung.android.MtpApplication.USBConnection.MtpGSIMLogging:378 com.samsung.android.MtpApplication.USBConnection.onDestroy:87 android.app.Activity.performDestroy:7195 
11-09 14:00:26.638  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.639  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.640 18740 18740 E System  :  ********** PLEASE READ ************ 
11-09 14:00:26.640 18740 18740 E System  :  * 
11-09 14:00:26.640 18740 18740 E System  :  * New versions of the Android SDK no longer support the Crypto provider.
11-09 14:00:26.640 18740 18740 E System  :  * If your app was relying on setSeed() to derive keys from strings, you
11-09 14:00:26.640 18740 18740 E System  :  * should switch to using SecretKeySpec to load raw key bytes directly OR
11-09 14:00:26.640 18740 18740 E System  :  * use a real key derivation function (KDF). See advice here : 
11-09 14:00:26.640 18740 18740 E System  :  * http://android-developers.blogspot.com/2016/06/security-crypto-provider-deprecated-in.html 
11-09 14:00:26.640 18740 18740 E System  :  *********************************** 
11-09 14:00:26.640 18740 18740 E System  :  Returning an instance of SecureRandom from the Crypto provider
11-09 14:00:26.640 18740 18740 E System  :  as a temporary measure so that the apps targeting earlier SDKs
11-09 14:00:26.640 18740 18740 E System  :  keep working. Please do not rely on the presence of the Crypto
11-09 14:00:26.640 18740 18740 E System  :  provider in the codebase, as our plan is to delete it
11-09 14:00:26.640 18740 18740 E System  :  completely in the future.
11-09 14:00:26.643  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.648  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.650  3624  4367 W SLocation: handleEvent ENTER : currentDirection 1
11-09 14:00:26.652 18740 18740 I SA      : [AESC] decrypt START
11-09 14:00:26.661 18681 18681 D UsbManager: setCurrentFunction : none
11-09 14:00:26.664  3128  3611 D EnterpriseController: netId is 0
11-09 14:00:26.664  3128  3611 D Netd    : getNetworkForDns: using netid 522 for uid 10508
11-09 14:00:26.664  3128  3611 D DnsProxyListener: DNSDBG::dns addrinfo af 0
11-09 14:00:26.666  3108  3250 I APM_AudioPolicyManager: stopOutput() output 13, stream 3, session 4545
11-09 14:00:26.666 18681 18681 E SystemFW: setCurrentFunction
11-09 14:00:26.666 18681 18681 E SystemFW: java.lang.Exception: who's calling?
11-09 14:00:26.666 18681 18681 E SystemFW:  at android.hardware.usb.UsbManager.setCurrentFunction(UsbManager.java:656)
11-09 14:00:26.666 18681 18681 E SystemFW:  at com.samsung.android.MtpApplication.MtpReceiver.changeMtpMode(MtpReceiver.java:334)
11-09 14:00:26.666 18681 18681 E SystemFW:  at com.samsung.android.MtpApplication.USBConnection.onDestroy(USBConnection.java:88)
11-09 14:00:26.666 18681 18681 E SystemFW:  at android.app.Activity.performDestroy(Activity.java:7195)
11-09 14:00:26.666 18681 18681 E SystemFW:  at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1161)
11-09 14:00:26.666 18681 18681 E SystemFW:  at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4573)
11-09 14:00:26.666 18681 18681 E SystemFW:  at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4609)
11-09 14:00:26.666 18681 18681 E SystemFW:  at android.app.ActivityThread.-wrap7(ActivityThread.java)
11-09 14:00:26.666 18681 18681 E SystemFW:  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
11-09 14:00:26.666 18681 18681 E SystemFW:  at android.os.Handler.dispatchMessage(Handler.java:102)
11-09 14:00:26.666 18681 18681 E SystemFW:  at android.os.Looper.loop(Looper.java:154)
11-09 14:00:26.666 18681 18681 E SystemFW:  at android.app.ActivityThread.main(ActivityThread.java:6682)
11-09 14:00:26.666 18681 18681 E SystemFW:  at java.lang.reflect.Method.invoke(Native Method)
11-09 14:00:26.666 18681 18681 E SystemFW:  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
11-09 14:00:26.666 18681 18681 E SystemFW:  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
11-09 14:00:26.669  3127 15686 I NuPlayerRenderer: [audio] notifyEOS() End of Stream, delayUs : 0
11-09 14:00:26.669  3127 15635 V NuPlayer: reached audio EOS
11-09 14:00:26.669  3127 15635 V NuPlayer: msg : 2, ext1 : 0, ext2 : 0
11-09 14:00:26.669  3127 15635 D NuPlayerDriver: notifyListener_l(0xed9cd480), (2, 0, 0), loop setting(0, 0)
11-09 14:00:26.669  3127 15635 I MediaClock: getMediaTime_l - mAnchorTimeRealUs is '-1'
11-09 14:00:26.669  3127 15635 V MediaPlayerService: [365] notify (0xedb08dc0, 2, 0, 0)
11-09 14:00:26.669  3127 15635 V GenericSource: pause
11-09 14:00:26.669 15514 15525 V MediaPlayer: message received msg=2, ext1=0, ext2=0
11-09 14:00:26.669 15514 15525 V MediaPlayer: playback complete
11-09 14:00:26.669  3127 15635 V GenericSource: [Flag] clear 0x1 -> mFlags = 0x8
11-09 14:00:26.669 15514 15525 V MediaPlayer: callback application
11-09 14:00:26.669 15514 15525 V MediaPlayer: back from callback
11-09 14:00:26.669  3127 15686 I NuPlayerRenderer: onPause
11-09 14:00:26.669 15514 15593 V MediaPlayer-JNI: isLooping
11-09 14:00:26.669  3127 15686 I MediaClock: setPlaybackRate rate : 0.000000
11-09 14:00:26.669 15514 15593 V MediaPlayer: isLooping
11-09 14:00:26.669  3127 15686 V AudioSink: stop
11-09 14:00:26.673  3624  8639 D UsbDeviceManager: rmSetNextUsbModeToDefault
11-09 14:00:26.673  3624  8639 D UsbDeviceManager: setCurrentFunctions(none)
11-09 14:00:26.674 18740 18740 I SA      : [AESC] decrypt END
11-09 14:00:26.674 18740 18740 I SA      : [TPMU] mcc decrypted.
11-09 14:00:26.675  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.676 18740 18740 I SA      : [TPMU] GetMccFromDB : 334
11-09 14:00:26.676 18740 18740 I SA      : [SCU] getMccFromPreferece mcc = 722
11-09 14:00:26.676 18740 18740 I SA      : [SCU] saveMccToPreferece End
11-09 14:00:26.676 18740 18740 I SA      : [OR] onReceive END
11-09 14:00:26.677  3624  4367 W SLocation: handleEvent ENTER : currentDirection 1
11-09 14:00:26.678  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.679  3624  3639 D MountService: getExternalStorageMountMode : 1
11-09 14:00:26.679  3624  3639 D MountService: getExternalStorageMountMode : 3
11-09 14:00:26.679  3624  3639 D MountService: getExternalStorageMountMode : final mountMode=1, uid : 10204, packageName : com.samsung.android.oneconnect
11-09 14:00:26.679  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.682  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.689  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.689  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.690  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.691  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.692  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.693  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.694  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.695  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.696  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.697 32370 32507 D TelephonyManager: getAllCellInfo : Caller (PID / UID / TID): 32370 / 10327 / 32507
11-09 14:00:26.697  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.698  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.699  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.700  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.701  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.701 18901 18901 E Zygote  : v2
11-09 14:00:26.701 18901 18901 I libpersona: KNOX_SDCARD checking this for 10204
11-09 14:00:26.701 18901 18901 I libpersona: KNOX_SDCARD not a persona
11-09 14:00:26.701  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.702 18901 18901 E Zygote  : accessInfo : 0
11-09 14:00:26.702  3624  3639 I ActivityManager: Start proc 18901:com.samsung.android.oneconnect/u0a204 for broadcast com.samsung.android.oneconnect/com.launchdarkly.android.ConnectivityReceiver
11-09 14:00:26.702  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.702 18901 18901 W SELinux : SELinux selinux_android_compute_policy_index : Policy Index[2],  Con:u:r:zygote:s0 RAM:SEPF_SECMOBILE_7.0_0010, [-1 -1 -4 -1 0 1]
11-09 14:00:26.703 18901 18901 I SELinux : SELinux: seapp_context_lookup: seinfo=platform, level=s0:c512,c768, pkgname=com.samsung.android.oneconnect 
11-09 14:00:26.704  3624  4367 W SLocation: handleEvent EXIT : currentDirection 2
11-09 14:00:26.704  3624  3651 D UsbDeviceManager: handleMessage -> MSG_SET_CURRENT_FUNCTION
11-09 14:00:26.704 18681 18681 W Settings: Setting adb_enabled has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
11-09 14:00:26.705  3624  3651 D UsbDeviceManager: setEnabledFunctions functions=none, forceRestart=false
rom1v commented 5 years ago

Here is the command asked before (while it was't working)

echo 0012host:track-devices | nc localhost 5037 | hd

00000000 4f 4b 41 59 30 30 31 38 30 36 31 35 37 64 66 36 |OKAY001806157df6| 00000010 33 64 64 37 36 35 30 39 09 64 65 76 69 63 65 0a |3dd76509.device.|

Sorry, in fact, you must run it from the beginning, and see if it adds new stuff (updates the device list) when it stops working. This will help to know if the device is disconnected"/"reconnected from adb

caburet commented 5 years ago

Ok. Then if i understand the correct sequence is this? 1) Run command "echo 0012host:track-devices | nc localhost 5037 | hd" 2) Start geny: example: ./gnirehtet autorun 3) Plug the Device I try it when it happend again.

caburet commented 4 years ago

Update: When i reboot phone its back working. Maybe is something wrong in the phone. I do the test asked and when i plug the phone it fill the command with this info.

echo 0012host:track-devices | nc localhost 5037 | hd 00000000 4f 4b 41 59 30 30 30 30 30 30 31 39 30 36 31 35 |OKAY000000190615| 00000010 37 64 66 36 33 64 64 37 36 35 30 39 09 6f 66 66 |7df63dd76509.off| 00000020 6c 69 6e 65 0a 30 30 31 38 30 36 31 35 37 64 66 |line.001806157df| 00000030 36 33 64 64 37 36 35 30 39 09 64 65 76 69 63 65 |63dd76509.device|

gniretet command shows this

./gnirehtet autorun -d 190.1.0.195 2019-08-07 15:37:35.929 INFO Main: Starting relay server... 2019-08-07 15:37:35.929 INFO Relay: Relay server started 2019-08-07 15:37:56.448 INFO Main: Checking gnirehtet client... 2019-08-07 15:37:56.499 INFO Main: Starting client... Broadcasting: Intent { act=com.genymobile.gnirehtet.START cmp=com.genymobile.gnirehtet/.GnirehtetControlReceiver launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } (has extras) } Broadcast completed: result=0 2019-08-07 15:37:57.995 INFO TunnelServer: Client #0 connected

Also in the phone does not count download and upload traffic as usually do. WhatsApp Image 2019-08-07 at 3 41 28 PM