[NDK App and Java App] Working on a new VNC Server V1.86

Search This thread

Zirias

Senior Member
Aug 6, 2012
113
41
Baden-Baden
sekrit.de
It replaces the symbol __strchr_chk with strchr\0\0\0\0\0\0, to make the linker happy.
It actually makes the binary run on my device (Xiaomi MI3, MIUIv5 / Android 4.2.1). But it's still not working :( It seems to deliver events from the vnc viewer to the device fine (clicks, keypresses), but doesn't show a picture, just a black screen. Any ideas what's wrong here?
 
Oct 3, 2013
9
0
Android VNC server

It actually makes the binary run on my device (Xiaomi MI3, MIUIv5 / Android 4.2.1). But it's still not working :( It seems to deliver events from the vnc viewer to the device fine (clicks, keypresses), but doesn't show a picture, just a black screen. Any ideas what's wrong here?

I am developing one VNC server which can run on any android device. If have any commercial requirement please let me know.

Regards
Zahab

---------- Post added at 08:08 AM ---------- Previous post was at 08:04 AM ----------

I am developing one VNC server which can run on any android device. If have any commercial requirement please let me know.

Regards
Zahab
 

Zirias

Senior Member
Aug 6, 2012
113
41
Baden-Baden
sekrit.de
I am developing one VNC server which can run on any android device. If have any commercial requirement please let me know.

Me personally, I'm only interested in this for private purposes. Is your solution already working or still in development? Open or closed source? And, if the latter, is there a free trial? I'd actually buy a working solution, but given the situation here, I'd be a little worried about compatibility with my device ;)
 
Oct 3, 2013
9
0
accon working with my device in assisted mode

Me personally, I'm only interested in this for private purposes. Is your solution already working or still in development? Open or closed source? And, if the latter, is there a free trial? I'd actually buy a working solution, but given the situation here, I'd be a little worried about compatibility with my device ;)


I tested your apk it is working with my device. I am sure my VNC server will also work with your device. I even played the game from my server device and client device. If you want to buy this solution just let me know.
 

Dhez_in

New member
Oct 30, 2012
3
0
What am I doing wrong?

If I open the application from the terminal. / VncS goes perfectly, but if I open it from the gui does not work, server not running.

In Android 4.2.1 works fine, but in 4.2.2 got this error.....

Code:
u0_a62@android:/data/data/com mrk2012.android.preferences # ./vncs
--Initializing gingerbread access method--
screenshot info: 32 1280 720 3686400
12/11/2013 11:55:35  Listening for VNC connections on TCP port 5901
12/11/2013 11:55:35  Listening for HTTP connections on TCP port 5801
12/11/2013 11:55:35    URL http:  //localhost:5801
 
Oct 3, 2013
9
0
Reply

Give framebuffer method in argument check ./vncs -h for help. and see the argument for framebuffer method.
Hope it will work perfectly all right.

regards
Zahab

What am I doing wrong?

If I open the application from the terminal. / VncS goes perfectly, but if I open it from the gui does not work, server not running.

In Android 4.2.1 works fine, but in 4.2.2 got this error.....

Code:
u0_a62@android:/data/data/com mrk2012.android.preferences # ./vncs
--Initializing gingerbread access method--
screenshot info: 32 1280 720 3686400
12/11/2013 11:55:35  Listening for VNC connections on TCP port 5901
12/11/2013 11:55:35  Listening for HTTP connections on TCP port 5801
12/11/2013 11:55:35    URL http:  //localhost:5801
 

knoxbrder

Senior Member
Jan 10, 2009
338
79
It is kind of late, but I just thought I would make it official.

My old laptop that had the VNC server on it died (a long time ago) and because it was a complicated setup and I didn't have a backup on another machine it is gone.

While I still use VNC at work (Linux/Windows), I think Screen Casting is the future for what I use at home so I am not planning on hacking up another VNC server for Android.

If anyone wants me to delete the binaries because I can not release the hacks to the GPL code, let me know and I will delete them.
I really don't think that it is helpful to delete them, but you guys decide.
 
  • Like
Reactions: courtlandj

mmasco

New member
Apr 26, 2008
2
1
Last version vncs from knoxbrde with "__strchr_chk" patch and 1.87 Java Control App. "Plug n play" apk. :fingers-crossed:
 

Attachments

  • vncs41b.apk
    554.5 KB · Views: 535
Last edited:
  • Like
Reactions: antoniogag

fragtion

Senior Member
Sep 1, 2013
216
67
Johannesburg
Hi guys
I get the following error, and neither the forums or google have brought any aid to the problem :/

/data/data/com.mrk2012.android.preferences # ./vncs
CANNOT LINK EXECUTABLE: cannot locate symbol "_ZN7android18getPixelFormatInfoEiPNS_15PixelFormatInfoE" referenced by "./vncs"...
/data/data/com.mrk2012.android.preferences #

Any idea what this could be, or how to go about fixing it? I'm on 4.4.2, uname 3.4.67 #1 SMP PREEMPT Sat Apr 26 14:47:50 CST 2014 armv7l GNU/Linux
 

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    ** You need to have root to run this app! **

    I have been hacking up a vnc server from old code I found on Google. I will try to get the changes merged into the original project; if that fails I will start a new project or just post the source.
    This one works with my rooted Transformer Prime, a rooted Galaxy S2 and a CyanogenMod Nexus One perfectly. On a non-rooted Galaxy S2 everything works except the mouse/touch.

    This uses the new Screenshot code for Android and either the "uinput" user space input device, the "input" command line tool to send keys, or direct access to the Linux keyboard device. It uses either the "uinput" user space input device if specified for the keyboard or the Linux touch device / mousepad device (like on my Prime).

    I have been pushing the NDK app to /data/local/vncs using adb.
    Open an "adb shell" or local connectbot session. cd /data/local. and then a command like below:

    Try this first:
    ./vncs

    galaxy s2 has no mouse pointer: (touch won't work without root)
    ./vncs -t /dev/input/event2 -s -g -x 480 -y 800

    galaxy nexus has no mouse pointer: (touch won't work without root)
    ./vncs -t /dev/input/event1 -s -n -x ? -y ? (I don't know the values for the nexus touch size or if it auto detects)

    prime with keyboard has visible mouse pointer: (rooted ICS)
    ./vncs -t /dev/input/event5

    prime without keyboard has no mouse pointer: (rooted ICS)
    ./vncs -t /dev/input/event3

    nexus one with cyanogenmod: (rooted Gingerbread)
    ./vncs -t /dev/input/event3

    local Escape key is "back" on remote Android device
    local Windows or Home key is "home" on remote Android device
    local F1 or Menu or Pg-Up key is "menu" on remote Android device
    local F6 key is "camera" on some devices (not all)
    local Pg-Dn key is "call" on some devices (not all)
    local End key is "end call" and/or power on/off
    local Alt-o / Alt-i is "power off/on" on some devices
    local Alt-u is "volume up" on some devices
    local Alt-d is "volume down" on some devices

    Press F2 or Alt-p to pause/resume screen refresh. This is great for watching videos on the TV. If you don't disable the remote refresh then the video will jerk because of the screenshots being taken.
    If you have a Prime with the keyboard then you can use the mouse pointer version and see what you are clicking on even with screen refresh off.

    Press F4 or Alt-r to rotate the screen 90 degrees. 0,90,180,270 then back to 0. The connection disconnects for now so you will need to reconnect again. To keep reconnecting, in a shell on my laptop I use "while :; do vncviewer 192.168.0.5:1; sleep 1; done".

    Press F3 or Alt-s to change the scaling, normal, half, quarter then back to normal. The connection disconnects for now so you will need to reconnect again. To keep reconnecting, in a shell on my laptop I use "while :; do vncviewer 192.168.0.5:1; sleep 1; done".

    Press Alt-q to close the connection from the server side. It can be opened again from the client.

    I haven't tested on many other devices yet. Let me know of failures or successes!

    Command line switches on the server:
    -h show help
    -s swap red/blue colors
    -g galaxy s2 touchscreen
    -n galaxy nexus touchscreen
    -x touchscreen maximim x
    -y touchscreen maximim y
    -r rotate mode 0,1,2,3 = 0,90,180,270 degrees, default is 0
    -T touchscreen pointer rotate offset, 0-3=0,90,180,270, default is 0 (same rotation as screen)
    -m magnification 1/m, 1=fullsize, 2=half size, 4=quarter size
    -t touch device
    -k keyboard device, default is uinput command
    -p : password, default is none
    -d : delay between events, default is 300000
    -P : port, default is 5901
    -32 32bpp; default is 32 for snapshot, 16 for framebuffer
    -16 16bpp; default is 32 for snapshot, 16 for framebuffer
    -o hack to send touch events on non-rooted device
    -c red offset, red length, green offset, green length, blue offset, blue length; defaults 16,8,8,8,8,0
    -R connect to remote host:remote port
    -a average when scaling (slower but better looking)
    -C reconnect to listener if connection dropped

    Version 1.86

    ---------------------------------------
    Version 1.86 includes many new features such as connect to remote vnc listener, deliver VNC Java client on port 5800+, average pixels when scaling, touchscreen pointer rotation offset and generic color sequence settings (needed for some devices).
    If all connected clients support it then size and rotation are updated without disconnecting the client; if any client doesn't support it, then all clients are disconnected as it worked previously. Normally not a problem since most people only connect to a device with one client at a time.

    Connect to your device from a java enabled web browser with something like http://192.168.0.8:5801 if your normal port is 5901. The downloaded jar supports most things the standalone vnc clients support.

    ---------------------------------------
    Version 1.86 includes a Java Control App as well.
    It has the NDK app included in it so you only need to download the standalone exe if you don't want the Java App. The Java App extracts the NDK App when it runs and keeps it in its own Android directory structure (not in /data/local anymore).

    The GUI is now compiled for Android 2.2+ and now includes two desktop widgets: 1x1 and 4x1 and an option to turn on a notification that shows the current server status and a start/stop button. Notification icon and widgets change icon to give visual indication when the server is running.

    Custom Launchers and other apps can call activities to start/stop the server.
    Tasker Action Intent setup:
    Action: com.mrk2012.android.preferences.START (or STOP)
    Cat: Launcher
    Target: Broadcast Receiver

    For instance, I have my phone setup to start the server when I place it in the dock or connect power.

    I found/fixed a small bug with the refresh code, hopefully that will a) keep the widgets/notifications updating unless you stopped them from the menu and b) fix the "VNCPrefs has Stopped" display.

    ** You need to have root to run this app! **

    You can configure everything from the Java GUI. Check out the About/Help menu option to see the list of special keys and their functions.
    Also look in the Help section for a quick guide on how to configure the options for different types of devices. Post if you find some more working or not working devices.

    ---------------------------------------
    Todo:
    + done: scale viewer
    + done: switch between portrait/landscape in viewer
    + done: launch/control from gui
    + create generic option for specifying pointer setup so anyone can add a new device (superseded by using uinput)
    + fix input on undocked Prime (fixed with uinput)
    + add a way to start/stop the server from an email, sms or google voice
    + http server/applet
    - upgrade to latest vnc server library/applet
    - ctrl key (for connectbot mainly)

    Prime specifc keys:
    - page up/down keys
    - home/end keys
    - insert/delete keys
    - media/volume keys
    - other prime hard keys: wireless/mouse/bluetooth/contrast/camera/etc
    2
    Useful program, working well in my s2.
    Anybody knows a way or apk to turn on screen without press any key?? From vncviewer for example..


    Thanks

    local End key is "end call" and/or power on/off
    local Alt-o / Alt-i is "power off/on" on some devices
    2
    If you JB guys want to try this one let me know.
    May need cleanup before general use; just tried removing the _client lib.

    Need to rename vncs.apk to just vncs if you want to run it from the Android command line.
    (I can't seem to upload it as just vncs anymore)

    Please let me know if it works on JB.

    I'm available anytime :good:
    2
    Great. Thanks for the info.

    I will build a GUI version that has the old and new version of vncs in it so everyone can use it.

    I'm also working on compiling for x86; maybe we can give that a go in the new year.


    Hi, i can confirm this works on 4.2.1

    My devics is asus tf101 running eos4 previewB94(20121221) android 4.2.1

    //this the first time I run this app, so just want to let you know it works

    Happy holidays and thank you.
    =========================
    u0_a36@android:/data/local # ./vncs-4.1
    --Initializing gingerbread access method--
    screenshot info: 32 1280 800 4096000
    27/12/2012 13:03:29 Listening for VNC connections on TCP port 5901
    27/12/2012 13:03:29 Listening for HTTP connections on TCP port 5801
    27/12/2012 13:03:29 URL http://localhost:5801
    27/12/2012 13:03:50 Got connection from client 192.168.1.118
    27/12/2012 13:03:50 other clients:
    27/12/2012 13:03:50 Client Protocol Version 3.7
    27/12/2012 13:03:50 Protocol version sent 3.7, using 3.7
    27/12/2012 13:03:50 rfbProcessClientSecurityType: executing handler for type 1
    27/12/2012 13:03:50 Pixel format for client 192.168.1.118:
    27/12/2012 13:03:50 16 bpp, depth 16, little endian
    27/12/2012 13:03:50 true colour: max r 31 g 63 b 31, shift r 11 g 5 b 0
    27/12/2012 13:03:50 Enabling NewFBSize protocol extension for client 192.168.1.118
    27/12/2012 13:03:50 Using ZRLE encoding for client 192.168.1.118
    key: 0x9e 0 0
    ========
    2
    Version 1.60 in this post

    Version 1.60 in this post.

    Lots of new features! If it seems stable I will move it to the first post.

    new vncs command line options:
    -a averages a 2x2 section of pixels in half and quarter zoom (maybe 4x4 in quarter mode later)
    -R host: port (no space between host , : and port) to connect to a host running vncviewer in listen mode (usually -listen on the vncviewer command line).

    new gui options:
    Use Average in zoom modes. (compare the original.png and averaged.png images)
    Connect to remote viewer in listen mode.
    Show Configure Notification.
    Show Start/Stop Notification. Includes status of server: not running or running and PID if running.
    Notification Refresh Time (5,10,15,30,60 seconds). This is polled for now so I am not sure how this will effect battery life.

    Averaging does slow it down (at least for now). And for now you have to restart the server for the option to take effect.

    On ICS devices (maybe Honeycomb?) the Notifications are shown together since individual buttons in a Notification can launch separate intents. On older devices they are shown as separate Notifications.

    You need to use the GUI if you want the notifications since it creates them, not the command line app.

    The remote host option should allow a cellular device to connect to your home computer since you normally have a non-NAT address at home. (at least you can route a port thru your home firewall). Even if you connect in remote/listen mode you can still connect the normal way if the remote connection closes or fails.

    Let me know how it works!