yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] dontfeedphils:
I tried it out earlier today (checked -h and made sure it was v1.32) and it was doing about the same thing as before, about the only thing I noticed that was slightly different was that it seemed slightly quicker (as soon as I would move the cursor in the VNC window the long press menu would appear, as opposed to taking a while).

Like the poster above said though, the keyboard input does work, and in my case it's working for text input as well as navigating some apps with tab, arrows, and enter to select.
[Android Apps and Games] JustusIV:
i appear to still be having click and hold issues with version 1.32

I would love to help if i know what to do.
[Android Apps and Games] knoxbrder:
I'm confused that some of you are getting the click held problem and at least one of you is getting no mouse clicks at all?

These are all Galaxy Nexus?

Running vncs 1.32?

What version of Android? (from the About Phone menu in settings)

What kernel? (from the About Phone menu in settings)

From ADB, what does "which su" show?

With command line something like "vncs -n -t /dev/input/event1"?
[Android Apps and Games] Scotty1:
Galaxy Nexus (Verizon)

vncs 1.32

Android 4.0.2

Kernel 3.0.8-gaaa2611, android-build@apa28 #1

ADB - sorry, not sure how to do this (as I said, new to Android) but if I open superuser, it shows me "Su binary v3.0.3". Is that the info you needed?

When I start the server it shows me:

vncs -P 5901 -p1111 -k input -t /dev/input/event1 -r 0 -m 2 -s -n

All the best!
[Android Apps and Games] JustusIV:
Galaxy Nexus (Verizon)

vncs 1.32

Android 4.0.3

Rom AOKP M3

Kernel 3.0.18-franco.Kernel-nightly-16.2

cmd: /data/data/com.mrk2012.android.preferences/vncs -P 5901 -p pass -k input -t /dev/input/event1 -r 0 -m 1 -s -n -x 720 -y 1280

It does detect the mouse and the proper location. just has a click and hold when it shouldnt.
[Android Apps and Games] dontfeedphils:
Galaxy Nexus (Verizon)

vncs 1.32

Android 4.0.3

Rom AOKP Build 23

Kernel IMO's Leankernel 1.10.0

cmd: system/app/vncs -t /dev/input/event1 -s -n -x 720 -y 1280
[Android Apps and Games] knoxbrder:
OK, so if scotty1 adds the option to force the x and y touch range to the same as the others (720x1280?) then maybe he will get the same behavior. At least then everything would be the same for everyone.

I will be home around 10:15 EST tonight if someone wants to jump on google chat or whatever and we can fix this for you guys.

After tomorrow I won't be able to work on it for a week or so.

PM me if interested.

We can probably do it thru chat without me having access to the actual phone.

I'll probably want you try a couple things and give me the results, try a simple script I'll hack up, and then try a new version.
[Android Apps and Games] JustusIV:
So far i have only been using this on wifi..... would this be possible over LTE?
[Android Apps and Games] knoxbrder:
Thanks to help from JustusIV version 1.33 is in the first post.

Galaxy Nexus pointer should be working now.

It can often be very slow to update the pointer location. I will be working on this in a week or two when I have time.

Turning off the graphics updates (Alt-P) will speed up pointer events when necessary. Alt-P to turn the graphics updates back on again.
[Android Apps and Games] knoxbrder:
To answer the question from JustusIV :

If your carrier supports incoming connections to your device then you should be able to connect to your device over LTE or even GSM.

But not all carriers support this (because of NAT and other issues).

And if you do this you probably want to use SSH to secure the connection because VNC password security is very weak.
[Android Apps and Games] netgear64:
Ok, it says on the GUI:

Starting VNC Server

cmd:/data/data/com.mrk2012.android.preferences/vncs -P 5900 -p -k input -t/dev/input/event1 -r 0 -m 1

VNC Server Started
[Android Apps and Games] Scotty1:
Sorry, didn't see the PM offer until a moment ago. I have just tried 1.33, no joy. But then (after upgrading to 1.33, and testing) I added the x y coordinates, and now it works ! Great job!!! Many thanks !
[Android Apps and Games] knoxbrder:
netgear64:

I have read that Android reserves port 5900.

Try using 5901 or 5902. They have both worked for me. The default in my program is actually 5901.

If the port doesn't fix it, try setting a simple password like "pass" and trying that.

If it still fails, repost the new cmd and any other info you may see.
[Android Apps and Games] dontfeedphils:
Awesome! So far it's working great!

I'm not sure if this is how it works with all phones or devices but with my Galaxy Nexus I have to set the phone to always keep the screen on and not sleep, because as soon as it sleeps it stops working, and if I use the power button to wake it up I can't use the VNC window to unlock the phone. Because of this I end up leaving the phone awake with the display brightness turned all the way down.

I have an idea, but I'm not sure if it's even possible or not. I can use a program that makes it so the phone won't lock, so that would be a work around for the VNC not working on the lock screen, but unless I can't find it, there isn't a way to wake the phone remotely.

The volume and power keys seem to be on event2 and I grabbed info on each button press. Is there any way that this can be worked into the program so the phone can be woken up remotely? Unless this is already possible and I'm just an idiot, and if that's the case then just disregard this whole post....

*Power button press and release*

0000000 5359 0000 e839 0002 0001 0074 0001 0000
0000020 5359 0000 e839 0002 0000 0000 0000 0000
0000040 5359 0000 8880 0004 0001 0074 0000 0000
0000060 5359 0000 8880 0004 0000 0000 0000 0000

*Volume up press and release*

0000100 5382 0000 7105 0006 0001 0073 0001 0000
0000120 5382 0000 7105 0006 0000 0000 0000 0000
0000140 5382 0000 043f 0009 0001 0073 0000 0000
0000160 5382 0000 043f 0009 0000 0000 0000 0000

*Volume down press and release*

0000200 53a4 0000 59f4 0001 0001 0072 0001 0000
0000220 53a4 0000 5a12 0001 0000 0000 0000 0000
0000240 53a4 0000 bc5c 0004 0001 0072 0000 0000
0000260 53a4 0000 bc5c 0004 0000 0000 0000 0000
[Android Apps and Games] knoxbrder:
Good ideas about a way to wake the phones.

I will try to look into those issues next week.

My prime I can wake with a function key and input data on the lock screen so I didn't consider the phones any different.
[Android Apps and Games] droidmarc:
using version 1.33 apk on a galaxy nexus which this release was supposed to help the mouse events. My mouse does not work. What can I do to fix it or to help debug the issue.
[Android Apps and Games] knoxbrder:
- are you rooted?

- with su installed?

- did you specify the arguments/options mentioned earlier in this thread for the galaxy nexus? -x, -y, -n, etc?

If yes to everything then post your command line if running vncs directly or the cmd shown on the start screen if using the GUI.

After tonight, I will be unavailable until mid next week.
[Android Apps and Games] droidmarc:
When I got home i tried everything on my home pc, with wifi and usb Everything works(slow, but works). no wifi at work. Will test more at work tomorow.

thanks!!
[Android Apps and Games] netgear64:
I already used your default port, same result.

For test purposes I never use any passwords, in this case it's irrelevant anyway since the password will be checked after connection.

But I used the viewer always on default ports, maybe I make a mistake on other ports.

I use IP:Port for connection, is that ok?

Thanks for your help
[Android Apps and Games] knoxbrder:
I mentioned trying port 5901 because your example showed 5900 which I don't think will work.

I also mentioned setting a password because your example showed -p which usually only is present if you set a password. Maybe it is a bug. But try setting one to see if that helps.

From a viewer I do something like 192.168.0.4:1 if the port is 5901 and the phones widow address is 192.168.0.4
[Android Apps and Games] netgear64:
Ok, tried it now again on port 5901 and password 12345678,

but as I said the password is never asked for since I get still a connection refused.

I tried IP:1 and IP:5901, same result.

Now it's getting mysterious.

Hope you got another idea what causes that.

With the app in the market I get a connection but only the bootscreen and can't do anything. But at least the connection works.

Before you ask, this app is deinstalled when I try yours.

BTW, with the market app port 5900 is working fine
[Android Apps and Games] kwuddy:
Thanks for this utility. I'm trying to use it on a GeniaTech ATV1000 which is a set-top box running Android 2.3 and has a wand/kb combo for input. I can also plug an ordinary mouse into the box. I have tried various vncs options for input but it seems like a touch-screen of some sort is expected.

With mouse plugged in I have "event0..4", "mice" and "mouse0..2" in /dev/input.

Any help appreciated.
[Android Apps and Games] knoxbrder:
kwuddy:

Sounds like an interesting device.

- so the video and keyboard events are working ok?

- is this a rooted device with busybox installed? (mouse/touch events won't work on a non-rooted device)

- if it is rooted, try running one at a time "od -x /dev/input/eventX" where you try all the options of X that you have; while the od command is running, move the mouse on your "wand" or whatever it is called

- whichever /dev/input/event that spits out a bunch of gibberish is the one you want to specify in vncs

- if it still doesn't work, post a small section (10-20 lines or so) of the gibberish for me to look at

I'm going to try to build a version later this week that allows users to specify their own mouse/touch stream generator that hopefully will allow users to figure out the pointer events on their own. Then they can post little config files that work on various devices for others to use.
[Android Apps and Games] knoxbrder:
netgear64:

I think we need to try just the command line thru adb to see if some error messages are being displayed.

- on your pc: adb push vncs to /data/local/vncs

- on your pc: adb shell

- in the shell: su

- in the shell: cd /data/local/

- in the shell: chmod 777 vncs

- in the shell: ./vncs -P 5901 -t /dev/input/eventX (which ever event you found works)

Any errors?

Try to connect a vnc client. Any messages get printed out at all?

- in the shell: control-c (to kill the server)

- in the shell: logcat

Scroll back and look for any vnc errors or crashes.
[Android Apps and Games] lawboy:
Just wanted to say great work! I am trying to get this up and running with my SGT 7 running CM9 Kang. All is going with the exception of the mouse. I am using tightvnc viewer on the pc and on the device I am setting the touchscreen device to:

/dev/input/event1 -s

I have tried all event1 thru event6

but no joy.

Keyboard input does work though with a few second delay.

I have tried different settings suggested in this post but have been unsuccessful.

What settings do you recommend I try next? What is the eta on the next update?

Thanks
[Android Apps and Games] knoxbrder:
Thanks to a discussion with onaips (the author of the bigger vnc server project for android) I should be able to use some of their code to improve the pointer and keyboard. It should get simpler and faster! Thanks onaips!

Hopefully I can work on it in a few days and get something up during the weekend.
[Android Apps and Games] knoxbrder:
Version 1.40 up in the first post!

** uinput is used to speed up and simplify key/pointer events for all devices (from onaips).

For most devices, specify "uinput" as the keyboard device and it won't matter what the touch device is. You can uncheck the galaxy s2,nexus,x,y hacks as well.

Let me know how it goes!
[Android Apps and Games] kwuddy:
unarying learn

Results of quick test with 1.40...

gfx, updates a little quicker (device controlled via wand),

kb, same, only working reliably in edit box, elsewhere no/v-long response

mouse, no response

# ./vncs -k uinput
Initializing framebuffer device /dev/graphics/fb0...
xres=1200, yres=690, xresv=1200, yresv=1380, xoffs=0, yoffs=0, bpp=32
--Initializing gingerbread access method--
screenshot info: 32 1200 690 3312000
Initializing keyboard device uinput ...
init keyboard device as uinput
---Initializing uinput...---
Initializing touch device /dev/input/event3 ...
Initializing VNC server:
width: 1200
height: 690
bpp: 32
port: 5901
need init
Initializing server...
24/02/2012 08:39:41

I/VNCserver( 617): Initializing framebuffer device /dev/graphics/fb0...
I/VNCserver( 617): xres=1200, yres=690, xresv=1200, yresv=1380, xoffs=0, yoffs=0, bpp=32
I/VNCserver( 617): --Initializing gingerbread access method--
I/VNCserver( 617): screenshot info: 32 1200 690 3312000
I/VNCserver( 617): Initializing keyboard device uinput ...
I/VNCserver( 617): init keyboard device as uinput
I/VNCserver( 617): ---Initializing uinput...---
I/VNCserver( 617): Initializing touch device /dev/input/event3 ...
E/EventHub( 133): could not get driver version for /dev/input/mouse2, Not a typewriter
I/EventHub( 133): New keyboard: device->id=0x20004 devname='qwerty' propName='hw.keyboards.131076.devname' keylayout='/system/usr/keylayout/aml-usbkbd.kl'
I/EventHub( 133): New device: path=/dev/input/event4 name=qwerty id=0x20004 (of 0x5) index=5 fd=174 classes=0x27
I/InputReader( 133): Device reconfigured: id=0x20004, name=qwerty, display size is now 1200x690
I/InputReader( 133): Device added: id=0x20004, name=qwerty, sources=00001303
I/VNCserver( 617): Initializing VNC server:
I/VNCserver( 617):	width: 1200
I/VNCserver( 617):	height: 690
I/VNCserver( 617):	bpp: 32
I/VNCserver( 617):	port: 5901
I/VNCserver( 617): need init
I/VNCserver( 617): Initializing server...
I/InputManager-Callbacks( 133): No input device calibration properties found for device qwerty.
I/InputManager-Callbacks( 133): No virtual keys found for device qwerty.
[Android Apps and Games] BlackPit666:
works a LOT better now, but when i stop the server, my keyboard on the Galaxy nexus screen doesnt show up anymore, i had to reboot
[Android Apps and Games] knoxbrder:
BlackPit666: I probably forgot to reset something when the uinput devices closes; I will look at that tonight

kwuddy: I would really have expected the keyboard to be a LOT faster and work everywhere. And I expected the pointer would probably work as well; but this was not a given. The ods you sent before were not exactly what I needed to get the raw pointer device to work. Try an od again on /dev/input/eventX that worked with the mouse buttons and do a few moves of the wand. Not the mouse/mice files.
[Android Apps and Games] Scotty1:
GN rooted, Android 4.0.4, using tightvnc

Installed server 1.40, unchecked GN tweaks, unchecked xy settings, set kb to uinput. Started server, started tightvnc, screen looked fine (but the swap colors still has to be checked)

1. Clicked on virtual screen. Long delay (3-4 seconds) before I got a response. Maybe no worse than 1.33, but certainly no better. Hope this delay can be shortened.

2. Open an edit box in an app. Clicked in it on the v-screen. Cursor was visible on the phone, but not on the v-screen.

3. Started typing with pc kb. Under 1.33, my phone's kb (swiftkeyX) would appear. Under 1.40, only the top row was displayed (the "suggestions" row of the kb).

4. No text appeared in the edit box (neither phone, nor v-screen). BUT as soon as I mouse-clicked in the edit box on the v-screen, all the keystrokes immediately appeared on the phone & v-screen. So it acted as though the keystrokes were cached and, when I clicked in the edit box, the cache contents immediately were pasted....

5. But now my phone kb was hopeless, because I couldn't see any entry keys (touchscreen itself still worked, but only the top suggestions row was visible). Stopping the server didn't help matters. As reported above, I had to reboot the phone to recover the kb.

All the best!

Scotty1
[Android Apps and Games] knoxbrder:
My Prime is 4.0.3 and I would have thought it behaved very similarly to a GN with 4.0.4. But I guess that is not the case.

I will have to try and find someone nearby with a GN since it was a real pain to get the older method of input working remotely.

GN users can change the keyboard device back to what it was before ("input") and it should revert to how it worked in 1.33. Which shouldn't screw up your virtual keyboard.
[Android Apps and Games] Scotty1:
Might the fact that I use swiftkeyX (not the native kb) have anything to do with it? Anyway, just rverted to 1.33 for now. Thanks!
[Android Apps and Games] kwuddy:
od -x /dev/input/event3...

LMB, RMB...

0000000 c6b0 0000 7318 0001 0004 0004 0001 0009
0000020 c6b0 0000 7318 0001 0001 0110 0001 0000
0000040 c6b0 0000 7318 0001 0000 0000 0000 0000
0000060 c6b0 0000 6718 0003 0004 0004 0001 0009
0000100 c6b0 0000 6718 0003 0001 0110 0000 0000
0000120 c6b0 0000 6718 0003 0000 0000 0000 0000
0000140 c6b3 0000 59d8 0000 0004 0004 0002 0009
0000160 c6b3 0000 59d8 0000 0001 0111 0001 0000
0000200 c6b3 0000 59d8 0000 0000 0000 0000 0000
0000220 c6b3 0000 8658 0003 0004 0004 0002 0009
0000240 c6b3 0000 8658 0003 0001 0111 0000 0000
0000260 c6b3 0000 8658 0003 0000 0000 0000 0000

+/-X...

0000000 c54c 0000 ae18 000c 0002 0000 0001 0000
0000020 c54c 0000 ae18 000c 0000 0000 0000 0000
0000040 c54c 0000 cd58 000c 0002 0000 0001 0000
0000060 c54c 0000 cd58 000c 0000 0000 0000 0000
0000100 c54c 0000 ec98 000c 0002 0000 0001 0000
0000120 c54c 0000 ec98 000c 0000 0000 0000 0000
0000140 c54c 0000 0bd8 000d 0002 0000 0001 0000
0000160 c54c 0000 0bd8 000d 0000 0000 0000 0000
0000200 c54c 0000 2b18 000d 0002 0000 0001 0000
0000220 c54c 0000 2b18 000d 0000 0000 0000 0000
0000240 c551 0000 8198 0009 0002 0000 ffff ffff
0000260 c551 0000 8198 0009 0000 0000 0000 0000
0000300 c551 0000 a0d8 0009 0002 0000 ffff ffff
0000320 c551 0000 a0d8 0009 0000 0000 0000 0000
0000340 c551 0000 fe98 0009 0002 0000 ffff ffff
0000360 c551 0000 fe98 0009 0000 0000 0000 0000
0000400 c551 0000 1dd8 000a 0002 0000 ffff ffff
0000420 c551 0000 1dd8 000a 0000 0000 0000 0000

$ ./vncs -t /dev/event3...

Initializing framebuffer device /dev/graphics/fb0...
xres=1200, yres=690, xresv=1200, yresv=1380, xoffs=0, yoffs=690, bpp=32
--Initializing gingerbread access method--
screenshot info: 32 1200 690 3312000
Initializing keyboard device input ...
Initializing touch device /dev/event3 ...
cannot open touch device /dev/event3
[Android Apps and Games] knoxbrder:
kwuddy:

That still doesn't look like enough info for mouse moves.

- try dragging an icon or something around and capture the events

- if it doesn't have a lot more info, try a different /dev/input/event

- I'm sure it doesn't matter yet; but your vncs command line should be /dev/input/eventX (it should match the od command; you are missing part of it)

If we can't get anywhere this way, do you have an sshd on the box? With a hole through your firewall?

Or VNC server on your computer so we can poke around?
[Android Apps and Games] knoxbrder:
scotty1:

I was finally able to reproduce the virtual keyboard not reappearing on my prime when it is undocked. It happens because uinput is simulating a real keyboard so android thinks it doesn't need the virtual one anymore. On my prime I just click the little keyboard in the bar at the bottom of the screen (when an input field has focus) and instead of selecting another input method, I click "off" next to "Use physical keyboard". Since you are on ICS, does your phone have a similar icon? Or is it in settings where you configure input devices?
[Android Apps and Games] knoxbrder:
New version 1.41 up in the first post.

Small fix to skip opening the touch device if using uinput.
[Android Apps and Games] knoxbrder:
kwuddy:

I see the event structure now since it is a relative mode pointer.

So it actually does the correct move/click just really slow?

I will add a command line option to specify event throttling/dropping. It could just be to many events coming thru the vnc connection.

I'll try to put it up tonight.
[Android Apps and Games] Scotty1:
Nope, I don't have such an icon. I'd have to go into Settings to turn off SwiftkeyX

Installed 1.41, turned off GN tweaks etc, set kb to uinput -- behaved the same as 1.40 in terms of kb still appeared (just the top row) and to get the phone to behave, I had to reboot. Was definitely v1.41. Also (I may be imagining this bit) but the mouse click delay seemed worse, if anything. Took (literally) 5 seconds between clicking on the v-screen, and seeing a response....
[Android Apps and Games] knoxbrder:
The skip event code I'll put in tonight may speed up the pointer response. VNC seems to pound the remote device with a lot of events. I had this code in there, but it isn't running with uinput at the moment.

I will have to see if there is some way to tell android to stop using the "physical" keyboard. Removing it doesn't seem to be good enough. Since the prime has an on/off button there must be some way to do it.
[Android Apps and Games] knoxbrder:
New version 1.42.

Try specifying -d on the command line or setting the Delay in the GUI.

I have found 300000 seems to work very nicely on my Galaxy S2.

This makes the pointer and drag events much more responsive. Especially in menus that were very sluggish before.

Let me know how it goes.
[Android Apps and Games] kwuddy:
1.42, still getting long delays, sometimes as long as 20s, -d option did not seem to help. Occasionally responded within a few secs but not repeatedly.
[Android Apps and Games] knoxbrder:
I will send you a message with a debug version later tonight.

Then maybe we can figure out where the delay is.

Did you already try a large range of -d options? I would go by factors of 10 from 1-1000000 or so. 1000000 should be 1 second between events.
[Android Apps and Games] Scotty1:
GN, ICS4.0.4

Bad news (x3): kb set to uinput, but (i) the top row of SwiftkeyX still pops up ;(ii) keystrokes do not appear on the phone until after I have clicked in the edit box, at which point they all appears immediately and (iii) I have to reboot my phone to restore kb function

Good news: set d to 300000, mouse pointer now works beautifully!!

All the best!
[Android Apps and Games] knoxbrder:
So after the first set of bunched up keys appear, and you press some more, you have to click again for the next bunch to appear?

Have you tried a different virtual keyboard?
[Android Apps and Games] rupa:
HP Touchpad and CM9 color issues

1.42 is working great for me on a Galaxy Nexus -- just have to swap red/blue. Unfortunately, my HP Touchpad with CM9 loaded needs more color love.

With swap red/blue off, the black shows as red. red shows as black. blue is yellow. yellow is blue.

With swap red/blue on, black is blue, red is black, and blue looks like a sort of teal color.
[Android Apps and Games] Scotty1:
Correct. Acts as though all keystrokes are cached, then dumped into edit box upon mouse click

Just ran a test. I set the default Android kb to run as default, unchecked "swiftkeyX", & rebooted the phone. Made sure that the default kb was correct (it was) then ran 1.42. Mouse clicks still very nice, but kb gave similar problem to before:

1. This time, the kb did NOT popup when I typed into the v-screen edit box

2. But as before, the keystrokes acted as if cached, & released only when I click in the edit box

3. And as before, the phone's kb was paralyzed; I had to reboot.
[Android Apps and Games] knoxbrder:
rupa: can you confirm that the keyboard events work fine with your GN and using uinput for the keyboard? If so, what Android version is your GN? Scotty1 is having weird keyboard buffering problems and an non-functioning virtual keyboard after using my app. He has 4.0.4 on his GN I believe. If you have 4.0.4, what viewer and host OS are you using?

Did you try the framebuffer option on or off on the Touchpad? I have found all other devices seem to use 32bpp when using the snapshot code and 16bpp when using the framebuffer. Maybe this device is different. I can probably tweak that with some more options if you let me know the results of -f and no -f.