8000 How to build minicap.so for android 11 ? · Issue #208 · openstf/minicap · GitHub
[go: up one dir, main page]

Skip to content

How to build minicap.so for android 11 ? #208

Open

Description

@wull8

Anyone started playing with android 11?

Activity

  1. varundtsfi commented on Apr 2, 2020

    @varundtsfi

    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

  2. varundtsfi commented on Apr 7, 2020

    @varundtsfi

    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

  3. entomber commented on May 6, 2020

    @entomber

    @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:

    /*
        arch: {
            mips: {
                enabled: false,
            },
            mips64: {
                enabled: false,
            },
        },
    */
    

    Doesn't work with STF though.

  4. varundtsfi commented on May 21, 2020

    @varundtsfi

    @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:

    /*
        arch: {
            mips: {
                enabled: false,
            },
            mips64: {
                enabled: false,
            },
        },
    */
    

    Doesn't work with STF though.

    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.

  5. varundtsfi commented on May 26, 2020

    @varundtsfi

    @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...

  6. wull8 commented on Jun 11, 2020

    @wull8
    Author

    @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 :)

  7. varundtsfi commented on Jun 16, 2020

    @varundtsfi

    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.
    Screenshot from 2020-06-16 10-32-52
    Screenshot from 2020-06-16 10-31-51

    Now I will try another approach If I got something I will post immediately over here.

    @pcrepieux Any suggestion please.

  8. pcrepieux commented on Jun 22, 2020

    @pcrepieux
    Contributor

    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.

  9. varundtsfi commented on Jun 22, 2020

    @varundtsfi

    @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.

  10. kotini commented on Jul 6, 2020

    @kotini

    Any update on android 11 support ?

  11. pcrepieux commented on Jul 7, 2020

    @pcrepieux
    Contributor

    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.

  12. WeiPeiXian commented on Jul 8, 2020

    @WeiPeiXian

    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,

  13. pcrepieux commented on Jul 8, 2020

    @pcrepieux
    Contributor

    @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 :-)

  14. WeiPeiXian commented on Jul 8, 2020

    @WeiPeiXian

    @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

  15. siva-kranthi commented on Aug 23, 2020

    @siva-kranthi

    @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

  16. pcrepieux commented on Aug 23, 2020

    @pcrepieux
    Contributor

    Here is a comment in an older discussion that will maybe provide you the step you are looking for : #168 (comment)

  17. varundtsfi commented on Aug 31, 2020

    @varundtsfi

    @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.

  18. WeiPeiXian commented on Sep 7, 2020

    @WeiPeiXian

    https://github.com/WeiPeiXian/minicap/tree/master/minicap.so
    Here is the minicap.so files for Android 11
    best wishes

  19. varundtsfi commented on Sep 7, 2020

    @varundtsfi

    @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.

  20. Maciejszuchta commented on Sep 9, 2020

    @Maciejszuchta

    https://github.com/WeiPeiXian/minicap/tree/master/minicap.so
    Here is the minicap.so files for Android 11
    best wishes

    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"...

  21. PengJunchen commented on Sep 10, 2020

    @PengJunchen

    @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.

  22. stoefln commented on Oct 8, 2020

    @stoefln

    https://github.com/WeiPeiXian/minicap/tree/master/minicap.so
    Here is the minicap.so files for Android 11
    best wishes
    @WeiPeiXian
    I am missing the x86 binary. Would you be able to provide it?

  23. PengJunchen commented on Oct 15, 2020

    @PengJunchen

    https://github.com/WeiPeiXian/minicap/tree/master/minicap.so
    Here is the minicap.so files for Android 11
    best wishes
    @WeiPeiXian
    I am missing the x86 binary. Would you be able to provide it?

    It has been provided in official support: https://github.com/DeviceFarmer/minicap

  24. maykonpacheco commented on Dec 7, 2022

    @maykonpacheco

    @pcrepieux, @varundtsfi To make the minicap work, does my cell phone use adb?

  25. varundtsfi commented on Dec 7, 2022

    @varundtsfi

    @pcrepieux, @varundtsfi To make the minicap work, does my cell phone use adb?
    Hi @maykonpacheco ,

    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.

  26. maykonpacheco commented on Dec 7, 2022

    @maykonpacheco

    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
    image

  27. varundtsfi commented on Dec 12, 2022

    @varundtsfi

    What is the android version of LG G7 you are using So that I will try to download the aosp to build .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0