-
Notifications
You must be signed in to change notification settings - Fork 77
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
Vector<> have different types XI AOMI MI_10 MIUI_12 Android 10 (SDK 29) #6
Comments
Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details. |
I managed to make it work on my device(MI CC9 Pro, MIUI 11 20.3.9, Android 10) with one line added to the AOSP code diff --git a/libs/gui/include/gui/LayerState.h b/libs/gui/include/gui/LayerState.h
index f438eb3d0..98490849b 100644
--- a/libs/gui/include/gui/LayerState.h
+++ b/libs/gui/include/gui/LayerState.h
@@ -254,6 +254,7 @@ struct DisplayState {
uint32_t width, height;
+ uint8_t _dummy[16];
status_t write(Parcel& output) const;
status_t read(const Parcel& input);
}; It doesn't matter if the internal layout of this struct is exactly the same with MIUI's, as long as they shared the same size, it should work (of course for MIUI ONLY). |
Well done @dkw72n |
Hi @dkw72n , |
@pcrepieux In the libs/gui/include/gui/LayerState.h file and by added this line
|
@pcrepieux I have build the AOSP by adding the changes suggested by @dkw72n and It's working fine with MIUI 11 and 12. There is an issue it's not generic as suggested by @dkw72n these binaries will be supported only for Xiaomi device having MIUI 11 and 12. Again @dkw72n thanks for your suggestion man. |
@man4567890 I will share the binaries very soon on my git branch. |
@varundtsfi much appreciated! |
Does the aosp for the android system? I don't know where the file is /libs/gui/include/gui/LayerState.h |
Hi @chaooe It's in frameworks/native/include/gui/LayerState.h. and Yes AOSP is android system. |
@varundtsfi sorry, it's not easy to download the AOSP and compline it for me. Could you help to build the minicap.so to me? |
@chaooe I believe you'll find it here https://github.com/varundtsfi/Xiaomi_Vector_issue/tree/main/android-29/arm64-v8a thanks to @varundtsfi |
Thanks, it works. Mi 10 with Android 10. And the MIUI version is 12.08. Will try more Mi device which blocked me before. |
Thanks @varundtsfi , I tried it on a LGE phone, but it still breaks, I guess it only works on Xiaomi
|
Indeed, that likely is devices specific. I wouldn't be surprised that applying the fix suggested by @dkw72n with another array size could make it work but I don't find it would be an appropriate solution. |
@pcrepieux Thank you so much Actually I am building for Android 9 too and soon those will be available on my git. |
I Agreed with you sir but by the time People can resume their work. I think Video streaming would be a good option as I am using scrcpy which is working fine on each and every device. |
Here are the Prebuilt binaries for Android 9 with MIUI 11 and 12 too. |
I have the binaries for LGE SDK 28 (https://github.com/varundtsfi/Xiaomi_Vector_issue) but your device having SDK Level 29 so I need to build for 29 then only it will work and Yes those binaries only for Xiamoi device having Android 9 and 10 or MIUI having 11 or 12. |
Thanks so much @varundtsfi |
Thanks @varundtsfi for your efforts to help users having this issue. |
I just started an experimental branch with the WIP code (mostly a proof of concept for now). Looks OK on pixel 4 running Android11 and a Mi 9 running Android 9 (that one used to have the "Vector<> have different types" error)
Will document this and continue the dev & integration with stf shortly |
it works |
Hi @pcrepieux |
Thanks for the feedbacks @varundtsfi, @ii958 |
@pcrepieux ,could you provide me with the .so files please, I tried to build this, but got a bit confused, so I'm not sure if I have the correct binaries |
@man4567890, there is no more .so files. The following instructions assumes MINICAP_SRC_PATH is the path where you cloned the experimental branch (those are pretty much the same as the original ones here).
You should see your device screen in your browser. |
@varundtsfi |
@pcrepieux @varundtsfi @pcrepieux By the way I had try the 2.60 minicap.apk ,it works fine in other devices but will failed in this device. |
@pcrepieux I also try 2.60, but still got failure for MIUI 11.0.23, has that version fixed the issue which mentioned by @varundtsfi ? |
@EdwardCheck Yes sure I will share the steps very soon just allow me some time. My Laptop got crashed 3 days back because of that I am not able to do anything. |
Is there anything new ? |
I'm having some issues with setting the projection virtual width and height to reduced values from the real width and height using the The normal minicap.so files are not working for this LG V60 ThinQ 5G device with SDK 29. Every version of minicap.so provided doesn't work and results in vector<> errors. This experimental apk successfully streams the screen but not at the requested size. Is this a known issue, or am I missing params or not using the APK correctly? Starting minicap: [ro.product.build.version.incremental]: [2013217264e42]
[ro.product.build.version.release]: [10]
[ro.product.build.version.sdk]: [29]
[ro.product.cpu.abi]: [arm64-v8a] adb.exe -s LMV600TMbc31ad40 shell CLASSPATH=/data/local/tmp/minicap-0.1-debug.apk app_process /system/bin io.devicefarmer.minicap.Main -P 1080x2460@360x820/0
PID: 4120
Listening on minicap chunk(length=24)
banner {
version: 1,
length: 24,
pid: 26916,
realWidth: 1080,
realHeight: 2460,
virtualWidth: 1080,
virtualHeight: 2460,
orientation: 0,
quirks: 2
}
chunk(length=36544)
headerbyte1(val=1)
headerbyte2(val=10497)
headerbyte3(val=338177)
headerbyte4(val=338177)
body(len=36540)
chunk(length=65495)
body(len=65495)
chunk(length=65536) |
Thanks for giving it a try. This early development might still be buggy. I confirm something's wrong with the projection parameter. Will give it a look. |
is there any method to solve this problem?? |
@pcrepieux |
No, the currently available apk doesn't support "-s" command line parameter. I am coding this feature at the moment so that the apk can replace the binary (hopefully) |
Hi @ZGrauer , If you want to use minicap.so, you can take the vector issue fix binaries from following link. Sorry for the delay https://github.com/varundtsfi/Xiaomi_Vector_issue/tree/main/LG |
Hi @pcrepieux , These day's People are getting more and more vector issue in devices. Previously it was in Xiaomi devices, then later came to know about LG and Now VIVO devices also we are getting the same issue. But Xiaomi Solution will not work in LG and VIVO devices. We have to build required AOSP with proper changes. I have one doubt. How its possible that Xiaomi issue came to other manufacture's . Are they(Xiaomi) sharing their code bese with LG and VIVO. LG and VIVO using Xiaomi graphic library functionalities? I have built the solution for all these manufactures. But Video Streaming(Using MediaProjection) is working fine. |
Hi @varundtsfi I tried this file and I am getting this error,
I am trying to use this file, https://github.com/varundtsfi/Xiaomi_Vector_issue/blob/main/LG/android-29/arm64-v8a/minicap.so |
@varundtsfi that's basically to get rid of all those kind of issues that minicap has been rewritten (see #12) 😉 Now the idea is to have stf using it as a fallback when "legacy" minicap doesn't work (at least for a transition stage, to ensure the new minicap is good enough). But if you using it as a standalone tool, it's supposed to work (I believe so). If not, let me know by creating new issue so that it can be improved. |
@ZGrauer |
@pcrepieux sure I will try this and share the experience. |
I have sent you an email please look into that and share the results. |
The new binary is working perfectly on my LG V60 ThinQ 5G device with SDK 29. Thank you |
wow great. |
Hi @pcrepieux |
Hi @pcrepieux line no 118 :- compress(Bitmap.CompressFormat.JPEG, q, out) |
Hi @pcrepieux Got a way to resolve this problem from SCRCPY, here is a pull request |
Thanks @yusunan for the fix 👍 |
Sorry @varundtsfi I completely missed your previous message. If it's not too late...About MJPEG. |
Hi @pcrepieux |
Hi,
We are facing this issue in Xiaomi MIUI 11 and MIUI 12 too. As per my understanding It's not related with Android Version but related with Xiaomi MIUI Version. Previously it was coming in MIUI 11 but not it's there in 12 too.
I tried to downgrade my xiaomi device from MIUI 11 to MIUI 10 then its started working.
Below is the old reference
(openstf#169)
(#2)
Previously It was coming in LG Got Resolved by @pcrepieux but Same binaries which is working fine for LG devices those are not working in Xiaomi.
In Xiaomi It coming as a black screen.
Device Details:-
[ro.product.model]: [Mi 10]
[ro.build.version.incremental]: [V12.0.2.0.QJBINXM]
[ro.build.version.release]: [10]
[ro.build.version.sdk]: [29]
[ro.build.version.security_patch]: [2020-07-01]
[ro.com.google.gmsversion]: [10_202005]
[ro.miui.ui.version.code]: [10]
[ro.miui.ui.version.name]: [V12]
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:240) Creating SurfaceComposerClient
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:243) Performing SurfaceComposerClient init check
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:254) Creating virtual display
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:260) Creating buffer queue
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:263) Setting buffer options
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:267) Creating CPU consumer
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:271) Creating frame waiter
INFO: (external/MY_minicap/minicap/src/minicap_29.cpp:275) Publishing virtual display
Vector<> have different types (this=0x7fd1f95480, rhs=0x73e7b4e030)
aborted
The text was updated successfully, but these errors were encountered: