Closed antoine-carat closed 3 years ago
Thanks for the PR, but it does not pass checks. You have to add a sign-off and fix compilation errors.
@antoine-carat
I guess you have to add few more changes in minicap_31.cpp. Like Header files references which got changed in Android 12. and functions names. Changed header files.
Changed in functions:- Android 11 1:- android::DisplayInfo dinfo; err = android::SurfaceComposerClient::getDisplayInfo(dpy, &dinfo);
2:- android::DisplayConfig dconfig; 3:-const android::ui::Size& viewport = dstate.viewport;
Android 12 1:- android::ui::StaticDisplayInfo dinfo; err = android::SurfaceComposerClient::getStaticDisplayInfo(dpy, &dinfo);
2:- android::ui::DisplayMode dconfig; 3:-const android::ui::Size& viewport = dstate.layerStackSpaceRect;
then you will not get compilation errors.
Out of curiosity, what is the need behind using the shared library rather than the apk. Not saying the apk is bullet proof (it's rather new) but it's been made precisely to avoid having to sync with AOSP. I'd like to know, just to be sure where to put the effort.
Hi @pcrepieux I am completely agree what you said but as I convey to you that few users who are using minicap around the world haven't migrated their projects from .so to apk approach.
As if now I guess we have to give the .so solution to users but with statement that in future mincap team will not entertain any update on.so approach. By that time users will migrate their projects to new approach.
Rest is your decision. I can just request☺️.
Unfortunately, compilation errors is a blocker for this PR and https://github.com/DeviceFarmer/minicap/pull/30 comes with a working solution. In any case, thanks a lot @antoine-carat for your suggestion.
@pcrepieux - We also ended up using the APK for our needs, but as we scratched the surface of what the issue was we wanted to give it to the community in case anyone wanted to use the shared libs instead 👍
That's clearly appreciated 👍 I'll just close that one as https://github.com/DeviceFarmer/minicap/pull/30 is now merged.
Anybody change this code about secure flag? /jni/minicap-shared/aosp/src/minicap_31.cpp
// Create virtual display. MCINFO("Creating virtual display"); mVirtualDisplay = android::SurfaceComposerClient::createDisplay( / const String8& displayName / android::String8("minicap"), / bool secure / false // i think the secure flag that have to change true. ); but i could not build for aosp part.
here is my logs
mkdir -p libs/android-31/armeabi-v7a docker run --rm -a stdout -a stderr -v /media/aosp/android-12.0.0_r2:/aosp -v /Users/1004676/stf/minicap/jni/minicap-shared/aosp/:/app -v /Users/1004676/stf/minicap/jni/minicap-shared/aosp/libs/android-31/armeabi-v7a:/artifacts openstf/aosp:jdk8 /aosp.sh build aosp_arm-eng minicap /aosp.sh: line 110: build/envsetup.sh: No such file or directory make: *** [libs/android-31/armeabi-v7a/minicap.so] Error 1
i need help.
The cpp libs would need to be rebuilt and verified