Quote:
Originally Posted by vdp
@mdp: BTW, did you encounter any problems when building bVNC? [...]
|
Hi vdp, well met. Actually, I did not build it from source. When you do not need extensive work, it is much more efficient to operate on the dalvik itself ( `
apktool -d ...`, patch resources and/or smali, `
apktool -b ...`).
When you want to check what was updated, you may use `
diff` (on the desktop, `
meld`) over the decoded (through apktool) packages, "before- and after the cure".
I am attaching here the extra code / the modifications I made to
/com/iiordanov/freebVNC/input/RemoteVncPointer.smali
(
As you will see, inside method processPointerEvent(IIIIZZZZI)Z , between it seems line 226 and line 228, I retrieved pointer x, y, framebuffer width and height and I called a new method isTapOnCorners(IIII)V , which checks if the tap occurred within 100px of any corner and if so calls another new method doEpdRefresh()V , which verifies that at least 2 seconds have passed since last forced refresh and if so, does the magic - gets the surface object and passes it to the refreshScreen method of the Onyx sdk, which you must add in the smali files tree. )
To change the jpeg and compression parameters was much simpler - just change the values (I cannot find the right file now, it should be related to "tigervnc").
Addendum: if you are not yet comfortable with dalvik/smali, you can compile some java code for Android and check the output smali, and paste it "intelligently" in the actual code you need to patch.
I probably have done it myself with that "if ((x<100 || x>(w-100)) && (y<100 || y>(h-100)))" that becomes those conditionals at the beginning of method "isTapOnCorners", out of sheer laziness...