Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android 10 support #190

Merged
merged 4 commits into from
Jan 31, 2020

Conversation

pcrepieux
Copy link
Contributor

Android 10 changed SurfaceComposer API. getBuiltInDisplay has been removed but can be replaced by getPhysicalDisplayToken.
This PR has been built with AOSP tag android-10.0.0_r2 and tested on a Pixel 2 XL running QP1A.190711.020
I kept 2 commits so that you can easily see the difference between minicap_28.cpp and minicap_29.cpp

@pcrepieux pcrepieux changed the title Feature/android 10 support android 10 support Sep 4, 2019
@pcrepieux pcrepieux mentioned this pull request Sep 4, 2019
@sorccu
Copy link
Member

sorccu commented Sep 5, 2019

Thank you @pcrepieux, great work as always. I will look into this after work today.

@sorccu
Copy link
Member

sorccu commented Sep 5, 2019

@pcrepieux, is there an email address I could contact you at?

@pcrepieux
Copy link
Contributor Author

Hi @sorccu, the one I use in my git commits is fine.

@Gerth01
Copy link

Gerth01 commented Oct 3, 2019

Hello,
I am really interested by this feature. Do you think you'll merge this feature soon?
Thanks a lot

@voodik
Copy link

voodik commented Oct 20, 2019

Tested, working! Thanks!

@gassion
Copy link

gassion commented Oct 24, 2019

@pcrepieux Can help to compile the x86 armeabi - v7a added two versions ? Thank you very much.

@Korop
Copy link

Korop commented Oct 30, 2019

@pcrepieux, @sorccu Good news we are looking forward for the merge and new stf docker release :).

@gdbrianlu
Copy link

Tested, working! Thanks!

May I have your complied files?

@gdbrianlu
Copy link

@pcrepieux Can help to compile the x86 armeabi - v7a added two versions ? Thank you very much.

你好,目前android10可以正常使用了吗?

@yimelia
Copy link

yimelia commented Nov 18, 2019

Thanks @pcrepieux
It works on Google Pixel 2, but I update my MI 9 to MIUI 11.0.2(Android 10), got this error:

>adb.exe -P 5037 -s 3fbd7638 shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -i

ERROR: (external/MY_minicap/src/minicap_29.cpp:349: errno: None) SurfaceComposerClient::getDisplayInfo() failed: BAD_VALUE (-22)

ERROR: (jni/minicap/minicap.cpp:174: errno: No such file or directory) Cannot open /dev/graphics/fb0
ERROR: (jni/minicap/minicap.cpp:318: errno: No such file or directory) Unable to get display info

@pcrepieux
Copy link
Contributor Author

Thanks for the feedback @yimelia

Looks like it cannot get a proper display handler. The patch currently calls getPhysicalDisplayToken(int) but there is another way to get it : by using getInternalDisplayToken().

If you know how to compile the lib, you can give it a try. I'll do it anyway but as I only have pixel devices at hand right now, I am not sure I'll be able to reproduce it.

@yimelia
Copy link

yimelia commented Nov 19, 2019

hi @pcrepieux
I try to change this line

android::sp<android::IBinder> dpy = android::SurfaceComposerClient::getPhysicalDisplayToken(displayId);

to

android::sp<android::IBinder> dpy = android::SurfaceComposerClient::getInternalDisplayToken();

But the size of the file I compiled is the same as before, and when I push them into my MI 9, I got the same error.

It seems that the minicap.so/minicap file has not changed(MD5 is the same, too). I am not very familiar with this project. Is there anything I am doing wrong?


update:
I found that I have to recompile minicap-shared, let me have a try...

@pcrepieux
Copy link
Contributor Author

It's hard to say remotely but chances are that you didn't actually compiled minicap-shared. Build instructions are described here. It requires quite some setup but is worth the effort.
Stay tuned, I'll try to find some time to reproduce and fix this issue.

@rpes
Copy link

rpes commented Nov 19, 2019

Is there any chance to provide the prebuilt library for Android 10 in the source tree?

@jupe
Copy link

jupe commented Nov 19, 2019

I think #199 would be the proper way to share prebuilds for testing purpose..

@rpes
Copy link

rpes commented Nov 19, 2019

That would be great. I could help to test it out on Pixel 3XL.

@yimelia
Copy link

yimelia commented Nov 19, 2019

hi @pcrepieux
I modify my jni/minicap-shared/aosp/src/minicap_29.cpp:

int
minicap_try_get_display_info(int32_t displayId, Minicap::DisplayInfo* info) {
    //android::sp<android::IBinder> dpy = android::SurfaceComposerClient::getPhysicalDisplayToken(displayId);
     int32_t test = displayId; // to avoid the warning..
     test = test + 1;
    android::sp<android::IBinder> dpy = android::SurfaceComposerClient::getInternalDisplayToken();

then I compiled the jni/minicap-shared/aosp/libs/android-29/arm64-v8a/minicap.so file based on this document.
And try these things:

  • adb push libs/arm64-v8a/minicap /data/local/tmp/ ( this minicap file is the same as before)
  • adb push minicap.so /data/local/tmp/ (this minicap.so is in my new aosp/libs/android-29/arm64-v8a/minicap.so)
  • adb shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -P 1080x1920@1080x1920/0 -t
    then got this:
PID: 15447
INFO: Using projection 1080x1920@1080x1920/0
INFO: (external/MY_minicap/src/minicap_29.cpp:241) Creating SurfaceComposerClien
t
INFO: (external/MY_minicap/src/minicap_29.cpp:244) Performing SurfaceComposerCli
ent init check
INFO: (external/MY_minicap/src/minicap_29.cpp:255) Creating virtual display
INFO: (external/MY_minicap/src/minicap_29.cpp:261) Creating buffer queue
INFO: (external/MY_minicap/src/minicap_29.cpp:264) Setting buffer options
INFO: (external/MY_minicap/src/minicap_29.cpp:268) Creating CPU consumer
INFO: (external/MY_minicap/src/minicap_29.cpp:272) Creating frame waiter
INFO: (external/MY_minicap/src/minicap_29.cpp:276) Publishing virtual display
Vector<> have different types (this=0x7ffb8f4af0, rhs=0x7ffb8f4c40)
Aborted

@rpes
Copy link

rpes commented Nov 19, 2019

I may have found an additional issue. We wrap minicap in our framework. When the screen gets rotated we restart it. This works great up to SDK 28:

ADB/MiniCap: Starting a new minicap shell process as: LD_LIBRARY_PATH=/data/local/tmp/ /data/local/tmp//minicap -S -P 720x1280@720x1280/0
PID: 11908
INFO: Using projection 720x1280@720x1280/0
INFO: (external/MY_minicap/src/minicap_28.cpp:241) Creating SurfaceComposerClient
INFO: (external/MY_minicap/src/minicap_28.cpp:244) Performing SurfaceComposerClient init check
INFO: (external/MY_minicap/src/minicap_28.cpp:255) Creating virtual display
INFO: (external/MY_minicap/src/minicap_28.cpp:261) Creating buffer queue
INFO: (external/MY_minicap/src/minicap_28.cpp:264) Setting buffer options
INFO: (external/MY_minicap/src/minicap_28.cpp:268) Creating CPU consumer
INFO: (external/MY_minicap/src/minicap_28.cpp:272) Creating frame waiter
INFO: (external/MY_minicap/src/minicap_28.cpp:276) Publishing virtual display
INFO: (jni/minicap/JpgEncoder.cpp:64) Allocating 2766852 bytes for JPG encoder
INFO: (jni/minicap/minicap.cpp:448) New client connection

ADB/MiniCap: The screen orientation changed from 0 to 3
ADB/MiniCap: Starting a new minicap shell process as: LD_LIBRARY_PATH=/data/local/tmp/ /data/local/tmp//minicap -S -P 720x1280@720x1280/270
PID: 11943
INFO: Using projection 720x1280@720x1280/3
INFO: (external/MY_minicap/src/minicap_28.cpp:241) Creating SurfaceComposerClient
INFO: (external/MY_minicap/src/minicap_28.cpp:244) Performing SurfaceComposerClient init check
INFO: (external/MY_minicap/src/minicap_28.cpp:255) Creating virtual display
INFO: (external/MY_minicap/src/minicap_28.cpp:261) Creating buffer queue
INFO: (external/MY_minicap/src/minicap_28.cpp:264) Setting buffer options
INFO: (external/MY_minicap/src/minicap_28.cpp:268) Creating CPU consumer
INFO: (external/MY_minicap/src/minicap_28.cpp:272) Creating frame waiter
INFO: (external/MY_minicap/src/minicap_28.cpp:276) Publishing virtual display
INFO: (jni/minicap/JpgEncoder.cpp:64) Allocating 2766852 bytes for JPG encoder
INFO: (jni/minicap/minicap.cpp:448) New client connection

I tested out the Android 10 prebuilt library I found here. It works on the first start. When it gets restarted it fails to start properly:

ADB/MiniCap: Starting a new minicap shell process as: LD_LIBRARY_PATH=/data/local/tmp/ /data/local/tmp//minicap -S -P 1440x2960@1440x2960/0
PID: 24959
INFO: Using projection 1440x2960@1440x2960/0
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:252) Creating SurfaceComposerClient
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:255) Performing SurfaceComposerClient init check
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:266) Creating virtual display
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:272) Creating buffer queue
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:275) Setting buffer options
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:279) Creating CPU consumer
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:283) Creating frame waiter
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:287) Publishing virtual display
INFO: (jni/minicap/JpgEncoder.cpp:64) Allocating 12789252 bytes for JPG encoder
INFO: (jni/minicap/minicap.cpp:448) New client connection

ADB/MiniCap: The screen orientation changed from 0 to 1
ADB/MiniCap: Starting a new minicap shell process as: LD_LIBRARY_PATH=/data/local/tmp/ /data/local/tmp//minicap -S -P 1440x2960@1440x2960/90
PID: 24974
INFO: Using projection 1440x2960@1440x2960/1
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:252) Creating SurfaceComposerClient
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:255) Performing SurfaceComposerClient init check
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:266) Creating virtual display
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:272) Creating buffer queue
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:275) Setting buffer options
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:279) Creating CPU consumer
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:283) Creating frame waiter
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:287) Publishing virtual display
INFO: (jni/minicap/JpgEncoder.cpp:64) Allocating 12789252 bytes for JPG encoder
INFO: (external/MY_minicap/src/minicap_qpp4.cpp:301) Destroying virtual display

ADB/MiniCap: Failed to connect to the minicap stream on local port 17192 within the timeout of 25000 ms

It appears that the process fails to clean up ("Destroying virtual display") when it gets killed.

@pcrepieux
Copy link
Contributor Author

pcrepieux commented Nov 19, 2019

@rpes could you provide the steps to reproduce this issue with minicap and provide the device model name ?
Looks fine when running within openstf (at least with 2 different devices I have at hand)
Note that the .so file your using was more a kind of "hack" during the preview period. The latest one is part of this PR here

@rpes
Copy link

rpes commented Nov 20, 2019

We retried with the latest library. It suffers from the same issue. The device is Google Pixel 3XL with Android 10.

It's complicated to provide the steps. We call ADB from Java using the DDMLib library which is part of the Android SDK. Restarting minicap from the CLI seems to work well.

I believe that the problem is in how the process gets terminated. The DDMLib starts a shell command but it doesn't allow to kill it directly. It is only possible to set the "cancel" flag to terminate the blocking call. The actual code that performs this is in the AdbHelper.executeRemoteCommand() method. When the shell command is cancelled (isCancelled() returns true) it simply breaks the blocking loop and closes the socket channel used to communicate with ADB. Unfortunately I have no visibility of whether the ADB back end kills that process properly in response.

For completeness, we can't use "adb shell kill" to kill the process by PID becase of the permissions. We can only use unrooted devices.

The interesting point is that it works fine with minicap up to SDK 28. Is it possible that unlike SDK 29 the process terminates properly or that the restarted process performs better cleanup after the previous one?

@pcrepieux
Copy link
Contributor Author

@rpes could you try to ensure the process get properly killed by your framework (maybe there's a also a behavior change in another component that you use...).
By the way, what "permissions" are you referring to that prevents you from killing the process ? That's supposed to be possible without root privileges.

@chengaomin
Copy link

我按照@pcrepieux 的修改,成功运行了Android10 (oneplus6)
@yimelia 我觉得是小米手机的问题,我的小米6之前是miui10,在原版的STF上没有问题,上周升级到了miui11之后,在原版的STF上就不行了。应该是miui11的问题,可能需要特别为miui11做适配

@shri-0509
Copy link

@koral-- any updates on the merger of this feature..

@gdbrianlu
Copy link

@pcrepieux

  • adb push jni/minicap-shared/aosp/libs/android-29/armeabi-v7a/minicap.so /data/local/tmp/minicap-devel
    adb: error: cannot stat 'jni/minicap-shared/aosp/libs/android-29/armeabi-v7a/minicap.so': No such file or directory

@gdbrianlu
Copy link

@pcrepieux

  • adb push jni/minicap-shared/aosp/libs/android-29/armeabi-v7a/minicap.so /data/local/tmp/minicap-devel
    adb: error: cannot stat 'jni/minicap-shared/aosp/libs/android-29/armeabi-v7a/minicap.so': No such file or directory

I build minicap.so by command as under, now it work normally.
sudo docker run --rm -a stdout -a stderr -v /home/xxxxx/WORKING_DIRECTORY/android-10.0.0_r2:/aosp -v /home/xxxxxx/minicap/jni/minicap-shared/aosp/:/app -v /home/xxxxxx/minicap/jni/minicap-shared/aosp/libs/android-29/armeabi-v7a:/artifacts openstf/aosp:jdk8 /aosp.sh build aosp_arm-eng minicap

@pcrepieux
Copy link
Contributor Author

@gdbrianlu
Glad you managed to get it working. I only have arm64-v8a devices running Android 10. If there is a need for other architectures, this can be added. By the way, what device are you testing on ?

@gdbrianlu
Copy link

@gdbrianlu
Glad you managed to get it working. I only have arm64-v8a devices running Android 10. If there is a need for other architectures, this can be added. By the way, what device are you testing on ?

UNISOC‘s engineering machine

Copy link
Member

@koral-- koral-- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.
LGTM

@yimelia
Copy link

yimelia commented Dec 20, 2019

PID: 15447
INFO: Using projection 1080x1920@1080x1920/0
INFO: (external/MY_minicap/src/minicap_29.cpp:241) Creating SurfaceComposerClien
t
INFO: (external/MY_minicap/src/minicap_29.cpp:244) Performing SurfaceComposerCli
ent init check
INFO: (external/MY_minicap/src/minicap_29.cpp:255) Creating virtual display
INFO: (external/MY_minicap/src/minicap_29.cpp:261) Creating buffer queue
INFO: (external/MY_minicap/src/minicap_29.cpp:264) Setting buffer options
INFO: (external/MY_minicap/src/minicap_29.cpp:268) Creating CPU consumer
INFO: (external/MY_minicap/src/minicap_29.cpp:272) Creating frame waiter
INFO: (external/MY_minicap/src/minicap_29.cpp:276) Publishing virtual display
Vector<> have different types (this=0x7ffb8f4af0, rhs=0x7ffb8f4c40)
Aborted

hi @pcrepieux
this problem is only for MIUI version 11, and this may be a bug in MIUI. I think we can ignore it for now. They might fix it after a while.

@faisal097
Copy link

@gdbrianlu
Glad you managed to get it working. I only have arm64-v8a devices running Android 10. If there is a need for other architectures, this can be added. By the way, what device are you testing on ?

@pcrepieux Can you please provide us binaries for x86_64 architecture.

@varundtsfi
Copy link

PID: 15447
INFO: Using projection 1080x1920@1080x1920/0
INFO: (external/MY_minicap/src/minicap_29.cpp:241) Creating SurfaceComposerClien
t
INFO: (external/MY_minicap/src/minicap_29.cpp:244) Performing SurfaceComposerCli
ent init check
INFO: (external/MY_minicap/src/minicap_29.cpp:255) Creating virtual display
INFO: (external/MY_minicap/src/minicap_29.cpp:261) Creating buffer queue
INFO: (external/MY_minicap/src/minicap_29.cpp:264) Setting buffer options
INFO: (external/MY_minicap/src/minicap_29.cpp:268) Creating CPU consumer
INFO: (external/MY_minicap/src/minicap_29.cpp:272) Creating frame waiter
INFO: (external/MY_minicap/src/minicap_29.cpp:276) Publishing virtual display
Vector<> have different types (this=0x7ffb8f4af0, rhs=0x7ffb8f4c40)
Aborted

hi @pcrepieux
this problem is only for MIUI version 11, and this may be a bug in MIUI. I think we can ignore it for now. They might fix it after a while.

Hi @pcrepieux
Same issue with the LG devices also. Can you please check the below issue.

#169

@pcrepieux
Copy link
Contributor Author

@faisal097
I just put the corresponding minicap-prebuilt package for npm here. It now includes x86 binaries. Please note that I built them in case they might be useful but I didn't test them, so feedback are welcome.

@faisal097
Copy link

@pcrepieux
Thanks a lot for the help, i will test it and let you know the results. You really save us a lot of time.

@yimelia
Copy link

yimelia commented Jan 15, 2020

hi @pcrepieux
when we use Google Pixel 4, we got this error message:

ERROR: (external/MY_minicap/src/minicap_29.cpp:349: errno: None) SurfaceComposerClient::getDisplayInfo() failed: BAD_VALUE (-22)
ERROR: (jni/minicap/minicap.cpp:174: errno: No such file or directory) Cannot open /dev/graphics/fb0
ERROR: (jni/minicap/minicap.cpp:318: errno: No such file or directory) Unable to get display info

do you know how to solve it?

@pcrepieux
Copy link
Contributor Author

@yimelia
Looks weird because I tested on a Pixel 4 and it apparently runs fine. Is there any additional info/context that could help figuring out why you see this ?

@yimelia
Copy link

yimelia commented Jan 15, 2020

@pcrepieux
I can see the screen successfully, but when I use this command:

> adb.exe -P 5037 -s ee24fd7f shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -i

ERROR: (external/MY_minicap/src/minicap_29.cpp:349: errno: None) SurfaceComposer
Client::getDisplayInfo() failed: BAD_VALUE (-22)

ERROR: (jni/minicap/minicap.cpp:174: errno: Permission denied) Cannot open /dev/
graphics/fb0
ERROR: (jni/minicap/minicap.cpp:318: errno: Permission denied) Unable to get dis
play info

my phone is One Plus6, and Pixel 4

@pcrepieux
Copy link
Contributor Author

@yimelia
Just understood what's going on. 0 is not the default display id anymore. Ids are now generated by the SurfaceFlinger. Will fix it soon.

Display ids management changed : 0/1 are not internal/external ids like
they previously were.
@pcrepieux
Copy link
Contributor Author

@yimelia
Prebuilt package whith the fix is available here

@yimelia
Copy link

yimelia commented Jan 19, 2020

hi @pcrepieux
thank you so much! It works fine!

@faisal097
Copy link

@faisal097
I just put the corresponding minicap-prebuilt package for npm here. It now includes x86 binaries. Please note that I built them in case they might be useful but I didn't test them, so feedback are welcome.

@pcrepieux
I tested x86_64 binaries, working fine for me. Thanks.

@koral-- koral-- merged commit 393c6d3 into openstf:master Jan 31, 2020
"version": "2.3.0",
"description": "Prebuilt binaries of minicap.",
"version": "2.3.2",
"description": "Orange prebuilt binaries of minicap for OpenSTF.",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unintended change, see #203

@man4567890
Copy link

hi @pcrepieux , do you know if there is any solution for Android 10 running on a LG phone, I'm getting this
2020-02-19T07:05:46.082Z INF/device:plugins:group 3814 [LMV600TMbdfc7a36] Subscribing to group channel "27wYow6vQ7KHx53MvmzFQw==" 2020-02-19T07:05:46.943Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] Setting frame producer projection to 886x886 2020-02-19T07:05:46.944Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] Requesting frame producer to start 2020-02-19T07:05:46.944Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] Launching screen service 2020-02-19T07:05:47.028Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] minicap says: "PID: 4425" 2020-02-19T07:05:47.029Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] minicap says: "INFO: Using projection 1080x2460@389x886/0" 2020-02-19T07:05:47.029Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] minicap says: "INFO: (external/MY_minicap/src/minicap_29.cpp:241) Creating SurfaceComposerClient" 2020-02-19T07:05:47.030Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] Connecting to minicap service 2020-02-19T07:05:47.032Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] minicap says: "INFO: (external/MY_minicap/src/minicap_29.cpp:244) Performing SurfaceComposerClient init check" 2020-02-19T07:05:47.032Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] minicap says: "INFO: (external/MY_minicap/src/minicap_29.cpp:255) Creating virtual display" 2020-02-19T07:05:47.032Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] minicap says: "INFO: (external/MY_minicap/src/minicap_29.cpp:261) Creating buffer queue" 2020-02-19T07:05:47.032Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] minicap says: "INFO: (external/MY_minicap/src/minicap_29.cpp:264) Setting buffer options" 2020-02-19T07:05:47.032Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] minicap says: "INFO: (external/MY_minicap/src/minicap_29.cpp:268) Creating CPU consumer" 2020-02-19T07:05:47.033Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] minicap says: "INFO: (external/MY_minicap/src/minicap_29.cpp:272) Creating frame waiter" 2020-02-19T07:05:47.034Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] minicap says: "INFO: (external/MY_minicap/src/minicap_29.cpp:276) Publishing virtual display" 2020-02-19T07:05:47.034Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] minicap says: "Vector<> have different types (this=0x7fd288d520, rhs=0x7fd288d670)" 2020-02-19T07:05:47.176Z WRN/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] Shell keeping minicap running ended unexpectedly 2020-02-19T07:05:48.836Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] Disconnecting from minicap service 2020-02-19T07:05:48.837Z INF/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] Stopping minicap service 2020-02-19T07:05:48.838Z FTL/device:plugins:screen:stream 3814 [LMV600TMbdfc7a36] Frame producer had an error FailError: Failure: 'closed' at /usr/lib/node_modules/stf/node_modules/adbkit/lib/adb/parser.js:183:29 at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) 2020-02-19T07:05:48.839Z FTL/util:lifecycle 3814 [LMV600TMbdfc7a36] Shutting down due to fatal error 2020-02-19T07:05:48.845Z INF/provider 22425 [*] Cleaning up device worker "LMV600TMbdfc7a36" 2020-02-19T07:05:48.845Z ERR/provider 22425 [*] Device worker "LMV600TMbdfc7a36" died with code 1 2020-02-19T07:05:48.845Z INF/provider 22425 [*] Restarting device worker "LMV600TMbdfc7a36" 2020-02-19T07:05:49.667Z INF/device:support:push 5873 [LMV600TMbdfc7a36] Sending output to "tcp://127.0.0.1:7116" 2020-02-19T07:05:49.671Z INF/device 5873 [LMV600TMbdfc7a36] Preparing device 2020-02-19T07:05:49.996Z INF/device:support:sub 5873 [LMV600TMbdfc7a36] Receiving input from "tcp://127.0.0.1:7114" 2020-02-19T07:05:49.997Z INF/device:support:sub 5873 [LMV600TMbdfc7a36] Subscribing to permanent channel "*ALL" 2020-02-19T07:05:50.089Z INF/device:support:properties 5873 [LMV600TMbdfc7a36] Loading properties 2020-02-19T07:05:50.162Z INF/device:support:sdk 5873 [LMV600TMbdfc7a36] Supports SDK 29 2020-02-19T07:05:50.162Z INF/device:support:abi 5873 [LMV600TMbdfc7a36] Supports ABIs arm64-v8a, armeabi-v7a, armeabi 2020-02-19T07:05:50.481Z INF/device:resources:minicap 5873 [LMV600TMbdfc7a36] Installing "/usr/lib/node_modules/stf/node_modules/minicap-prebuilt/prebuilt/arm64-v8a/bin/minicap" as "/data/local/tmp/minicap" 2020-02-19T07:05:50.481Z INF/device:resources:minicap 5873 [LMV600TMbdfc7a36] Installing "/usr/lib/node_modules/stf/node_modules/minicap-prebuilt/prebuilt/arm64-v8a/lib/android-29/minicap.so" as "/data/local/tmp/minicap.so" 2020-02-19T07:05:50.768Z INF/device:resources:service 5873 [LMV600TMbdfc7a36] Checking whether we need to install STFService 2020-02-19T07:05:50.840Z INF/device:resources:service 5873 [LMV600TMbdfc7a36] Running version check 2020-02-19T07:05:51.158Z INF/device:resources:service 5873 [LMV600TMbdfc7a36] STFService up to date 2020-02-19T07:05:51.159Z INF/device:plugins:service 5873 [LMV600TMbdfc7a36] Launching agent 2020-02-19T07:05:51.828Z INF/device:plugins:service 5873 [LMV600TMbdfc7a36] Agent says: "Starting minitouch agent" 2020-02-19T07:05:51.828Z INF/device:plugins:service 5873 [LMV600TMbdfc7a36] Agent says: "Listening on @stfagent" 2020-02-19T07:05:51.948Z INF/device:plugins:service 5873 [LMV600TMbdfc7a36] Launching service 2020-02-19T07:05:51.948Z INF/device:plugins:service 5873 [LMV600TMbdfc7a36] using 'start-foreground-service' command for API 29 2020-02-19T07:05:51.953Z INF/device:plugins:service 5873 [LMV600TMbdfc7a36] Agent says: "InputClient started" 2020-02-19T07:05:52.155Z INF/device:plugins:display 5873 [LMV600TMbdfc7a36] Reading display info 2020-02-19T07:05:52.209Z INF/device:plugins:phone 5873 [LMV600TMbdfc7a36] Fetching phone info 2020-02-19T07:05:52.244Z INF/device:plugins:identity 5873 [LMV600TMbdfc7a36] Solving identity 2020-02-19T07:05:52.245Z INF/device:plugins:solo 5873 [LMV600TMbdfc7a36] Subscribing to permanent channel "gxEDQi8nTf7yCJK0p778jgjJPyw=" 2020-02-19T07:05:52.246Z INF/device:plugins:screen:stream 5873 [LMV600TMbdfc7a36] Starting WebSocket server on port 7484 2020-02-19T07:05:52.500Z INF/device:resources:minitouch 5873 [LMV600TMbdfc7a36] Installing "/usr/lib/node_modules/stf/node_modules/minitouch-prebuilt/prebuilt/arm64-v8a/bin/minitouch" as "/data/local/tmp/minitouch" 2020-02-19T07:05:52.671Z WRN/device:plugins:data 5873 [LMV600TMbdfc7a36] Unable to find device data { serial: 'LMV600TMbdfc7a36', platform: 'Android', manufacturer: 'LGE', operator: '', model: 'LM-V600', version: '10', abi: 'arm64-v8a', sdk: '29', product: 'timelm', cpuPlatform: 'kona', openGLESVersion: '3.2', display: { id: 0, width: 1080, height: 2460, xdpi: 397.56500244140625, ydpi: 395.4679870605469, fps: 60.000003814697266, density: 2.625, rotation: 0, secure: true, size: 6.7877773989390615, url: 'ws://10.119.102.86:7484' }, phone: { network: 'UNKNOWN' } } 2020-02-19T07:05:52.674Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] Touch origin is top left 2020-02-19T07:05:52.675Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] Requesting touch consumer to start 2020-02-19T07:05:52.675Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] Launching touch service 2020-02-19T07:05:52.703Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] Connecting to minitouch service 2020-02-19T07:05:52.761Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "open: Permission denied" 2020-02-19T07:05:52.761Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "Unable to open device /dev/input/event7 for inspectionopen: Permission denied" 2020-02-19T07:05:52.762Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "Unable to open device /dev/input/event6 for inspectionopen: Permission denied" 2020-02-19T07:05:52.762Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "Unable to open device /dev/input/event2 for inspectionopen: Permission denied" 2020-02-19T07:05:52.762Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "Unable to open device /dev/input/event5 for inspectionopen: Permission denied" 2020-02-19T07:05:52.762Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "Unable to open device /dev/input/event1 for inspectionopen: Permission denied" 2020-02-19T07:05:52.763Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "Unable to open device /dev/input/mice for inspectionopen: Permission denied" 2020-02-19T07:05:52.763Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "Unable to open device /dev/input/event0 for inspectionopen: Permission denied" 2020-02-19T07:05:52.763Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "Unable to open device /dev/input/event4 for inspectionopen: Permission denied" 2020-02-19T07:05:52.763Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "Unable to open device /dev/input/mouse0 for inspectionopen: Permission denied" 2020-02-19T07:05:52.763Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "Unable to open device /dev/input/event3 for inspectionUnable to find a suitable touch device" 2020-02-19T07:05:52.764Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "using Android InputManager" 2020-02-19T07:05:52.881Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] Reading minitouch banner 2020-02-19T07:05:52.924Z INF/device:plugins:touch 5873 [LMV600TMbdfc7a36] minitouch says: "Connection established" 2020-02-19T07:05:52.930Z INF/device:plugins:vnc 5873 [LMV600TMbdfc7a36] Starting VNC server on port 7486 2020-02-19T07:05:52.932Z INF/device:plugins:browser 5873 [LMV600TMbdfc7a36] Loading browser list 2020-02-19T07:05:52.961Z INF/device:plugins:browser 5873 [LMV600TMbdfc7a36] Updating browser list 2020-02-19T07:05:52.962Z INF/device:plugins:mute 5873 [LMV600TMbdfc7a36] Will not mute master volume 2020-02-19T07:05:53.223Z INF/device:resources:minirev 5873 [LMV600TMbdfc7a36] Installing "/usr/lib/node_modules/stf/vendor/minirev/arm64-v8a/minirev" as "/data/local/tmp/minirev" 2020-02-19T07:05:53.432Z INF/device:plugins:forward 5873 [LMV600TMbdfc7a36] Launching reverse port forwarding service 2020-02-19T07:05:53.460Z INF/device:plugins:forward 5873 [LMV600TMbdfc7a36] Connecting to reverse port forwarding service 2020-02-19T07:05:53.643Z INF/device 5873 [LMV600TMbdfc7a36] Fully operational

Seems to be cause be this minicap says: "Vector<> have different types (this=0x7fd288d520, rhs=0x7fd288d670)"

Any help will be appreciated, please!!

@hnyztang
Copy link

hnyztang commented May 9, 2020

PID: 15447
INFO: Using projection 1080x1920@1080x1920/0
INFO: (external/MY_minicap/src/minicap_29.cpp:241) Creating SurfaceComposerClien
t
INFO: (external/MY_minicap/src/minicap_29.cpp:244) Performing SurfaceComposerCli
ent init check
INFO: (external/MY_minicap/src/minicap_29.cpp:255) Creating virtual display
INFO: (external/MY_minicap/src/minicap_29.cpp:261) Creating buffer queue
INFO: (external/MY_minicap/src/minicap_29.cpp:264) Setting buffer options
INFO: (external/MY_minicap/src/minicap_29.cpp:268) Creating CPU consumer
INFO: (external/MY_minicap/src/minicap_29.cpp:272) Creating frame waiter
INFO: (external/MY_minicap/src/minicap_29.cpp:276) Publishing virtual display
Vector<> have different types (this=0x7ffb8f4af0, rhs=0x7ffb8f4c40)
Aborted

hi @pcrepieux
this problem is only for MIUI version 11, and this may be a bug in MIUI. I think we can ignore it for now. They might fix it after a while.

are u fix this problem?

@pcrepieux
Copy link
Contributor Author

Nope. I managed to overcome this issue on a G6 (API level 28) see here: #169 (comment)
but didn't get it working otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.