Code Monkey home page Code Monkey logo

fastdroid-vnc's Introduction

VNC server for Android
======================

fastdroid-vnc - a fast Android VNC server based on libvncserver.  

Started with original fbvncserver for the iPAQ and Zaurus.
	http://fbvncserver.sourceforge.net/

Modified by Jim Huang <[email protected]>
	- Simplified and sizing down
	- Performance tweaks

Modified by Steve Guo (letsgoustc)
 	- Added keyboard/pointer input

Modified by Danke Xie ([email protected])
	- Added input device search to support different devices
	- Added kernel vnckbd driver to allow full-keyboard input on 12-key hw
	- Supports Android framebuffer double buffering
	- Performance boost and fix GCC warnings in libvncserver-0.9.7

ANDROID INSTALL
===============

Copy the directory fastdroid-vnc to any Android build directory, run
a build command from Android root
  $ make -j4 fastdroid-vnc

Push the binary to the device
  $ adb push system/bin/fastdroid-vnc /data/
  
Modify file permission and run
  $ adb shell
  # cd /data
  # chmod 777 fastdroid-vnc
  # ./fastdroid-vnc
  

LINUX BUILD
===========
To make a linux build, one can use the linux Makefile instead of the above
Android steps, and the Android makefile Android.mk.

Run make under the fastdroid-vnc directory
  $ make

The executable file fastdroid-vnc will be in the same directory.


INPUT DEVICE CONFIGURATION
==========================

This version of the VNC server can forward input events from the remote VNC viewer 
to Android framework (based on Steve Guo's work). The way it works is converting 
remote VNC inputs to Linux input events and send to the input devices /dev/input/event<N>. 

The input devices used are the keyboard and the touchscreen. Each input device has 
a specific <N> value. The server can automatically detect the <N> value based on the 
name string of the device. Upon execution, it enumerates the input devices under 
/device/input/event<N>, and select the device whose name matches the keywords in 
fbvncserver.c. For example, they keywords are

static const char *KBD_PATTERNS[] = {"VNC", "key", "qwerty", NULL};
static const char *TOUCH_PATTERNS[] = {"touch", "qwerty", NULL};

If an input device contains the strings in KBD_PATTERNS, it will be used to support
keyboard events. The same is true for the touchscreen device with the keyword
strings in TOUCH_PATTERNS. If more than one devices match, then the one matching the 
left-most pattern is used.

If a matching device is not found, then some default input devices will be used. The
user can also specify the keyboard and touchpad devices by the command line:
	
	-k <keyboard-device-path>
	-t <touchscreen-device-path>

To determine which input device is the keyboard/touchscreen, one may make use of the 
information in /proc/bus/input/devices.

PERFORMANCE ENHANCEMENT
=======================

This VNC server is based on libvncserver 0.9.7, but several optimizations
are made in the server to improve the response time to VNC clients, and 
reduced background activity when there is no active clients.

It also supports the double buffering mechanism used by Android. This can 
avoid frame misses found in previous Android framebuffer VNC servers.

fastdroid-vnc's People

Watchers

 avatar

fastdroid-vnc's Issues

Mac VNC client is not able to connect to this vnc server

I have this VNC server running on Android based embedded system. I found it 
works great with RealVNC viewer, but not with Mac VNC Client.

The latest VNC library (0.9.9) seemed to have fixed the issue.

It would be great if this tool is integrated with latest lib.

Thanks
Joe

Original issue reported on code.google.com by [email protected] on 2 May 2013 at 1:37

does it support qvga(240*320) resolution?

What steps will reproduce the problem?
1. connect to fastdroid-vnc server with android device of qvga resolution.
2. display on host vnc server is completely currupted image coming
3. when i change resolution on my device to 32*320 it's working

What is the expected output? What do you see instead?
it should display proper image with 240*320(qvga) resolution..

What version of the product are you using? On what operating system?
fastdroid-vnc-1.0

Please provide any additional information below.


Thanks,
Rammohan

Original issue reported on code.google.com by [email protected] on 30 May 2013 at 12:54

No updates since 2010?

Wondering if this would even work on Android 4.4.2 and new phones like the HTC 
M8, Samsung Galaxy S4, Sony Xperia Z2.

Original issue reported on code.google.com by [email protected] on 15 May 2014 at 4:35

Was not able to work on emulator (windows)

I run the following commands in windows:

emulator -avd myAvd
adb push fastdroid-vnc /data/
adb shell chmod 755 /data/fastdroid-vnc
adb shell /data/fastdroid-vnc

i got 
--------------------------------------------------------------------
Found input device /dev/input/event0 by keyword qwerty
Found input device /dev/input/event0 by keyword qwerty
Initializing framebuffer device /dev/graphics/fb0...
xres=480, yres=800, xresv=480, yresv=1600, xoffs=0, yoffs=0, bpp=16
Initializing keyboard device /dev/input/event0 ...
Initializing touch device /dev/input/event0 ...
Initializing Framebuffer VNC server:
        width:  480
        height: 800
        bpp:    16
        port:   5901
Initializing server...
12/02/2014 09:53:34 Listening for VNC connections on TCP port 5901
WARNING: generic atexit() called from legacy shared library
-------------------------------------------------------------------

Next i run 

telnet localhost 5554
redir add tcp:5900:5901 --> and got ERROR : 


redir add tcp:5900:5901KO: can't setup redirection, port probably used by 
another program on host

I was not able to find/release who hold the port , any help will be appreciate 

thanks 

Original issue reported on code.google.com by [email protected] on 12 Feb 2014 at 10:07

Server Start From Smartphone

Hi,
But i have a question,
Is possible to launch the VNC server from the Smartphone instead of doing by 
the adb shell?

After I start the vnc server from the adb shell, i disconnect the usb cable and 
the server went down.
Any workaround to this? Am I doing something wrong?

I am looking for something like, your smartphone is not attached to any device, 
and you can control from your PC through you wifi home.

Thank you very much
This is a very nice app, go forward!
I was expecting to lunch the vnc server from the smartphone, and i have to do 
using the adb shell.

Original issue reported on code.google.com by hugoinfante83 on 14 Jul 2011 at 8:11

mouse event are not reflecting

What steps will reproduce the problem?
1. run fastdroid vnc through adb shell as per the procedure(on LG P-500)
2. other side windows xp with real vnc viewer
3. We are able to see the screen but not abe to control through mouse events

am i missing some thing?
I have also tried with -k and -t options--> Not working

What is the expected output? What do you see instead?
i am not able to control the touch events 

What version of the product are you using? On what operating system?
android GB -server and Windows xp - client

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 8 Dec 2011 at 4:40

Server shows distorted image on some devices

What steps will reproduce the problem?
1. Download & install the fastdroid-vnc binary on HTC Desire (Android 2.1) 
according to the official instructions on the project page
2. Start the server through adb
3. Connect to the HTC device using TightVNC viewer. The image is distorted 
(example screen shot attached).

What version of the product are you using? On what operating system?
fastdroid-vnc binary which was released (uploaded) on 1 August 2010, target 
devices HTC Desire and Wildfire are running Android 2.1

Please provide any additional information below.

I have tested the binary on HTC Desire and experienced this issue. I reproduced 
it both with TightVNC viewer as well as T-Plan Robot. The server log is:

Found input device /dev/input/event3 by keyword touch
Initializing framebuffer device /dev/graphics/fb0...
xres=480, yres=800, xresv=480, yresv=1600, xoffs=0, yoffs=0, bpp=32
Initializing keyboard device /dev/input/event2 ...
Initializing touch device /dev/input/event3 ...
Initializing Framebuffer VNC server:
        width:  480
        height: 800
        bpp:    32
        port:   5901
Initializing server...
17/11/2010 13:52:48 Listening for VNC connections on TCP port 5901
17/11/2010 13:53:56 Got connection from client 127.0.0.1
17/11/2010 13:53:56   other clients:
17/11/2010 13:53:56 Client Protocol Version 3.3
17/11/2010 13:53:56 Protocol version sent 3.3, using 3.3
17/11/2010 13:53:56 Using raw encoding for client 127.0.0.1
17/11/2010 13:53:56 Pixel format for client 127.0.0.1:
17/11/2010 13:53:56   32 bpp, depth 24, little endian
17/11/2010 13:53:56   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0

I also tried the server on HTC Wildfire. To my surprise it worked correctly but 
the log was a bit different:

Found input device /dev/input/event4 by keyword key
Found input device /dev/input/event3 by keyword touch
Initializing framebuffer device /dev/graphics/fb0...
xres=240, yres=320, xresv=240, yresv=640, xoffs=0, yoffs=320, bpp=16
Initializing keyboard device /dev/input/event4 ...
Initializing touch device /dev/input/event3 ...
Initializing Framebuffer VNC server:
    width:  240
    height: 320
    bpp:    16
    port:   5901
Initializing server...
17/11/2010 19:53:16 Listening for VNC connections on TCP port 5901
17/11/2010 19:53:20 Got connection from client 192.168.100.4
17/11/2010 19:53:20   other clients:
17/11/2010 19:53:20 Client Protocol Version 3.3
17/11/2010 19:53:20 Protocol version sent 3.3, using 3.3
17/11/2010 19:53:20 Using raw encoding for client 192.168.100.4
17/11/2010 19:53:20 Pixel format for client 192.168.100.4:
17/11/2010 19:53:20   32 bpp, depth 24, little endian
17/11/2010 19:53:20   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0

The difference between these two logs (devices) is that the server starts in 
32bpp mode on HTC Desire (and fails to provide the correct desktop image) while 
it starts in 16-bit color depth on HTC Wildfire (and works properly even if the 
client forces the 32-bit mode through the SetPixelFormat message). Setting of 
the client-sent pixel format to 8-bit or 16-bit depth doesn't help - both modes 
work fine on HTC Wildfire and produce the same distorted image on HTC Desire.

The state of the screen image indicates that the 32-bit image data is 
interpreted as 16-bit one or vice versa. This would explain why the image shows 
objects from the screen but the dimensions, colors and update locations are 
incorrect. Please check whether the data transferred through the 
FrameBufferUpdate message is coded correctly. Another option would be to 
provide a CLI option allowing to force the server to a particular initial color 
depth just like other VNC servers. 

Original issue reported on code.google.com by [email protected] on 17 Nov 2010 at 7:15

Attachments:

patch to allow long-press

Thanks so much for the great software.

On Froyo tablet, fastdroid-vnc does not appear to allow dragging or long-press 
events, only single press.

What steps will reproduce the problem?
1. start fastdroid-vnc
2. attempt to drag an icon or open the status bar
3. will result in a single tap event only

Please see attached a simple patch that allows long press events by letting the 
user hold the left mouse button.  There is probably a better way, but it shows 
the desired effect.  

Original issue reported on code.google.com by [email protected] on 4 Sep 2011 at 8:08

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.