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

On Android-X86 I get only a black (blank) screen #35

Closed
r3d1r opened this issue Sep 2, 2021 · 10 comments
Closed

On Android-X86 I get only a black (blank) screen #35

r3d1r opened this issue Sep 2, 2021 · 10 comments
Labels
documentation Improvements or additions to documentation

Comments

@r3d1r
Copy link

r3d1r commented Sep 2, 2021

On a Android-X86 ( https://www.android-x86.org ) install I only get a black ( blank ) screen on the VNC viewer.
With Android-X86 anyone can easily run an Android VM on Hyper-V, it´s great for development.
I tried with Android-X86 9 and Android-X86 8.
Currently I am using Android-X86 8 ( https://osdn.net/projects/android-x86/downloads/69704/android-x86_64-8.1-r6.iso )
The mouse works in the viewer, only the screen isn't presented.
I tried with UltraVNC and RealVNC viewers on a Windows 10 with the same results.
Using RealVNC standalone X64 ( https://www.realvnc.com/download/file/viewer.files/VNC-Viewer-6.21.406-Windows-64bit.exe )
Using UltraVNC 1.2.2.4 ( can´t remember where I downloaded it, it was years ago ).
Its easy to reproduce, creating the VM and installing only driodVNC-NG, nothing more.
On the android side, droidVNC-NG seems to be working good, see attached image.
imagem_2021-09-02_093951

@r3d1r r3d1r added the bug Something isn't working label Sep 2, 2021
@bk138
Copy link
Owner

bk138 commented Sep 2, 2021

Thanks for reporting! To rule out an OS issue, please try https://gitlab.com/vijai/screenrecorder and check if it's able to record anything.

@Martii
Copy link

Martii commented Sep 2, 2021

On a Galaxy S8 the device likes to sleep the screen faster than the Android Settings so I have to tap the Home key on a keyboard, type (click technically atm) quickly the pass code, before seeing anything other than a black screen... don't know if this will help or not in an Android emu... might be worth a try though.

@r3d1r
Copy link
Author

r3d1r commented Sep 3, 2021

On a Galaxy S8 the device likes to sleep the screen faster than the Android Settings so I have to tap the Home key on a keyboard, type (click technically atm) quickly the pass code, before seeing anything other than a black screen... don't know if this will help or not in an Android emu... might be worth a try though.

Don't know if I understood what you said, but, HOME key does nothing in the VNC Viewer but it sends the VM to the home screen, sending any app to the background, the expected behavior.
And the screen on the VM is configured to never sleep and it never does...

@r3d1r
Copy link
Author

r3d1r commented Sep 3, 2021

Thanks for reporting! To rule out an OS issue, please try https://gitlab.com/vijai/screenrecorder and check if it's able to record anything.

I recorded a test video but was unable to play it,
Got a "Can't play this video" message.
Then I installed VLC to see if there was an issue with the default player and VLC didn't play the video too.
Tried to record again, then I realized that the recorded files was 0 bytes!
See image:
imagem_2021-09-03_094044

@r3d1r
Copy link
Author

r3d1r commented Sep 3, 2021

I tried a lot of options and almost none worked.
What I remember is that the one that sort of worked out run as root.
Is it possible to run this one as root to test ? How ?

@bk138
Copy link
Owner

bk138 commented Sep 3, 2021

I fear it seems that Android-X86 (or at least your build of it) does not support screen recording via MediaProjection, which is the API https://gitlab.com/vijai/screenrecorder and droidVNC-NG are using. You might want to try the original droidVNC which does things differently and requires root.

@bk138 bk138 added documentation Improvements or additions to documentation and removed bug Something isn't working labels Sep 3, 2021
@bk138 bk138 closed this as completed in a2c39be Sep 3, 2021
@bk138
Copy link
Owner

bk138 commented Sep 3, 2021

@r3d1r
Copy link
Author

r3d1r commented Sep 3, 2021

I fear it seems that Android-X86 (or at least your build of it) does not support screen recording via MediaProjection, which is the API https://gitlab.com/vijai/screenrecorder and droidVNC-NG are using. You might want to try the original droidVNC which does things differently and requires root.

I tried the original droidVNC before asking for help here and the result was that it says Superuser access is granted but didn't load and message "Could not start server :(".
The one that sort of worked, XQ-VNCServer, seems to be an exactly copy with a lot of boring advertising stuff.

Even me being a programmer ( a very old one... ) this is beyond my technical skills, but from what is in https://osdn.net/projects/android-x86/scm/git/frameworks-base/commits/2f9dd0aa805ef1163111b243cc001223681290ca I suppose that MediaProjection was incorporated to Android-X86. Wasn't it ?
Is there a way to trace this ? I would be glad to do it if you send instructions.
Should I ask for help on Android-X86 project ?
Anyway, thanks for your attention!

@bk138
Copy link
Owner

bk138 commented Sep 3, 2021

Even me being a programmer ( a very old one... ) this is beyond my technical skills, but from what is in https://osdn.net/projects/android-x86/scm/git/frameworks-base/commits/2f9dd0aa805ef1163111b243cc001223681290ca I suppose that MediaProjection was incorporated to Android-X86. Wasn't it ?
Is there a way to trace this ? I would be glad to do it if you send instructions.
Should I ask for help on Android-X86 project ?
Anyway, thanks for your attention!

The best thing to do is probably lots of researching and trying out. Maybe this is not supported at all in Android-x86, maybe it depends on build settings (what about the official emulator images, aren't those x86 as well - does screen recording work there?), maybe some special arguments to the API must be used, ...

@csiqueirasilva
Copy link

csiqueirasilva commented May 20, 2023

im running this droidVNC-NG on an android-x86 VM using qemu-kvm on an old Ubuntu 18. The VM has a vga adapter.

With that setup, I can succesfully connect, interact and capture images via TightVNC client or with a c# application using https://github.com/mRemoteNG/VncSharpCore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants