Can not display device screen in stf and which causes device can't be used unless you restart your device on Samsung Galaxy Note II (model GT_n7108)
Hi all,
I have a device which can be recognised by stf. But when I choose it to use , it can't display device screen in control tab. On the same time I can't do any action in my device. I attached logs, please help for this.
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] Setting frame producer projection to 430x491
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] Requesting frame producer to start
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] Launching screen service
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] minicap says: "PID: 4555"
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] Connecting to minicap service
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] minicap says: "INFO: Using projection 720x1280@276x491/0"
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] minicap says: "INFO: (external/MY_minicap/src/minicap_19.cpp:255) Creating SurfaceComposerClient"
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] minicap says: "INFO: (external/MY_minicap/src/minicap_19.cpp:258) Performing SurfaceComposerClient init check"
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] minicap says: "INFO: (external/MY_minicap/src/minicap_19.cpp:265) Creating virtual display"
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] Disconnecting from minicap service
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] Stopping minicap service
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] Sending SIGTERM to minicap
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] minicap says: "INFO: (jni/minicap/minicap.cpp:196) Received SIGTERM, stopping"
INF/device:plugins:screen:stream 24617 [4df7015a2a2f3081] Sending SIGKILL to minicap
FTL/device:plugins:screen:stream 24617 [4df7015a2a2f3081] Frame producer had an error FailError: Failure: 'closed'
at /usr/local/lib/node_modules/stf/node_modules/adbkit/lib/adb/parser.js:226:31
From previous event:
at Parser.readError (/usr/local/lib/node_modules/stf/node_modules/adbkit/lib/adb/parser.js:225:31)
at /usr/local/lib/node_modules/stf/node_modules/adbkit/lib/adb/command/host-transport/local.js:25:35
From previous event:
at LocalCommand.execute (/usr/local/lib/node_modules/stf/node_modules/adbkit/lib/adb/command/host-transport/local.js:19:39)
at /usr/local/lib/node_modules/stf/node_modules/adbkit/lib/adb/client.js:311:44
From previous event:
at Client.openLocal (/usr/local/lib/node_modules/stf/node_modules/adbkit/lib/adb/client.js:310:37)
at tryConnect (/usr/local/lib/node_modules/stf/lib/units/device/plugins/screen/stream.js:274:20)
at /usr/local/lib/node_modules/stf/lib/units/device/plugins/screen/stream.js:283:26
at processImmediate [as _immediateCallback] (timers.js:358:17)
FTL/util:lifecycle 24617 [4df7015a2a2f3081] Shutting down due to fatal error
INF/provider 24289 [*] Cleaning up device worker "4df7015a2a2f3081"
ERR/provider 24289 [*] Device worker "4df7015a2a2f3081" died with code 1
INF/provider 24289 [*] Restarting device worker "4df7015a2a2f3081"
INF/device:support:push 24660 [4df7015a2a2f3081] Sending output to "tcp://127.0.0.1:7116"
INF/device 24660 [4df7015a2a2f3081] Preparing device
INF/device:support:sub 24660 [4df7015a2a2f3081] Receiving input from "tcp://127.0.0.1:7114"
INF/device:support:sub 24660 [4df7015a2a2f3081] Subscribing to permanent channel "*ALL"
^CINF/util:lifecycle 24287 [proc002] Winding down for graceful exit
INF/cli:local 24280 [*] Received SIGINT, waiting for processes to terminate
INF/util:lifecycle 24660 [4df7015a2a2f3081] Winding down for graceful exit
INF/util:lifecycle 24292 [*] Winding down for graceful exit
INF/util:lifecycle 24290 [*] Winding down for graceful exit
INF/util:lifecycle 24291 [*] Winding down for graceful exit
INF/util:lifecycle 24289 [*] Winding down for graceful exit
INF/util:lifecycle 24288 [reaper001] Winding down for graceful exit
INF/util:lifecycle 24285 [dev001] Winding down for graceful exit
INF/util:lifecycle 24284 [app001] Winding down for graceful exit
INF/auth-mock 24290 [*] Waiting for client connections to end
INF/util:lifecycle 24286 [proc001] Winding down for graceful exit
WRN/db 24291 [*] Connection closed
WRN/db 24292 [*] Connection closed
INF/db 24291 [*] Connecting to 127.0.0.1:28015
INF/db 24292 [*] Connecting to 127.0.0.1:28015
INF/util:lifecycle 24287 [proc002] Winding down for graceful exit
INF/util:lifecycle 24286 [proc001] Winding down for graceful exit
WRN/db 24288 [reaper001] Connection closed
WRN/db 24290 [*] Connection closed
INF/db 24290 [*] Connecting to 127.0.0.1:28015
INF/db 24288 [reaper001] Connecting to 127.0.0.1:28015
INF/provider 24289 [*] Device worker "4df7015a2a2f3081" stopped cleanly
INF/provider 24289 [*] Gracefully killing device worker "4df7015a2a2f3081"
WRN/db 24286 [proc001] Connection closed
WRN/db 24287 [proc002] Connection closed
INF/db 24286 [proc001] Connecting to 127.0.0.1:28015
INF/db 24287 [proc002] Connecting to 127.0.0.1:28015
^CINF/util:lifecycle 24289 [*] Winding down for graceful exit
INF/cli:local 24280 [*] Received SIGINT, waiting for processes to terminate
INF/util:lifecycle 24289 [*] Winding down for graceful exit
^CINF/util:lifecycle 24289 [*] Winding down for graceful exit
INF/cli:local 24280 [*] Received SIGINT, waiting for processes to terminate
INF/util:lifecycle 24289 [*] Winding down for graceful exit
^CINF/util:lifecycle 24289 [*] Winding down for graceful exit
INF/cli:local 24280 [*] Received SIGINT, waiting for processes to terminate
INF/util:lifecycle 24289 [*] Winding down for graceful exit
^CINF/cli:local 24280 [*] Received SIGINT, waiting for processes to terminate
INF/util:lifecycle 24289 [*] Winding down for graceful exit
INF/util:lifecycle 24289 [*] Winding down for graceful exit
c^CINF/util:lifecycle 24289 [*] Winding down for graceful exit
INF/cli:local 24280 [*] Received SIGINT, waiting for processes to terminate
INF/util:lifecycle 24289 [*] Winding down for graceful exit
^CINF/util:lifecycle 24289 [*] Winding down for graceful exit
INF/cli:local 24280 [*] Received SIGINT, waiting for processes to terminate
INF/util:lifecycle 24289 [*] Winding down for graceful exit
ERR/provider 24289 [*] Device worker "4df7015a2a2f3081" did not stop in time: operation timed out
INF/provider 24289 [*] Device worker "4df7015a2a2f3081" has retired
Not all devices work. It's hard to say if this is one of those cases, it could be due to many other reasons as well, such as a bad USB connection.
Please update the ticket with the exact model number of your device. You can get the necessary details by running adb devices -l.
We most likely don't have the device so we can't test it. If you'd like us to look into it, considering becoming a hardware sponsor.
I used Samsung Note II, sorry for that missing. I look at the codes /usr/local/lib/node_modules/stf/lib/units/device/plugins/screen/stream.js:283:26, it may related to connect to minicap service timeout. Can you give some guidance for that? Which condition will causes connect to minicap service timeout?
I think we had one and it worked fine. Samsung makes many country-specific models and sells them under the same name. Sometimes the differences can be huge. Please give the exact model number as shown by adb devices -l.
@sorccu , model info:4df7015a2a2f3081 device usb:14200000 product:t03gxx model:GT_n7108 device:t03g.
I also found same issue in the list, but that guy doesn't say how he solved. https://github.com/openstf/stf/issues/98
Now you know, minicap doesn't work for all devices, two ways you can choose, one is that you can change the code of minicap and make it to .so, then update your vendor, another way is that you can know which device doesn't support minicap, and when minicap don't work you may change to the screencap, that works but slower than minicap.
Is it possible that the model number could change after reboot the devices? I found this happened but our lab administer said no one had moved those devices.
You mean the model number and not the device serial number, right? The model number is nothing more than a string in build.prop. Personally I've never seen it change, but it is possible for a software update to change it, or to even modify it freely on a rooted phone.
The device serial number, in theory, cannot change. However, sometimes weird things happen. We had this one Disney-branded device that would sometimes give 1234567890ADCDEF as its serial number early in the boot process (but still connected to adb). After it got a bit further, it showed the actual serial number. This stopped happening after a while, though, so I think a software update may have resolved the issue.
We also had a dirty cheap $50 phone that had the serial number permanently set to 1234567890ADCDEF. We never plugged it in to the system.