1
2This example VNC server for Android is adopted from
3http://code.google.com/p/android-vnc-server/ with some additional
4fixes applied.
5
6To build, you'll need the Android Native Development Kit from
7http://developer.android.com/sdk/ndk/.
8
9
10Building with autotools
11-----------------------
12
13This has the advantage that the LibVNCServer sources are properly set up
14using the configure script.
15
161. Read <NDK location>/docs/STANDALONE-TOOLCHAIN.html.
17
182. Setup your toolchain according to step 3 in the above file.
19
203. Execute
21
22    ./configure --host=arm-eabi CC=arm-linux-androideabi-gcc
23
24   in the LibVNCServer root directory.
25
264. Execute
27
28    make
29
30   in the LibVNCServer root directory. This will build the whole
31   LibVNCServer distribution for Android, including androidvncserver.
32
33
34
35
36Building with the NDK build system
37----------------------------------
38
39This is probably easier than the autotools method, but you'll have to edit
40some files manually.
41
421. Edit rfb/rfbconfig.h to match your Android target. For instance, comment out
43   LIBVNCSERVER_HAVE_LIBJPEG if you don't have libjpeg for Android.
44
452. Edit the HAVE_X variables in jni/Android.mk accordingly.
46
473. Execute
48
49    ndk-build -C .
50
51   in the examples/android directory. The resulting binary will be in libs/.
52
53
54
55Installing && Running
56---------------------
57
58This can be done via
59
60 adb push androidvncserver /data/local/
61 adb shell /data/local/androidvncserver
62
63
64