Releases: iteratec/SimpleRT
Releases · iteratec/SimpleRT
v1.2.3: Sleep 10s before init of android device
We had an exception that was thrown when the SimpleRT app on the android device was initialized by the server side part of SimpleRT during boot of the android device after a reboot of the device. The log written on the device and shown via 'adb logcat' included the following error message: 12-19 14:39:38.559 11700 11700 I SystemServiceManager: Starting com.android.server.usb.UsbService$Lifecycle 12-19 14:39:38.559 11700 11700 D UsbService: UsbService -> UsbHostManager 12-19 14:39:38.569 11700 11700 D UsbDeviceManager: mps exists 12-19 14:39:38.569 11700 11700 D UsbDeviceManager: getDefaultFunctions : func = mtp,adb 12-19 14:39:38.569 11700 11700 D UsbDeviceManager: setEnabledFunctions functions=null, forceRestart=false 12-19 14:39:38.569 11700 11700 D UsbDeviceManager: mps exists 12-19 14:39:38.569 11700 11700 D UsbDeviceManager: getDefaultFunctions : func = mtp,adb 12-19 14:39:38.569 11700 11700 D UsbDeviceManager: read '/sys/class/android_usb/android0/state', state = CONFIGURED 12-19 14:39:38.569 11700 11700 D UsbDeviceManager: initalized current function mtp,adb 12-19 14:39:38.569 11700 11744 D UsbDeviceManager: handleMessage -> MSG_UPDATE_STATE connected = 1,configured = 1 12-19 14:39:38.569 11700 11744 D UsbDeviceManager: updateUsbNotification : mConnected = true, mConfigured = true, mCurrentFunctions = mtp,adb 12-19 14:39:38.569 11700 11700 D UsbDeviceManager: accessory attached at boot 12-19 14:39:38.569 11700 11700 W UsbDeviceManager: startAccessoryMode[0]=Konstantin Menyaev 12-19 14:39:38.569 11700 11700 W UsbDeviceManager: startAccessoryMode[1]=SimpleRT 12-19 14:39:38.569 11700 11700 W UsbDeviceManager: startAccessoryMode[2]=Simple Reverse Tethering 12-19 14:39:38.569 11700 11700 W UsbDeviceManager: startAccessoryMode[3]=1.0 12-19 14:39:38.569 11700 11700 W UsbDeviceManager: startAccessoryMode[4]=https://github.com/vvviperrr/SimpleRT 12-19 14:39:38.569 11700 11700 W UsbDeviceManager: startAccessoryMode[5]=10.1.1.5,8.8.8.8 12-19 14:39:38.569 11700 11700 W UsbDeviceManager: startAccessoryMode enableAccessory true,enableAudio false 12-19 14:39:38.569 11700 11700 D UsbDeviceManager: setCurrentFunctions(accessory) 12-19 14:39:38.569 11700 11700 D UsbDeviceManager: isTelephonyAppRunningForeground : tasks isn't avilable 12-19 14:39:38.579 11700 11700 D AndroidRuntime: Shutting down VM 12-19 14:39:38.579 11700 11700 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main 12-19 14:39:38.579 11700 11700 E AndroidRuntime: java.lang.RuntimeException: Failed to start service com.android.server.usb.UsbService$Lifecycle: onStart threw an exception 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:111) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:65) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.server.SystemServer.startOtherServices(SystemServer.java:1858) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.server.SystemServer.run(SystemServer.java:480) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.server.SystemServer.main(SystemServer.java:363) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: Caused by: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at java.util.ArrayList.get(ArrayList.java:308) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.server.usb.UsbDeviceManager.isHiddenMenuAppRunningForeground(UsbDeviceManager.java:1650) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.server.usb.UsbDeviceManager.setCurrentFunctions(UsbDeviceManager.java:1673) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.server.usb.UsbDeviceManager.startAccessoryMode(UsbDeviceManager.java:376) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.server.usb.UsbDeviceManager.<init>(UsbDeviceManager.java:283) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.server.usb.UsbService.<init>(UsbService.java:157) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.server.usb.UsbService$Lifecycle.onStart(UsbService.java:90) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:109) 12-19 14:39:38.579 11700 11700 E AndroidRuntime: ... 7 more The android version used was 6.0.1. After an upgrade of the android version to 7.0.0, we were unable to reproduce the error. But just to be absolutely sure that the error won't appear again in production, we are adding a timeout to ensure that SimpleRT does not interfere with the android boot sequence. Even though, I would prefer to not have to add this timeout. And of course, the best solution would be to understand and fix the error that appeared under android 6.0.1, properly.