Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting androidVNC running on G1... Probably. #2

Closed
GoogleCodeExporter opened this issue May 5, 2015 · 12 comments
Closed

Getting androidVNC running on G1... Probably. #2

GoogleCodeExporter opened this issue May 5, 2015 · 12 comments

Comments

@GoogleCodeExporter
Copy link

Using the following software and versions.
Eclipse ganymede
Subclipse  (be sure to include JavaHL if it's a fresh install)
Android SDK 1.0

Import from SVN source. 
You'll see you get some errors.

Change line 22 of android.androidVNC.VncCanvas.java from:
mbitmap = Bitmap.createBitmap(rfb.framebufferWidth, rfb.framebufferHeight,
false);
To:
mbitmap = Bitmap.createBitmap(mbitmap, rfb.framebufferWidth,
rfb.framebufferHeight, bytesPerPixel, bytesPerPixel, null, false);

I haven't taken the time to understand what that does it's just what
eclipse offers as a solution.

Finally edit the permissions in AndroidManifest.xml.
Add a user permission for android.permission.INTERNET

Original issue reported on code.google.com by XavierBlak@gmail.com on 27 Oct 2008 at 12:32

@GoogleCodeExporter
Copy link
Author

can you provide a working APK for the g1? 

Original comment by tcon...@gmail.com on 29 Oct 2008 at 4:41

@GoogleCodeExporter
Copy link
Author

Sorry. Doesn't look like I can. 

I can get it to to run on my phone by using eclipse but when I generate an apk 
file
that file does not install. If you want to try my apk it's available here, but I
couldn't get it to install.

http://sites.google.com/a/surugi.com/public-stuff/androidvnc

Original comment by XavierBlak@gmail.com on 30 Oct 2008 at 3:04

@GoogleCodeExporter
Copy link
Author

Confirmed, the .apk binaries on XavierBlak's site do not work on RC29 on the G1

Original comment by hassinger.paul%ipaul.com@gtempaccount.com on 9 Nov 2008 at 5:09

@GoogleCodeExporter
Copy link
Author

I tried all the different patch versions in the emulator.
I had to sign the apks myself to get them to install at all.
When I connect to a local vnc server without a password I can see the android 
viewer
connects, but I don't get any display in the emulator and no mouse/keyboard 
events
seem to show up on the server side (viewing in another laptop vncviewer).

So it connects and nothing else at the moment?

Original comment by mike.k...@gmail.com on 9 Nov 2008 at 6:28

@GoogleCodeExporter
Copy link
Author

Mike, I get the same issue. I tried installing with an emulator, installs fine, 
I get
the option to enter an IP, port, and connect... and then it connects to VNC, 
but just
sits at a black screen.

I also installed it using Eclipse on my G1, same thing... I can connect to the 
VNC
server, it shows a connection, but it just sits at a black screen.

I tried it with RealVNC and TightVNC as the server on Windows and the Ubunutu 
8.0.4
Remote Desktop VNC.

I'm not very familiar with how all of this works, but could it be that it 
depends,
somehow on the framebuffer and zImage code in the
http://code.google.com/p/android-vnc/ project?

Original comment by hassinger.paul%ipaul.com@gtempaccount.com on 10 Nov 2008 at 4:54

@GoogleCodeExporter
Copy link
Author

I don't think the Viewer for Android needs the Server for Android that you 
mention. 
I just imagine something in the APIs the Viewer calls changed before the 
current SDK.
I'll try to find time to look into it next week.

Original comment by mike.k...@gmail.com on 11 Nov 2008 at 3:51

@GoogleCodeExporter
Copy link
Author

I just found this project and have downloaded the source... I'll try to 
recompile
this evening with the current SDK and then deploy to my G1.  I'll follow up 
tomorrow
with this thread.

Original comment by jeff.tol...@gmail.com on 12 Nov 2008 at 8:07

@GoogleCodeExporter
Copy link
Author

I don't think the createBitmap call arguments are correct.  According to the 
docs, 
those parameters generate an immutable bitmap.  A second arglist (int width, 
int 
height, Bitmap.Config config) can be used to create a mutable bitmap for the 
framebuffer. 

Original comment by stem...@gmail.com on 19 Nov 2008 at 7:51

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

I've been able to make this work (at lease so I can view a VNC session) by 
modifying
the createBitmap arguments to the mutable arguments as stemark laid out using:
Config.RGB_565 in place of the false boolean variable.  

Also note, I had issues with the line following where it calculates pixels24, 
where
it ran out of memory. This is because my VNC server was sharing the dual 
monitors and
multiplying that up. I simply just shared a single screen...that worked

... now to get key presses and mouse actions to work....

### Eclipse Workspace Patch 1.0
#P androidVNC
Index: src/android/androidVNC/VncCanvas.java
===================================================================
--- src/android/androidVNC/VncCanvas.java   (revision 2)
+++ src/android/androidVNC/VncCanvas.java   (working copy)
@@ -176,7 +176,7 @@
       Log.v(TAG, "Desktop name is " + rfb.desktopName);
       Log.v(TAG, "Desktop size is " + rfb.framebufferWidth + " x " +
rfb.framebufferHeight);

-      mbitmap = Bitmap.createBitmap(rfb.framebufferWidth, 
rfb.framebufferHeight, false);
+      mbitmap = Bitmap.createBitmap(rfb.framebufferWidth, 
rfb.framebufferHeight,
Bitmap.Config.RGB_565);

       if(bytesPerPixel == 4)
          pixels24 = new int [rfb.framebufferWidth * rfb.framebufferHeight];

Original comment by hassinger.paul%ipaul.com@gtempaccount.com on 23 Nov 2008 at 10:42

@GoogleCodeExporter
Copy link
Author

Looks like RfbProto.java has the start of mouse and keyboard events (commented 
out
code). It looks like most of that should probably be redone for the new Android
Development Kit. I might be able to sort through this, but it's goign to take 
me a
while. I'm just learning how to do this development on Android. I'll try to 
fake it
maybe, by just sending a single key and starting from there to see if that 
works.
Should we start a new thread for the keyboard/mouse events, now that the app is
functioning on the G1?

Original comment by hassinger.paul%ipaul.com@gtempaccount.com on 24 Nov 2008 at 12:13

@GoogleCodeExporter
Copy link
Author

Since the application, itself, is now functioning as-is (pretty much just as a
viewer), on the G1, I will close this issue.

I've created another issue, for dealing with mouse/key events as a first-step 
to make
the app usable from a remote-control perspective. I've volunteered to work on 
this
project in my free time and see what we can do to make this application a 
usable VNC
client. Any help is appreciated.

Original comment by ipaul...@gmail.com on 24 Nov 2008 at 5:26

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant