droidVncServer
droidVncServer copied to clipboard
Android 4.3 working but with screen capture weirdness.
I modified flinger.cpp to build against sdk18 and got everything built. It captures the screen, but doesn't properly encode it:
My first guess is that maybe the size of the captured surface doesn't match the reported screen size, if that makes any sense. I've poked around updateScreen.c, adding random constants in various places to see if anything helps, but I feel like I am fumbling around in the dark here. Do you have any ideas about what could be happening?
I am having a similar problem on my Nexus 5 running on 4.4.2. Please fix this. I wish to control my phone via vnc.
My phone has root via SuperSU and busybox. I changed "Display Access Method" and other settings several times, but that was no good. I got the same scrambled screen on Jiayu G4 Advanced (chinese phone) with android 4.2.1. Note: SCR Screen Recorder app works fine to record the screen to an mp4 video file. I would like VNC though!
Just wanted to post an update here since I recently came back to this and figured it out. ScreenshotClient has a "stride" property in addition to width. Stride represents the number of pixels per row of the image. Yeah, it sounds like that should be identical to width, but it isn't in this case. There appears to be some room for overdraw or something.
I did a quick hack fix by changing getWidth() to getStride() in the SurfaceFlinger cature code, however a cleaner fix would probably want to crop the image back down to the "proper" width.
Hi psm14,
Just wondering if you have a working APK for Android 4.3/4.4. I've had the same issues and I'd be thrilled to get VNC working. If you have a branch or a fork of this project please let me know! Looks like the author has abandoned this.
Cheers!
I don't at the moment, but it shouldn't be too difficult to produce a build that works all the way up to 4.4 if I have time.
Hey, I would be interested in fixing that issue, too. Has anyone been successful so far or got a new insight?
Additional info: I'm running v1.1RC0 from the Play Store on i9505 phone with ProBAM ROM 1.2.4 (KitKat-based). There's no image on the VNC viewer but the tap/drag/keyboard events work.
Hi psm14, thanks for documenting the fix, could you provide an apk?
Wow after a long wait a promising note psm14!! Do notify here if you push things to public repo.
Hey psm14, Did you ever get this working with 4.4?
@psm14 found proper fix for 4.3??? how abt it in 4.4?
@psm14 thank you very much!
I have fixed this error in my fork (https://github.com/baohaojun/droidVncServer), and can see correct VNC images.
I didn't get the apk working though, need to start the androidvncserver from adb shell command line, and then use adb forward tcp:5901 tcp:5901. Usb transfer speed is much quicker than wifi I think:D