You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Minicap getting blocked while capturing images #51
On Tue, Dec 27, 2016 at 23:16 parasharg8 ***@***.***> wrote:
*Phone Details:*
manufacturer: 'Google/Motorola'
model: 'Nexus 6'
version: '7.0'
abi: 'armeabi-v7a'
sdk: '24'
After starting the minicap on the above mentioned device, the minicap is
getting blocked and is not returning any output
*adb shell LD_LIBRARY_PATH=/data/local/tmp/minicap-devel
/data/local/tmp/minicap-devel/minicap -P ***@***.***/0PID:
29358INFO: Using projection ***@***.***/0INFO:
(external/MY_minicap/src/minicap_24.cpp:240) Creating
SurfaceComposerClientINFO: (external/MY_minicap/src/minicap_24.cpp:243)
Performing SurfaceComposerClient init checkINFO:
(external/MY_minicap/src/minicap_24.cpp:250) Creating virtual displayINFO:
(external/MY_minicap/src/minicap_24.cpp:256) Creating buffer queueINFO:
(external/MY_minicap/src/minicap_24.cpp:261) Creating CPU consumerINFO:
(external/MY_minicap/src/minicap_24.cpp:265) Creating frame waiterINFO:
(external/MY_minicap/src/minicap_24.cpp:269) Publishing virtual
displayINFO: (jni/minicap/JpgEncoder.cpp:64) Allocating 11061252 bytes for
JPG encoder*
The minicap will be blocked at this and will not continue.
What could be possible reason for this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#51>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAB-_bV3nJzIlkLAQLki9iFoxtIWlq4Eks5rMR3QgaJpZM4LWTGV>
.
Creating a local forward to connect to the socket using command === adb forward tcp:$(port) localabstract:minicap .
Reading the frames from the socket created on the port used in the command in step 2.
I am facing problem in step 1 itself where while starting minicap, the minicap is getting blocked due to which we are not able to move to step 2.
Please Note : I am facing this issue only on Android 7. Devices on earlier android versions are working fine with the same code and same steps of execution.
If I run the manually command to start the minicap once, then the minicap gets hanged and we are not able to proceed.
But on the other hand if I run the command twice and that too seperately on two different command prompts, then the minicap runs fine on second command prompt.
As we can see from the above mentioned outputs of the minicap startup command that the minicap started successfully in the second attempt while the first attempt continues to block. What can be the possible root cause for this behaviour?
Please Note: The minicap startup command which we are using is adb shell LD_LIBRARY_PATH=/data/local/tmp/minicap-devel /data/local/tmp/minicap-devel/minicap -P 1440x2560@1440x2560/0
@sorccu : Thanks for the advice. We ran the steps as mentioned by you and we are not seeing anything faulty except that I have seen the below line 2-3 times.
**SurfaceFlinger: couldn't log to binary event log: overflow.**
Will this cause any unexpected behavior in minicap?
Are you definitely running stock Android and not a custom build? Also, have
you triple checked that you're using the latest minicap binaries and .so
libs?
On Wed, Dec 28, 2016 at 23:15 parasharg8 ***@***.***> wrote:
@sorccu <https://github.com/sorccu> : Thanks for the advice. We ran the
steps as mentioned by you and we are not seeing anything faulty except that
I have seen the below line 2-3 times.
**SurfaceFlinger: couldn't log to binary event log: overflow.**
Will this cause any unexpected behavior in minicap?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#51 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAB-_QG5gAnFlxoQtg-wgiFC1X35pweCks5rMm7qgaJpZM4LWTGV>
.
Yes I am running stock Android. I updated the Nexus 6 from Android-6 to Android-7 by going to Settings->About Phone-> System Updates.
Also, I have made a fresh clone of the repository and created new minicap binaries. And before pushing the new binaries, I made sure that old binaries are deleted from the device and then only new binaries are pushed into the device
Do you have any suggestion i am still getting this problem?. When i am executing this below command using Java Process API, The Input stream got hanged and execution blocks at BufferedReader.readline().
01-06 14:46:08.236 6064 6067 E BufferQueueProducer: [minicap] dequeueBuffer: BufferQueue has been abandoned
01-06 14:46:08.245 299 299 E SurfaceFlinger: [minicap] advanceFrame: no buffer, bailing out
01-06 14:46:08.245 299 299 E DisplayDevice: [minicap] failed pushing new frame to HWC: -12
I found these on the device logcat. Please have a look.
Your device is weird, I'm afraid I don't have much time to look into this
as my free time is very limited. All Nexus devices should work fine, even
on 7 and 7.1.
Have you tried running using stf? Does it work there?
Another thing I can think of is that maybe your kernel/SELinux is in
restrictive mode. Might be worth trying if you can change it in settings.
You shouldn't need to do that but try anyway.
On Fri, Jan 6, 2017 at 18:40 parasharg8 <notifications@github.com> wrote:
minicap : type=1400 audit(0.0:20): avc: denied { accept } for scontext=u:r🐚s0
tcontext=u:r:adbd:s0 tclass=unix_stream_socket permissive=0
01-06 14:46:08.236 6064 6067 E BufferQueueProducer: [minicap]
dequeueBuffer: BufferQueue has been abandoned
01-06 14:46:08.245 299 299 E SurfaceFlinger: [minicap] advanceFrame: no
buffer, bailing out
01-06 14:46:08.245 299 299 E DisplayDevice: [minicap] failed pushing new
frame to HWC: -12
I found these on the device logcat. Please have a look.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#51 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAB-_VeNEiTRdc1OVSk8JIB40Sq2EeAhks5rPgv5gaJpZM4LWTGV>
.
On some devices, mostly older ones, it can get stuck if you don’t read frames quickly enough. It’ll run out of buffer space and stop. On most devices it simply discards unread frames on pressure.
Activity
sorccu commentedon Dec 27, 2016
parasharg8 commentedon Dec 28, 2016
Yes I am reading the frames from the socket it opens. But the minicap is blocking even before I start reading the frames.
Steps of execution in our code:
Starting minicap using command === adb shell LD_LIBRARY_PATH=/data/local/tmp/minicap-devel /data/local/tmp/minicap-devel/minicap -P 1440x2560@1440x2560/0
Creating a local forward to connect to the socket using command === adb forward tcp:$(port) localabstract:minicap .
Reading the frames from the socket created on the port used in the command in step 2.
I am facing problem in step 1 itself where while starting minicap, the minicap is getting blocked due to which we are not able to move to step 2.
Please Note : I am facing this issue only on Android 7. Devices on earlier android versions are working fine with the same code and same steps of execution.
parasharg8 commentedon Dec 28, 2016
Here is the new finding on this issue.
If I run the manually command to start the minicap once, then the minicap gets hanged and we are not able to proceed.
But on the other hand if I run the command twice and that too seperately on two different command prompts, then the minicap runs fine on second command prompt.
Find below the output of commands run :
The minicap startup command run for first time
The minicap startup command run for second time
As we can see from the above mentioned outputs of the minicap startup command that the minicap started successfully in the second attempt while the first attempt continues to block. What can be the possible root cause for this behaviour?
Please Note: The minicap startup command which we are using is adb shell LD_LIBRARY_PATH=/data/local/tmp/minicap-devel /data/local/tmp/minicap-devel/minicap -P 1440x2560@1440x2560/0
sorccu commentedon Dec 28, 2016
You should check logcat. First, before running anything, clear it:
Then run
(or whatever the windows equivalent might be)
Now run that command again, wait for it to hang, stop logcat and go through the file to see if there's anything interesting in there.
parasharg8 commentedon Dec 28, 2016
@sorccu : Thanks for the advice. We ran the steps as mentioned by you and we are not seeing anything faulty except that I have seen the below line 2-3 times.
Will this cause any unexpected behavior in minicap?
sorccu commentedon Dec 28, 2016
parasharg8 commentedon Dec 28, 2016
Yes I am running stock Android. I updated the Nexus 6 from Android-6 to Android-7 by going to Settings->About Phone-> System Updates.
Also, I have made a fresh clone of the repository and created new minicap binaries. And before pushing the new binaries, I made sure that old binaries are deleted from the device and then only new binaries are pushed into the device
parasharg8 commentedon Jan 6, 2017
Hi
Do you have any suggestion i am still getting this problem?. When i am executing this below command using Java Process API, The Input stream got hanged and execution blocks at BufferedReader.readline().
adb shell LD_LIBRARY_PATH=/data/local/tmp/minicap-devel /data/local/tmp/minicap-devel/minicap -P 1440x2560@1440x2560/0
Hope this will help.
sorccu commentedon Jan 6, 2017
You can't use readLine, there are no lines in the minicap stream.
parasharg8 commentedon Jan 6, 2017
Below is the log related to minicap which i am getting from Logcat.
01-06 12:41:37.555 13864 13864 W minicap : type=1400 audit(0.0:810): avc: denied { accept } for scontext=u:r:shell:s0 tcontext=u:r:adbd:s0 tclass=unix_stream_socket permissive=0
I am executing this command through Java Process Api.
adb -s ZX1G424G66 shell LD_LIBRARY_PATH=/data/local/tmp/minicap-devel /data/local/tmp/minicap-devel/minicap -P 1440x2560@1440x2560/0
Thanks, Do let me know if you found any thing suspicious in this.
parasharg8 commentedon Jan 6, 2017
As of now it appear Minicap is not opening any stream, That is why program execution got hanged even if i read character from stream.
Your thoughts?.
sorccu commentedon Jan 6, 2017
parasharg8 commentedon Jan 6, 2017
Java program run on Computer.
sorccu commentedon Jan 6, 2017
parasharg8 commentedon Jan 6, 2017
minicap : type=1400 audit(0.0:20): avc: denied { accept } for scontext=u:r:shell:s0 tcontext=u:r:adbd:s0 tclass=unix_stream_socket permissive=0
01-06 14:46:08.236 6064 6067 E BufferQueueProducer: [minicap] dequeueBuffer: BufferQueue has been abandoned
01-06 14:46:08.245 299 299 E SurfaceFlinger: [minicap] advanceFrame: no buffer, bailing out
01-06 14:46:08.245 299 299 E DisplayDevice: [minicap] failed pushing new frame to HWC: -12
I found these on the device logcat. Please have a look.
sorccu commentedon Jan 6, 2017
uname commentedon Dec 13, 2018
maybe it's not blocked, try to scroll your screen?
sorccu commentedon Dec 13, 2018
On some devices, mostly older ones, it can get stuck if you don’t read frames quickly enough. It’ll run out of buffer space and stop. On most devices it simply discards unread frames on pressure.