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

minicap shared library broken on SDK 31 #22

Open
antoine-carat opened this issue Aug 26, 2021 · 12 comments
Open

minicap shared library broken on SDK 31 #22

antoine-carat opened this issue Aug 26, 2021 · 12 comments

Comments

@antoine-carat
Copy link

antoine-carat commented Aug 26, 2021

What is the issue or idea you have?

When running the minicap binary on android 12 beta, we get the following error:

CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": cannot locate symbol "_ZN7android21SurfaceComposerClient23getPhysicalDisplayTokenEm" referenced by "/data/local/tmp/minicap.so"

I had a look into the libgui.so library and the signature of the function is now the following:

android::SurfaceComposerClient::getPhysicalDisplayToken(android::PhysicalDisplayId)

The current minicap_30.cpp is using a int32_t instead of the PhysicalDisplayId type.

Have you tried STF?

@huakaijian
Copy link

What is the issue or idea you have?

When running the minicap binary on android 12 beta, we get the following error:

CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": cannot locate symbol "_ZN7android21SurfaceComposerClient23getPhysicalDisplayTokenEm" referenced by "/data/local/tmp/minicap.so"

I had a look into the libgui.so library and the signature of the function is now the following:

android::SurfaceComposerClient::getPhysicalDisplayToken(android::PhysicalDisplayId)

The current minicap_30.cpp is using a int32_t instead of the PhysicalDisplayId type.

Have you tried STF?

I got the same problem, did you solve it? it seems only support andorid-30 now.

@varundtsfi
Copy link
Collaborator

varundtsfi commented Sep 3, 2021

Hi @huakaijian Which one you have build android beta 1,2,3 or 4? Or you are just copied android 30 Binary in android-31 folder .

@varundtsfi
Copy link
Collaborator

What is the issue or idea you have?

When running the minicap binary on android 12 beta, we get the following error:

CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": cannot locate symbol "_ZN7android21SurfaceComposerClient23getPhysicalDisplayTokenEm" referenced by "/data/local/tmp/minicap.so"

I had a look into the libgui.so library and the signature of the function is now the following:

android::SurfaceComposerClient::getPhysicalDisplayToken(android::PhysicalDisplayId)

The current minicap_30.cpp is using a int32_t instead of the PhysicalDisplayId type.

Have you tried STF?

Hi @antoine-carat
Have you resolved the following issue and successfully generate the mincap.so for android 12 SDK 31?
The current minicap_30.cpp is using a int32_t instead of the PhysicalDisplayId type.

If yes can you share that if possible.

1 similar comment
@varundtsfi
Copy link
Collaborator

What is the issue or idea you have?

When running the minicap binary on android 12 beta, we get the following error:

CANNOT LINK EXECUTABLE "/data/local/tmp/minicap": cannot locate symbol "_ZN7android21SurfaceComposerClient23getPhysicalDisplayTokenEm" referenced by "/data/local/tmp/minicap.so"

I had a look into the libgui.so library and the signature of the function is now the following:

android::SurfaceComposerClient::getPhysicalDisplayToken(android::PhysicalDisplayId)

The current minicap_30.cpp is using a int32_t instead of the PhysicalDisplayId type.

Have you tried STF?

Hi @antoine-carat
Have you resolved the following issue and successfully generate the mincap.so for android 12 SDK 31?
The current minicap_30.cpp is using a int32_t instead of the PhysicalDisplayId type.

If yes can you share that if possible.

@varundtsfi
Copy link
Collaborator

#27

@antoine-carat
Copy link
Author

Hi @varundtsfi, @huakaijian

We moved from this to the Kotlin app for our needs as re-compiling the .cpp libs seemed to have too much overhead.
However, I can share a PR with the potential changes and you can try it yourself.

@antoine-carat
Copy link
Author

Changes would look like this #29

@varundtsfi
Copy link
Collaborator

varundtsfi commented Oct 11, 2021

@antoine-carat thanks for you prompt reply.

I have done the same changes and previously we were using below function in android 11.

int minicap_try_get_display_info(Int32_t displayId, Minicap::DisplayInfo* info);
Use of
Int32_t displayId=0;
if (!minicap_try_get_display_info(displayId, &fbInfo))

In Android 12 displayId is became android::PhysicalDisplayId displayId*.

Now the problem is how to create an object of android::PhysicalDisplayId displayId
int minicap_try_get_display_info(android::PhysicalDisplayId displayId, Minicap::DisplayInfo* info);
From outside Its not allowing to create an object of PhysicalDisplayid

Its asking for the reference means header file.

if (!minicap_try_get_display_info(android::PhysicalDisplayId displayId, &fbInfo))
Have any idea,

If am not passing the display id then not getting the &info
android::SurfaceComposerClient::getDisplayInfo(dpy, &dinfo);

@JesseCodeBones
Copy link

JesseCodeBones commented Oct 12, 2021

@varundtsfi
I am using:
android::SurfaceComposerClient::getPhysicalDisplayToken(android::PhysicalDisplayId(displayId))
passed the compile, checking now

@JesseCodeBones
Copy link

@varundtsfi @antoine-carat @huakaijian
I can build the so and can run it in Android 12 now, here is PR:
#30
but Android 12 forbide to create secure vitual display by non-system process, so only un-secure vitual display available now:
https://cs.android.com/android/platform/superproject/+/android-12.0.0_r2:frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp

@varundtsfi
Copy link
Collaborator

Hi @JesseCodeBones
Yes I have tried your changes which is working fine. I need to validate on secure displays. I can push the minicap.so binaries in your PR.

@varundtsfi
Copy link
Collaborator

varundtsfi commented Oct 12, 2021

PhysicalDisplayId

Here only I was doing mistake. Thank you so much @JesseCodeBones .

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

No branches or pull requests

4 participants