appknox/droid-VNC-server

Can't use the vnc server (Unsupported pixel depth ?)

Closed this issue · 6 comments

Hello,

I'm trying to use the droid-VNC-server on our own android device.
I pushed the libdvnc_flinger_sdk25.so from nativeMethods/libs/armeabi-v7a on /data/local/tmp with one androidvncserver.

When i start the server without param i have :

Initializing grabber method...
No grabber method selected, auto-detecting...
--Loading flinger native lib--
Get ro.build.version.sdk returns 23Try to load lib:/data/local/tmp/libdvnc_flinger_sdk22.so
Couldnt load flinger library /data/local/tmp/libdvnc_flinger_sdk22.so! Error string: (null)
--Loading gralloc native lib--
Loading lib: /data/local/tmp//libdvnc_gralloc_sdk14.so
Couldnt load library /data/local/tmp//libdvnc_gralloc_sdk14.so! Error string: (null)
Loading lib: /data/local/tmp//libdvnc_gralloc_sdk15.so
Couldnt load library /data/local/tmp//libdvnc_gralloc_sdk15.so! Error string: (null)
Loading lib: /data/local/tmp//libdvnc_gralloc_sdk18.so
Couldnt load library /data/local/tmp//libdvnc_gralloc_sdk18.so! Error string: (null)
Loading lib: /data/local/tmp//libdvnc_gralloc_sdk19.so
Couldnt load library /data/local/tmp//libdvnc_gralloc_sdk19.so! Error string: (null)
Loading lib: /data/local/tmp//libdvnc_gralloc_sdk21.so
Couldnt load library /data/local/tmp//libdvnc_gralloc_sdk21.so! Error string: (null)
Loading lib: /data/local/tmp//libdvnc_gralloc_sdk22.so
Couldnt load library /data/local/tmp//libdvnc_gralloc_sdk22.so! Error string: (null)
--Initializing framebuffer access method--
line_lenght=4096 xres=1024, yres=600, xresv=1024, yresv=1800, xoffs=0, yoffs=1200, bpp=32
Initializing virtual keyboard and touch device...
---Initializing uinput...---
Initializing VNC server:
        width:  1024
        height: 600
        bpp:    32
        port:   5901
        Colourmap_rgba=0:8:16:24
        length=8:8:8:8
SEND BUFFER SET 0
08/12/2017 17:15:50 Listening for VNC connections on TCP port 5901
SEND BUFFER SET 0
08/12/2017 17:15:50 Listening for HTTP connections on TCP port 5801
08/12/2017 17:15:50   URL http://localhost:5801
Starting IPC connection...binded to port 13132
sendMsgToGui:~SERVERSTARTED|
Waiting for a connection

With tightvnc i can control the device but i'm not able to see the screen.

When I try to run ./androidvncserver -m flinger, I have :

Flinger display grabber selected
Initializing grabber method...
--Loading flinger native lib--
Get ro.build.version.sdk returns 23Try to load lib:/data/local/tmp/libdvnc_flinger_sdk22.so
Couldnt load flinger library /data/local/tmp/libdvnc_flinger_sdk22.so! Error string: (null)
Initializing virtual keyboard and touch device...
---Initializing uinput...---
Initializing VNC server:
        width:  0
        height: 0
        bpp:    0
        port:   5901
        Colourmap_rgba=0:0:0:0
        length=0:0:0:0
SEND BUFFER SET 0
08/12/2017 17:17:06 Listening for VNC connections on TCP port 5901
SEND BUFFER SET 0
08/12/2017 17:17:06 Listening for HTTP connections on TCP port 5801
08/12/2017 17:17:06   URL http://localhost:5801
Unsupported pixel depth: 0
sendMsgToGui:~SHOW|Unsupported pixel depth, please send bug report.

Cleaning up...
sendMsgToGui:~SERVERSTOPPED|

And it automatically stop...

Did you have an idea of ​​what's going on ?
Thanks in advance

@stranchand it looks like its not able to load the flinger lib file. Can you remove all the flinger libs from the /data/local/tmp folder except the one required for your platform...also try renaming it from libdvnc_flinger_sdkxx.so -> libdvnc_flinger_sdk.so

@stranchand rename /data/local/tmp/libdvnc_flinger_sdk25.so to /data/local/tmp/libdvnc_flinger_sdk22.so

This should work

First, thank you for your replies.

When renaming libdvnc_flinger_sdkxx.so -> /data/local/tmp/libdvnc_flinger_sdk22.so (@subho007 answer) :

Initializing grabber method...
--Loading flinger native lib--
Get ro.build.version.sdk returns 23Try to load lib:/data/local/tmp/libdvnc_flinger_sdk22.so
Couldnt load flinger library /data/local/tmp/libdvnc_flinger_sdk22.so! Error string: (null)
Initializing virtual keyboard and touch device...
---Initializing uinput...---
Initializing VNC server:
        width:  0
        height: 0
        bpp:    0
        port:   5901
        Colourmap_rgba=0:0:0:0
        length=0:0:0:0
SEND BUFFER SET 0
19/12/2017 09:35:12 Listening for VNC connections on TCP port 5901
SEND BUFFER SET 0
19/12/2017 09:35:12 Listening for HTTP connections on TCP port 5801
19/12/2017 09:35:12   URL http://localhost:5801
Unsupported pixel depth: 0
sendMsgToGui:~SHOW|Unsupported pixel depth, please send bug report.

Cleaning up...
sendMsgToGui:~SERVERSTOPPED|

So that's not working

When renaming libdvnc_flinger_sdkxx.so -> /data/local/tmp/libdvnc_flinger_sdk.so (@cosmosgenius answer) :

Initializing grabber method...
No grabber method selected, auto-detecting...
--Loading flinger native lib--
Get ro.build.version.sdk returns 23Try to load lib:/data/local/tmp/libdvnc_flinger_sdk22.so
Couldnt load flinger library /data/local/tmp/libdvnc_flinger_sdk22.so! Error string: (null)
--Loading gralloc native lib--
Loading lib: /data/local/tmp//libdvnc_gralloc_sdk14.so
Couldnt load library /data/local/tmp//libdvnc_gralloc_sdk14.so! Error string: (null)
Loading lib: /data/local/tmp//libdvnc_gralloc_sdk15.so
Couldnt load library /data/local/tmp//libdvnc_gralloc_sdk15.so! Error string: (null)
Loading lib: /data/local/tmp//libdvnc_gralloc_sdk18.so
Couldnt load library /data/local/tmp//libdvnc_gralloc_sdk18.so! Error string: (null)
Loading lib: /data/local/tmp//libdvnc_gralloc_sdk19.so
Couldnt load library /data/local/tmp//libdvnc_gralloc_sdk19.so! Error string: (null)
Loading lib: /data/local/tmp//libdvnc_gralloc_sdk21.so
Couldnt load library /data/local/tmp//libdvnc_gralloc_sdk21.so! Error string: (null)
Loading lib: /data/local/tmp//libdvnc_gralloc_sdk22.so
Couldnt load library /data/local/tmp//libdvnc_gralloc_sdk22.so! Error string: (null)
--Initializing framebuffer access method--
line_lenght=4096 xres=1024, yres=600, xresv=1024, yresv=1800, xoffs=0, yoffs=1200, bpp=32
Initializing virtual keyboard and touch device...
---Initializing uinput...---
Initializing VNC server:
        width:  1024
        height: 600
        bpp:    32
        port:   5901
        Colourmap_rgba=0:8:16:24
        length=8:8:8:8
SEND BUFFER SET 0
19/12/2017 09:37:15 Listening for VNC connections on TCP port 5901
SEND BUFFER SET 0
19/12/2017 09:37:15 Listening for HTTP connections on TCP port 5801
19/12/2017 09:37:15   URL http://localhost:5801
Starting IPC connection...binded to port 13132
sendMsgToGui:~SERVERSTARTED|


Waiting for a connection
SEND BUFFER SET 0
19/12/2017 09:40:43 Got connection from client 10.17.1.126
19/12/2017 09:40:43   other clients:
19/12/2017 09:40:43 Normal socket connection
sendMsgToGui:~CONNECTED|10.17.1.126

19/12/2017 09:40:43 Client Protocol Version 3.8
19/12/2017 09:40:43 Protocol version sent 3.8, using 3.8
19/12/2017 09:40:43 rfbProcessClientSecurityType: executing handler for type 1
19/12/2017 09:40:43 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
19/12/2017 09:40:43 Using image quality level 0 for client 10.17.1.126
19/12/2017 09:40:43 Using JPEG subsampling 1, Q15 for client 10.17.1.126
19/12/2017 09:40:43 Enabling NewFBSize protocol extension for client 10.17.1.126
19/12/2017 09:40:43 Enabling LastRect protocol extension for client 10.17.1.126
19/12/2017 09:40:43 Enabling cursor position updates for client 10.17.1.126
19/12/2017 09:40:43 Enabling full-color cursor updates for client 10.17.1.126
19/12/2017 09:40:43 Using tight encoding for client 10.17.1.126
19/12/2017 09:40:43 Pixel format for client 10.17.1.126:
19/12/2017 09:40:43   32 bpp, depth 24, little endian
19/12/2017 09:40:43   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0

I have the same result as before, I have a black screen and I can control the device..

When I say that "I can control the device but i'm not able to see the screen" / "I have a black screen" I mean :
When I'm connecting with the client I have one frame which does not appear completely, but immediately after clicking on the screen the vcn client loose the video and at this moment I have a black screen forever.

mixaz commented

I would check if files in /data/local/tmp/ have enough permissions. Try to start the vnc server from root user, if you're running it from shell one.
In my case I run libandroidvncserver.so -m flinger and /data/local/tmp/libdvnc_flinger_sdk.so is loaded (also copied it from libdvnc_flinger_sdk25.so). Before that I also had the black screen, and only -m flinger works OK

Also please disable SELinux Policy