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

Can I build nativeMethods myself? #141

Open
laowangsir opened this issue Nov 15, 2019 · 7 comments
Open

Can I build nativeMethods myself? #141

laowangsir opened this issue Nov 15, 2019 · 7 comments

Comments

@laowangsir
Copy link

I want to use suface interface in my library file , so I tried to build nativeMethods. But NDK cannot find header files like <gui/SurfaceComposerClient.h> . Is it a android source file or should I download android source and put it into NDK directory? thanks

@mixaz
Copy link

mixaz commented Nov 15, 2019

You need to download AOSP source code and build nativeMethods as AOSP module, as mentioned in readme.

You will need to perform a full AOSP build before trying to build a module.

@laowangsir
Copy link
Author

You need to download AOSP source code and build nativeMethods as AOSP module, as mentioned in readme.

You will need to perform a full AOSP build before trying to build a module.

Thank U . I should have read the doc carefully . BTW do U think it possible to replace Framebuffer with Android screenshot API?

@mixaz
Copy link

mixaz commented Nov 18, 2019

which exactly API do you mean?

@laowangsir
Copy link
Author

The code is found in cmds/screenshot. I want to use it instead of framebuffer. I also have some troubles building nativemethod lib. I cannot find PixelFormatInfo and getPixelFormatInfo

ScreenshotClient screenshot;
.......
base = screenshot.getPixels();

@mixaz
Copy link

mixaz commented Nov 18, 2019

I do not see any cmds/screenshot folder in DroidVNC

@laowangsir
Copy link
Author

It's an android buildin command. I've modified some function in nativemethod/flinger and set the global variable method as FLINGER . So the server is supposed to use ScreenshotClient::getPixels() to grab the screen . But now I have some trouble on the permission

@laowangsir
Copy link
Author

I've assigned READ_FRAME_BUFFER and ACCESS_SURFACE_FLINGER to the apk, but It does not work. Some articles say that ,the apk must be subscribed with cert of the ROM vender! I cannot get that cert .....

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

2 participants