I have enabled ADB over network in the developer settings, but as soon as I send the command adb shell input keyevent KEYCODE_POWER, to lock or unlock the screen I lose my connection, I notice that when I sent again the same command to unlock the screen, then I get the following error
this happens just after the device has been restarted. I have gotten the logcat from the device and I noticed that the ethernet connection is down by some reason, if I connect again to the same device and send the command once again, then it works without any problem. Could you help to check the error.
Code: Select all
07-17 01:29:47.328 5197 5197 I Radio-JNI: register_android_hardware_Radio DONE
07-17 01:29:47.345 5197 5197 D AndroidRuntime: Calling main entry com.android.commands.input.Input
07-17 01:29:47.346 5197 5197 I Input : injectKeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POWER, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=141825, downTime=141825, deviceId=-1, source=0x101 }
07-17 01:29:47.353 5197 5197 I Input : injectKeyEvent: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_POWER, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=141825, downTime=141825, deviceId=-1, source=0x101 }
07-17 01:29:47.354 3361 3379 I PowerManagerService: Going to sleep due to power button (uid 1000)...
07-17 01:29:47.355 3361 3411 I PowerManagerService: Sleeping (uid 1000)...
07-17 01:29:47.356 5197 5197 D AndroidRuntime: Shutting down VM
07-17 01:29:47.357 3361 3392 I VrManagerService: VR mode is disallowed
07-17 01:29:47.386 3540 3540 W FingerprintManager: isFingerprintHardwareDetected(): Service not connected!
07-17 01:29:47.395 3057 3513 D PermissionCache: checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (247 us)
07-17 01:29:47.902 3361 3411 V KeyguardServiceDelegate: onScreenTurnedOff()
07-17 01:29:47.920 3361 3411 E libEGL : call to OpenGL ES API with no current context (logged once per thread)
07-17 01:29:47.921 3361 3409 I DisplayManagerService: Display device changed state: "Built-in Screen", OFF
07-17 01:29:47.921 3057 3057 D SurfaceFlinger: Set power mode=0, type=0 flinger=0xb68b2000
07-17 01:29:47.922 3361 3409 I DisplayManagerService: Display device changed state: "HDMI Screen", OFF
07-17 01:29:47.929 3057 3057 D SurfaceFlinger: Set power mode=0, type=1 flinger=0xb68b2000
07-17 01:29:48.000 3540 3540 W FingerprintManager: isFingerprintHardwareDetected(): Service not connected! [size=150][b]At this point I lose the ADB Connection[/b][/size]
07-17 01:29:48.049 3093 3422 E Netd : Failed to destroy IPv6 sockets on fd13:b262:5733:0:21e:6ff:fe36:99e7: Invalid argument
07-17 01:29:48.050 3093 3422 E Netd : Error destroying sockets: Unknown error -22
07-17 01:29:48.050 3361 3407 D EthernetNetworkFactory: updateInterface: eth0 link down
07-17 01:29:48.050 3093 3422 D NetlinkEvent: Unknown ifindex 5 in RTM_DELADDR
07-17 01:29:48.050 3361 3407 I EthernetNetworkFactory: Updating mNetworkAgent with: [ Transports: ETHERNET Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN LinkUpBandwidth>=100000Kbps LinkDnBandwidth>=100000Kbps], [type: Ethernet[], state: DISCONNECTED/DISCONNECTED, reason: (unspecified), extra: 00:1e:06:36:99:e7, failover: false, available: false, roaming: false, metered: false], {InterfaceName: eth0 LinkAddresses: [192.168.10.65/24,] Routes: [192.168.10.0/24 -> 0.0.0.0 eth0,0.0.0.0/0 -> 192.168.10.254 eth0,] DnsAddresses: [192.168.10.254,8.8.8.8,] Domains: null MTU: 0}
07-17 01:29:48.050 3361 3480 D ConnectivityService: NetworkAgentInfo [Ethernet () - 100] EVENT_NETWORK_INFO_CHANGED, going from CONNECTED to DISCONNECTED
07-17 01:29:48.051 3361 3511 D Ethernet: NetworkAgent: NetworkAgent channel lost
07-17 01:29:48.051 3361 3480 D ConnectivityService: Invalid tcpBufferSizes string: null, using defaults
07-17 01:29:48.051 3361 3511 I EthernetNetworkFactory: Updating mNetworkAgent with: [ Transports: ETHERNET Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN LinkUpBandwidth>=100000Kbps LinkDnBandwidth>=100000Kbps], [type: Ethernet[], state: DISCONNECTED/DISCONNECTED, reason: (unspecified), extra: 00:1e:06:36:99:e7, failover: false, available: false, roaming: false, metered: false], {LinkAddresses: [] Routes: [] DnsAddresses: [] Domains: null MTU: 0}
07-17 01:29:48.052 3093 3430 D CommandListener: Clearing all IP addresses on eth0
07-17 01:29:48.053 3361 3480 D ConnectivityService: NetworkAgentInfo [Ethernet () - 100] got DISCONNECTED, was satisfying 4
07-17 01:29:48.053 3093 3422 E Netd : Failed to destroy IPv6 sockets on fe80::21e:6ff:fe36:99e7: Invalid argument
07-17 01:29:48.054 3093 3422 E Netd : Error destroying sockets: Unknown error -22
07-17 01:29:48.054 3093 3422 D NetlinkEvent: Unknown ifindex 5 in RTM_DELADDR
07-17 01:29:48.054 3093 3422 E Netd : Failed to destroy IPv4 sockets on 192.168.10.65: Invalid argument
07-17 01:29:48.054 3093 3422 E Netd : Error destroying sockets: Unknown error -22
07-17 01:29:48.055 3361 3407 D EthernetNetworkFactory: Stopped tracking interface eth0
07-17 01:29:48.044 2972 2972 W auditd : type=1401 audit(0.0:14): SELinux: unrecognized netlink message type=20 for sclass=32
07-17 01:29:48.065 3361 3480 W ConnectivityExtension: ConnectivityExt jar file not present
07-17 01:29:48.073 3361 3480 D ConnectivityService: Sending DISCONNECTED broadcast for type 9 NetworkAgentInfo [Ethernet () - 100] isDefaultNetwork=true
07-17 01:29:48.049 2972 2972 W auditd : type=1401 audit(0.0:15): SELinux: unrecognized netlink message type=20 for sclass=32
07-17 01:29:48.084 4418 4418 I Email : Unregister all idle mailboxes
07-17 01:29:48.049 2972 2972 W auditd : type=1401 audit(0.0:16): SELinux: unrecognized netlink message type=20 for sclass=32
07-17 01:29:48.085 3719 3719 D Backup : [BackupScheduler] Setting backup scheduler enabled=false due to desired state 4
07-17 01:29:48.085 3719 3719 V Backup : [BackupTransportCS] no backup now
07-17 01:29:48.163 3361 3546 I UsbAlsaManager: USB Audio Device Removed: null
07-17 01:29:48.178 3093 3430 E Netd : netlink response contains error (No such file or directory)
07-17 01:29:48.182 3361 3392 I ActivityManager: Start proc 5234:com.android.mtp/u0a10 for broadcast com.android.mtp/.UsbIntentReceiver
07-17 01:29:48.196 3361 3393 I WindowManager: OverscanTimeout run
07-17 01:29:48.277 3361 4361 D VoldConnector: SND -> {9 appfuse mount 10010 5234 MtpDocumentsProvider}
07-17 01:29:48.351 3361 3464 D VoldConnector: RCV <- {200 9 AppFuse command succeeded}
07-17 01:29:48.376 3361 3575 I ActivityManager: Killing 4724:com.hardkernel.odroid/1000 (adj 906): empty #17
07-17 01:29:48.423 3361 4484 D ActivityManager: cleanUpApplicationRecord -- 4724
07-17 01:29:48.668 3361 3407 D EthernetNetworkFactory: Started tracking interface eth0
07-17 01:29:48.672 3093 3430 D CommandListener: Setting iface cfg
07-17 01:29:48.672 3093 3430 D CommandListener: Trying to bring up eth0
07-17 01:29:48.693 3361 3546 D UsbHostManager: Added device UsbDevice[mName=/dev/bus/usb/006/003,mVendorId=3034,mProductId=33107,mClass=0,mSubclass=0,mProtocol=0,mManufacturerName=Realtek,mProductName=USB 10/100/1000 LAN,mVersion=3.0,mSerialNumber=000001000000,mConfigurations=[
07-17 01:29:48.693 3361 3546 D UsbHostManager: UsbConfiguration[mId=1,mName=null,mAttributes=160,mMaxPower=32,mInterfaces=[
07-17 01:29:48.693 3361 3546 D UsbHostManager: UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=255,mSubclass=255,mProtocol=0,mEndpoints=[
07-17 01:29:48.693 3361 3546 D UsbHostManager: UsbEndpoint[mAddress=129,mAttributes=2,mMaxPacketSize=1024,mInterval=0]
07-17 01:29:48.693 3361 3546 D UsbHostManager: UsbEndpoint[mAddress=2,mAttributes=2,mMaxPacketSize=1024,mInterval=0]
07-17 01:29:48.693 3361 3546 D UsbHostManager: UsbEndpoint[mAddress=131,mAttributes=3,mMaxPacketSize=2,mInterval=8]]]
07-17 01:29:48.693 3361 3546 D UsbHostManager: UsbConfiguration[mId=2,mName=null,mAttributes=160,mMaxPower=32,mInterfaces=[
07-17 01:29:48.693 3361 3546 D UsbHostManager: UsbInterface[mId=0,mAlternateSetting=0,mName=CDC Communications Control,mClass=2,mSubclass=6,mProtocol=0,mEndpoints=[
07-17 01:29:48.693 3361 3546 D UsbHostManager: UsbEndpoint[mAddress=131,mAttributes=3,mMaxPacketSize=16,mInterval=8]]
07-17 01:29:48.693 3361 3546 D UsbHostManager: UsbInterface[mId=1,mAlternateSetting=0,mName=null,mClass=10,mSubclass=0,mProtocol=0,mEndpoints=[]
07-17 01:29:48.693 3361 3546 D UsbHostManager: UsbInterface[mId=1,mAlternateSetting=1,mName=Ethernet Data,mClass=10,mSubclass=0,mProtocol=0,mEndpoints=[
07-17 01:29:48.693 3361 3546 D UsbHostManager: UsbEndpoint[mAddress=129,mAttributes=2,mMaxPacketSize=1024,mInterval=0]
07-17 01:29:48.693 3361 3546 D UsbHostManager: UsbEndpoint[mAddress=2,mAttributes=2,mMaxPacketSize=1024,mInterval=0]]]]
07-17 01:29:48.694 3361 3546 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:877 com.android.server.usb.UsbSettingsManager.deviceAttached:744 com.android.server.usb.UsbHostManager.endUsbDeviceAdded:225 com.android.server.usb.UsbHostManager.monitorUsbHostBus:-2 com.android.server.usb.UsbHostManager.-wrap0:-1
07-17 01:29:48.707 3361 3546 I ActivityManager: START u0 {act=android.hardware.usb.action.USB_DEVICE_ATTACHED flg=0x10000000 cmp=com.android.mtp/.ReceiverActivity (has extras)} from uid 1000 on display 0
07-17 01:29:48.747 3361 3407 D EthernetNetworkFactory: updateInterface: eth0 link down
07-17 01:29:48.749 3361 3407 D EthernetNetworkFactory: updateInterface: eth0 link down
07-17 01:29:48.750 3361 3407 D EthernetNetworkFactory: updateInterface: eth0 link down
07-17 01:29:48.756 5234 5234 E MtpDevice: device not found
07-17 01:29:48.756 5234 5234 D UsbDeviceConnectionJNI: close
07-17 01:29:48.767 3361 4317 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@445f24e attribute=android.view.inputmethod.EditorInfo@7f01f6f, token = android.os.BinderProxy@37ce0f7
07-17 01:29:48.814 3631 5268 D Index : Indexing locale 'en_US' took 7 millis
07-17 01:29:48.818 3631 3631 W Settings: Setting bugreport_in_power_menu has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
07-17 01:29:48.852 3631 5270 W TileUtils: Found com.android.systemui.tuner.TunerActivity for intent Intent { act=com.android.settings.action.EXTRA_SETTINGS } missing metadata
07-17 01:29:51.849 3361 3407 D EthernetNetworkFactory: updateInterface: eth0 link up
07-17 01:29:51.850 3361 5271 D EthernetNetworkFactory: starting ipProvisioningThread(eth0): mNetworkInfo=[type: Ethernet[], state: DISCONNECTED/DISCONNECTED, reason: (unspecified), extra: 00:1e:06:36:99:e7, failover: false, available: true, roaming: false, metered: false]
07-17 01:29:51.850 3361 5271 I EthernetNetworkFactory: Applying static IPv4 configuration to eth0: IP address 192.168.10.65/24 Gateway 192.168.10.254 DNS servers: [ 192.168.10.254 8.8.8.8 ] Domains
07-17 01:29:51.853 3093 3430 D CommandListener: Setting iface cfg
07-17 01:29:51.853 3093 3430 D CommandListener: Trying to bring up eth0
07-17 01:29:51.856 3361 5271 D ConnectivityService: registerNetworkAgent NetworkAgentInfo{ ni{[type: Ethernet[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: 00:1e:06:36:99:e7, failover: false, available: true, roaming: false, metered: false]} network{101} nethandle{433808132830} lp{{InterfaceName: eth0 LinkAddresses: [192.168.10.65/24,] Routes: [192.168.10.0/24 -> 0.0.0.0 eth0,0.0.0.0/0 -> 192.168.10.254 eth0,] DnsAddresses: [192.168.10.254,8.8.8.8,] Domains: null MTU: 0}} nc{[ Transports: ETHERNET Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN LinkUpBandwidth>=100000Kbps LinkDnBandwidth>=100000Kbps]} Score{30} everValidated{false} lastValidated{false} created{false} lingering{false} explicitlySelected{false} acceptUnvalidated{false} everCaptivePortalDetected{false} lastCaptivePortalDetected{false} }
07-17 01:29:51.856 3361 5271 D EthernetNetworkFactory: exiting ipProvisioningThread(eth0): mNetworkInfo=[type: Ethernet[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: 00:1e:06:36:99:e7, failover: false, available: true, roaming: false, metered: false]
07-17 01:29:51.856 3361 3480 D ConnectivityService: NetworkAgentInfo [Ethernet () - 101] EVENT_NETWORK_INFO_CHANGED, going from null to CONNECTED
07-17 01:29:51.858 3361 3480 D ConnectivityService: Adding iface eth0 to network 101
07-17 01:29:51.905 3361 3480 D ConnectivityService: Setting DNS servers for network 101 to [/192.168.10.254, /8.8.8.8]
07-17 01:29:51.914 3361 3480 W ConnectivityExtension: ConnectivityExt jar file not present
07-17 01:29:51.921 3361 3480 W ConnectivityExtension: ConnectivityExt jar file not present
07-17 01:29:51.924 3361 3480 D ConnectivityService: Switching to new default network: NetworkAgentInfo{ ni{[type: Ethernet[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: 00:1e:06:36:99:e7, failover: false, available: true, roaming: false, metered: false]} network{101} nethandle{433808132830} lp{{InterfaceName: eth0 LinkAddresses: [192.168.10.65/24,] Routes: [192.168.10.0/24 -> 0.0.0.0 eth0,0.0.0.0/0 -> 192.168.10.254 eth0,] DnsAddresses: [192.168.10.254,8.8.8.8,] Domains: null MTU: 0}} nc{[ Transports: ETHERNET Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&FOREGROUND LinkUpBandwidth>=100000Kbps LinkDnBandwidth>=100000Kbps]} Score{30} everValidated{false} lastValidated{false} created{true} lingering{false} explicitlySelected{false} acceptUnvalidated{false} everCaptivePortalDetected{false} lastCaptivePortalDetected{false} }
07-17 01:29:51.926 3361 3480 D ConnectivityService: Invalid tcpBufferSizes string: null, using defaults
07-17 01:29:51.929 3361 3480 D ConnectivityService: Sending CONNECTED broadcast for type 9 NetworkAgentInfo [Ethernet () - 101] isDefaultNetwork=true
07-17 01:29:51.929 3361 5275 D NetworkMonitor/NetworkAgentInfo [Ethernet () - 101]: PROBE_DNS OK 4ms, www.google.com=172.217.16.132
07-17 01:29:51.930 3361 5276 D NetworkMonitor/NetworkAgentInfo [Ethernet () - 101]: PROBE_DNS OK 4ms, connectivitycheck.gstatic.com=172.217.18.99
07-17 01:29:51.930 3361 5275 W System : ClassLoader referenced unknown path: /system/framework/tcmclient.jar
07-17 01:29:51.948 3719 3719 D Backup : [BackupScheduler] Setting backup scheduler enabled=true due to desired state 1
07-17 01:29:51.948 3719 3719 V Backup : [BackupTransportCS] no backup now
07-17 01:29:51.949 4523 4523 I Finsky : [1] lac.a(265): Installer: found apps to install. apps=[]
07-17 01:29:52.001 3361 5276 D NetworkMonitor/NetworkAgentInfo [Ethernet () - 101]: PROBE_HTTP http://connectivitycheck.gstatic.com/generate_204 time=70ms ret=204 request={User-Agent=[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36]} headers={null=[HTTP/1.1 204 No Content], Content-Length=[0], Date=[Wed, 17 Jul 2019 12:29:51 GMT], X-Android-Received-Millis=[1563366592001], X-Android-Response-Source=[NETWORK 204], X-Android-Selected-Protocol=[http/1.1], X-Android-Sent-Millis=[1563366591967]}
07-17 01:29:52.116 3361 5275 D NetworkMonitor/NetworkAgentInfo [Ethernet () - 101]: PROBE_HTTPS https://www.google.com/generate_204 time=184ms ret=204 request={User-Agent=[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36]} headers={null=[HTTP/1.1 204 No Content], Alt-Svc=[quic=":443"; ma=2592000; v="46,43,39"], Content-Length=[0], Date=[Wed, 17 Jul 2019 12:29:52 GMT], X-Android-Received-Millis=[1563366592115], X-Android-Response-Source=[NETWORK 204], X-Android-Selected-Protocol=[http/1.1], X-Android-Sent-Millis=[1563366592006]}
07-17 01:29:52.117 3361 3480 D ConnectivityService: NetworkAgentInfo [Ethernet () - 101] validation passed
07-17 01:29:52.694 3361 3391 I gps_serial: Checking for device /dev/ttyGPS0
07-17 01:29:52.694 3361 3391 I gps_serial: Checking for device /dev/ttyGPS1
07-17 01:29:52.694 3361 3391 I gps_serial: Checking for device /dev/ttyGPS2
07-17 01:29:52.695 3361 3391 I gps_serial: Checking for device /dev/ttyGPS3
07-17 01:29:52.695 3361 3391 I gps_serial: Checking for device /dev/ttyGPS4
07-17 01:29:52.695 3361 3391 I gps_serial: Sleeping 10s
07-17 01:29:52.853 3093 3422 D NetlinkEvent: Unknown ND option type 31
07-17 01:29:53.132 5283 5283 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
07-17 01:29:53.137 5283 5283 D AndroidRuntime: CheckJNI is OFF
07-17 01:29:53.181 5283 5283 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
07-17 01:29:53.234 5283 5283 I Radio-JNI: register_android_hardware_Radio DONE
07-17 01:29:53.250 5283 5283 D AndroidRuntime: Calling main entry com.android.commands.input.Input
07-17 01:29:53.250 5283 5283 I Input : injectKeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POWER, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=147729, downTime=147729, deviceId=-1, source=0x101 } [size=150][b]At this point I have conencted again to the device and the commands work without any problem [/b][/size]
07-17 01:29:53.256 3361 5057 I PowerManagerService: Waking up from sleep (uid 1000)...
07-17 01:29:53.257 3361 3411 I DisplayPowerController: Blocking screen on until initial contents have been drawn.
07-17 01:29:53.257 3361 3361 V KeyguardServiceDelegate: onStartedWakingUp()
07-17 01:29:53.258 5283 5283 I Input : injectKeyEvent: KeyEvent { action=ACTION_UP, keyCode=KEYCODE_POWER, scanCode=0, metaState=0, flags=0x0, repeatCount=0, eventTime=147729, downTime=147729, deviceId=-1, source=0x101 }
07-17 01:29:53.262 5283 5283 D AndroidRuntime: Shutting down VM
07-17 01:29:53.270 3361 3411 V KeyguardServiceDelegate: onScreenTurnedOn(showListener = com.android.server.policy.PhoneWindowManager$2@33a5e2d)
07-17 01:29:53.277 3057 3057 D SurfaceFlinger: Set power mode=2, type=0 flinger=0xb68b2000
07-17 01:29:53.280 3361 3409 I DisplayManagerService: Display device changed state: "Built-in Screen", ON
07-17 01:29:53.281 3361 3409 I DisplayManagerService: Display device changed state: "HDMI Screen", ON
07-17 01:29:53.286 3057 3057 D SurfaceFlinger: Set power mode=2, type=1 flinger=0xb68b2000
07-17 01:29:53.339 3361 4361 V KeyguardServiceDelegate: **** SHOWN CALLED ****
07-17 01:29:53.341 3631 3631 W Settings: Setting bugreport_in_power_menu has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
07-17 01:29:53.359 4250 5296 I SystemUpdate: [Installation,ReceiverIntentOperation] Received intent: Intent { act=android.intent.action.USER_PRESENT flg=0x24000010 cmp=com.google.android.gms/.chimera.GmsIntentOperationService }.
07-17 01:29:53.409 4250 4844 I CastDatabase: Opening the database
07-17 01:29:53.420 4250 5296 W ChimeraUtils: Non Chimera context
07-17 01:29:53.421 4250 5296 W ChimeraUtils: Non Chimera context
07-17 01:29:53.435 3361 3411 I DisplayPowerController: Unblocked screen on after 178 ms
07-17 01:29:53.437 3361 3411 V KeyguardServiceDelegate: onScreenTurnedOn()