You signed in with another tab or window. Reload to refresh your session.You signed out in another
8000
tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @wull8
I am trying to build android-r-preview-2 but initially I am getting below errors.
But once these errors fixed I can come up with some data.If you have any idea why above errors are there then your suggestions are welcome.
@varundtsfi I got it to build on android-r-preview-3 by commenting out the following in external/linux-kselftest/Android.bp and external/seccomp-tests/Android.bp:
@varundtsfi I got it to build on android-r-preview-3 by commenting out the following in external/linux-kselftest/Android.bp and external/seccomp-tests/Android.bp:
@entomber I have build android-r-preview-4 successfully but when I push mimicap in external directory and again build then not getting generated minicap.so file. Do you have any idea...
I managed to build minicap.so with "android-r-preview-4". But when I run it on mobile device, I got below error:
Check error CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": cannot locate symbol "_ZN7android21SurfaceComposerClient17getDisplayConfigsERKNS_2spINS_7IBinderEEEPNS_6VectorINS_11DisplayInfoEEE"
Any idea about this issue ? (I guess android-r-preview-4 still uses "minicap_29.cpp").
I am also getting the same error CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": cannot locate symbol "_ZN7android21SurfaceComposerClient17getDisplayConfigsERKNS_2spINS_7IBinderEEEPNS_6VectorINS_11DisplayInfoEEE" referenced by "/data/local/tmp/minicap.so"...
But I have verified SurfaceComposerClient and ISurfaceComposerClient files in android 10 and 11 both are identical.
Now I will try another approach If I got something I will post immediately over here.
That's a recurring issue. The AOSP source code is currently not fully sync'ed with preview/beta builds. There is only 2 options I can think of with the current codebase:
wait ...
figure out the API change by inspecting the libgui.so and dynamically load and call the new method.
I'll try to look at this issue in the coming days. If I find a way to make it work, I'll keep you posted.
Will check again shortly if the the current AOSP source code can help. The main blocker is that android::SurfaceComposerClient::Transaction::setDisplayProjection(android::sp<android::IBinder> const&, unsigned int, android::Rect const&, android::Rect const&) changed to android::SurfaceComposerClient::Transaction::setDisplayProjection(android::sp<android::IBinder> const&, android::ui::Rotation, android::Rect const&, android::Rect const&)
The unsigned int specifying rotation has become a ui::Rotation. Even knowing that (by comparing screenrecord binary or libgui.so), without the source code, it's a bit hard to fix :-/
I've seen someone commenting, he managed to do it (unfortunately, I don't see this comment anymore). That would be interesting to know which branch/tag from AOSP (or other repo ...??? ... ) has been used.
my code is different from aosp, it can be only used to xiaomi device
maybe the code below can be helpful #include <ui/Rotation.h>
at line 279 t.setDisplayProjection(mVirtualDisplay, android::ui::toRotation(android::DISPLAY_ORIENTATION_0), layerStackRect, visibleRect);
@WeiPeiXian
I agree using this fonction would make it work but where did you get this header file ui/Rotation.h ?
Could you explain how you managed to build minicap-shared ? Maybe I am missing a little something but, while I understand what are the required changes, I couldn't find the required sources to compile it.
Any link, branch name/tag, ... would be appreciated :-)
@pcrepieux
I also can't find Rotation.h at aosp
I use company internal code compilation to build it instead of AOSP
so nothing help can be given to build it on aosp branch
maybe we should wait ... , the beta branch may contains Rotation.h
Which minicap file do you use for android 11?
I used the ones I got by default from building minicap and repaced only minicap.so file that you provided but now I get CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": cannot locate symbol "_ZN7android21SurfaceComposerClient22getActiveDisplayConfigERKNS_2spINS_7IBinderEEEPNS_13DisplayConfigE" referenced by "/data/local/tmp/minicap.so"...
I try to use your forked branch to build the library, but the size of the built library is only 2KB, would you please tell me what kind of things missing?
The manifest I used is android-11.0.0_r3.
Hi, @varundtsfi , I'm trying to follow that instruction from @pcrepieux to add the minicap to my LG G7.
Even though I use adb, I'm having a hard time understanding it.
How do I add the minicap to my device? #169
Activity
varundtsfi commentedon Apr 2, 2020
Hi @wull8
I am trying to build android-r-preview-2 but initially I am getting below errors.
But once these errors fixed I can come up with some data.If you have any idea why above errors are there then your suggestions are welcome.
error: external/linux-kselftest/Android.bp:53:13: unrecognized property "arch.mips"
error: external/linux-kselftest/Android.bp:56:15: unrecognized property "arch.mips64"
error: external/seccomp-tests/Android.bp:20:13: unrecognized property "arch.mips"
error: external/seccomp-tests/Android.bp:23:15: unrecognized property "arch.mips64"
repo init -u https://android.googlesource.com/platform/manifest -b android-r-preview-1
My System details :-
Ubuntu 16.04 LTS
Python -3.5.2
Java 1.8
varundtsfi commentedon Apr 7, 2020
I have tried by taking the latest repo
repo init -u https://android.googlesource.com/platform/manifest -b android-r-preview-2
and getting below error.
[100% 268/268] writing build rules ...
FAILED:
build/make/core/base_rules.mk:491: error: overriding commands for target `out/target/product/generic_arm64/system/bin/chattr', previously defined at build/make/core/base_rules.mk:467
18:28:48 ckati failed with: exit status 1
I have put the same logs over google community. If I found something then I will post
entomber commentedon May 6, 2020
@varundtsfi I got it to build on android-r-preview-3 by commenting out the following in external/linux-kselftest/Android.bp and external/seccomp-tests/Android.bp:
Doesn't work with STF though.
varundtsfi commentedon May 21, 2020
Hi @entomber
Due to some other stuffs I was busy but today only I have downloaded the android-r-preview-4. I will build the OS and share the results.
varundtsfi commentedon May 26, 2020
@entomber I have build android-r-preview-4 successfully but when I push mimicap in external directory and again build then not getting generated minicap.so file. Do you have any idea...
wull8 commentedon Jun 11, 2020
@varundtsfi @pcrepieux
Hello all,
Thanks for your information !
I managed to build minicap.so with "android-r-preview-4". But when I run it on mobile device, I got below error:
Check error CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": cannot locate symbol "_ZN7android21SurfaceComposerClient17getDisplayConfigsERKNS_2spINS_7IBinderEEEPNS_6VectorINS_11DisplayInfoEEE"
Any idea about this issue ? (I guess android-r-preview-4 still uses "minicap_29.cpp").
Thanks :)
varundtsfi commentedon Jun 16, 2020
Hi @entomber and @wull8
I am also getting the same error
CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": cannot locate symbol "_ZN7android21SurfaceComposerClient17getDisplayConfigsERKNS_2spINS_7IBinderEEEPNS_6VectorINS_11DisplayInfoEEE" referenced by "/data/local/tmp/minicap.so"...
But I have verified SurfaceComposerClient and ISurfaceComposerClient files in android 10 and 11 both are identical.


Now I will try another approach If I got something I will post immediately over here.
@pcrepieux Any suggestion please.
pcrepieux commentedon Jun 22, 2020
That's a recurring issue. The AOSP source code is currently not fully sync'ed with preview/beta builds. There is only 2 options I can think of with the current codebase:
I'll try to look at this issue in the coming days. If I find a way to make it work, I'll keep you posted.
varundtsfi commentedon Jun 22, 2020
@pcrepieux which file we have to compare.
Dynamically load and call the new method this activity we have done in android 10 support also.
I am working on second option. Whatever would be the output I will post it here.
kotini commentedon Jul 6, 2020
Any update on android 11 support ?
pcrepieux commentedon Jul 7, 2020
Will check again shortly if the the current AOSP source code can help. The main blocker is that
android::SurfaceComposerClient::Transaction::setDisplayProjection(android::sp<android::IBinder> const&, unsigned int, android::Rect const&, android::Rect const&)changed toandroid::SurfaceComposerClient::Transaction::setDisplayProjection(android::sp<android::IBinder> const&, android::ui::Rotation, android::Rect const&, android::Rect const&)The unsigned int specifying rotation has become a ui::Rotation. Even knowing that (by comparing screenrecord binary or libgui.so), without the source code, it's a bit hard to fix :-/
I've seen someone commenting, he managed to do it (unfortunately, I don't see this comment anymore). That would be interesting to know which branch/tag from AOSP (or other repo ...??? ... ) has been used.
WeiPeiXian commentedon Jul 8, 2020
my code is different from aosp, it can be only used to xiaomi device
maybe the code below can be helpful
#include <ui/Rotation.h>at line 279
t.setDisplayProjection(mVirtualDisplay, android::ui::toRotation(android::DISPLAY_ORIENTATION_0), layerStackRect, visibleRect);in my code , the code of getDisplayinfo method is different from aosp, so i delete my comment, it just can be used to xiaomi device for other device
here is my code, i think only line 279 will be helpful to build minicap.so for to build minicap.so for aosp
https://github.com/WeiPeiXian/minicap/blob/master/jni/minicap-shared/aosp/src/minicap_30.cpp,
pcrepieux commentedon Jul 8, 2020
@WeiPeiXian
I agree using this fonction would make it work but where did you get this header file ui/Rotation.h ?
Could you explain how you managed to build minicap-shared ? Maybe I am missing a little something but, while I understand what are the required changes, I couldn't find the required sources to compile it.
Any link, branch name/tag, ... would be appreciated :-)
WeiPeiXian commentedon Jul 8, 2020
@pcrepieux
I also can't find Rotation.h at aosp
I use company internal code compilation to build it instead of AOSP
so nothing help can be given to build it on aosp branch
maybe we should wait ... , the beta branch may contains Rotation.h
siva-kranthi commentedon Aug 23, 2020
@pcrepieux @wull8 @varundtsfi @entomber @WeiPeiXian
Can you please let me know the steps to build the so files for Android 11 without docker as I have access to the full R code from OEM. Didn't understand much from this https://github.com/openstf/minicap/blob/master/jni/minicap-shared/README.md
pcrepieux commentedon Aug 23, 2020
Here is a comment in an older discussion that will maybe provide you the step you are looking for : #168 (comment)
varundtsfi commentedon Aug 31, 2020
@WeiPeiXian Is it possible that you can share minicap.so files for Android 11 for Xiaomi Devices. Please share if you don't have any issue.
WeiPeiXian commentedon Sep 7, 2020
https://github.com/WeiPeiXian/minicap/tree/master/minicap.so
Here is the minicap.so files for Android 11
best wishes
varundtsfi commentedon Sep 7, 2020
@WeiPeiXian
Thanks for sharing the binaries. I have tested it on Xiaomi Android 11 It's working.
INFO: (packages/apps/SYSOPT/minicap/so/src/minicap_30.cpp:248) Creating SurfaceComposerClient
INFO: (packages/apps/SYSOPT/minicap/so/src/minicap_30.cpp:251) Performing SurfaceComposerClient init check
INFO: (packages/apps/SYSOPT/minicap/so/src/minicap_30.cpp:262) Creating virtual display
INFO: (packages/apps/SYSOPT/minicap/so/src/minicap_30.cpp:268) Creating buffer queue
INFO: (packages/apps/SYSOPT/minicap/so/src/minicap_30.cpp:271) Setting buffer options
INFO: (packages/apps/SYSOPT/minicap/so/src/minicap_30.cpp:275) Creating CPU consumer
INFO: (packages/apps/SYSOPT/minicap/so/src/minicap_30.cpp:279) Creating frame waiter
INFO: (packages/apps/SYSOPT/minicap/so/src/minicap_30.cpp:283) Publishing virtual display BBBB:
INFO: (packages/apps/SYSOPT/minicap/so/src/minicap_30.cpp:289) Starting apply
INFO: (packages/apps/SYSOPT/minicap/so/src/minicap_30.cpp:291) Ending apply
@pcrepieux Here is a good information about these binaries. These binaries are working for Google Pixel 2(Android 11) Also.
Maciejszuchta commentedon Sep 9, 2020
Which minicap file do you use for android 11?
I used the ones I got by default from building minicap and repaced only minicap.so file that you provided but now I get
CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": cannot locate symbol "_ZN7android21SurfaceComposerClient22getActiveDisplayConfigERKNS_2spINS_7IBinderEEEPNS_13DisplayConfigE" referenced by "/data/local/tmp/minicap.so"...PengJunchen commentedon Sep 10, 2020
@WeiPeiXian
I try to use your forked branch to build the library, but the size of the built library is only 2KB, would you please tell me what kind of things missing?
The manifest I used is android-11.0.0_r3.
stoefln commentedon Oct 8, 2020
PengJunchen commentedon Oct 15, 2020
It has been provided in official support: https://github.com/DeviceFarmer/minicap
maykonpacheco commentedon Dec 7, 2022
@pcrepieux, @varundtsfi To make the minicap work, does my cell phone use adb?
varundtsfi commentedon Dec 7, 2022
Yes it does(actually your local system uses to communicate with your device ) To cast the screen from your mobile device to your local system.
It uses adb forward command and many more to get the device details.
maykonpacheco commentedon Dec 7, 2022
Hi, @varundtsfi , I'm trying to follow that instruction from @pcrepieux to add the minicap to my LG G7.

Even though I use adb, I'm having a hard time understanding it.
How do I add the minicap to my device?
#169
varundtsfi commentedon Dec 12, 2022
What is the android version of LG G7 you are using So that I will try to download the aosp to build .