Let us clear one thing up front. We are not going to be discussing VNC clients for Android. We are going to be looking at the other side of Virtual Network Computing (VNC), which is running an actual VNC server on Android device.
Information on how to remotely access Android device's homescreen or interface is sparse. Most of the information out there seem to look at the reverse scenario - accessing a remote server on Android device using VNC Client app. [Read: Setup VNC Server on Ubuntu: Complete Ubuntu Remote Desktop Guide]
Setting up a VNC server for Android just as simple. In this post, I will show you how to setup an Android VNC server without root.
Table of Contents
What is a VNC Server?
VNC stands for Virtual Network Computing. It is a way of sharing the graphical desktop of a system to a remote system. In addition to the graphical interface, input events (keyboard, mouse, etc.), audio, and clipboard can also be shared with the remote system.
This is a super cool way to access remote systems and works as if you are actually in front of the remote workstation. With my recent move to Proxmox, VNC setup on Ubuntu Server has as been very handy for me. [Read: Ultimate Docker Home Server with Traefik 2, LE, and OAuth / Authelia [2020]]
In this post, we are going to try to access my Android phone's interface via VNC from a Windows laptop.
What can you do with VNC Server on Android?
Well, this is the million dollar question isn't it?
In my case, I have Android tablets showing Home Assistant dashboards for home automation. [Read: My Smart Home setup – All gadgets and apps I use in my automated home]
Sometimes I want to check what is showing on the dashboard, which having to be in front of it.
Be the 1 in 200,000. Help us sustain what we do.Join Us (starting from just $1.67/month)
That is just one application. If you have other applications you can think, please share with the rest of the us in the comments section.
VNC Server for Android without Root
While there are numerous VNC clients for Android, there aren't many VNC Server Android apps. In fact, when I did my research I could only find one that worked well: droidVNC-NG.
The best part is, droidVNC-NG app is free. Go ahead, head to the Play store and install droidVNC-NG and let us get started with setting up an Android VNC server. Alternatively, if you have droidVNC-NG VNC server Android apk, install it and proceed.
Is VNC Server free?
It depends on the server app. Some are paid. But there are free ones too (eg. droidVNC-NG for Android). Once a VNC Server is running, there are several free client apps to access the server.
1. VNC Server Port and Password
When you open the app, you should see an Android VNC server interface that looks like what is shown in the image below.
First, provide a port number for VNC server. Typically it is 5900. But you could change it to whatever (typically 59xx). In this Android VNC server guide, I am going to use 5902.
Next, provide a password for the VNC connection. Pick a strong password. In this tutorial, I am picking test (NOT a strong password).
2. Accessibility Permissions for Android VNC Server
Next, we need to enable Accessibility permissions for the Android VNC server. This allows remote control of the Android device. So click on Screen Capturing and grant accessibility permissions to droidVNC-NG app, as shown below.
3. Grant View and Control Permissions
We also need to grant view and control permissions to the VNC server for Android. Click on Input to grant this permission in the screens that follow (shown below).
4. Grant File Access Permissions to VNC Server on Android
Finally, click on File Access on the droidVNC-NG app configuration screen. Allow the app to access files on your android device, as shown below.
5. Start VNC Server on Android
Finally, hit the start button to start VNC server for Android. You will be presented with the warning screen shown below.
Carefully read and understand the implications prior to continuing. Once started, the Android VNC server should be listening for connections on the port you chose (5902 in this how-to).
In addition to the port number, you will also need the IP address of the Android device. As shown above, in this guide it is 192.168.1.120, which is the LAN IP address of my Android device.
If you are trying to access an Android system from outside your local network, then remember to setup port-forwarding on your router/gateway.
Connect to Android VNC Server
Now that our VNC Server on Android is running, let us see how to access the screen remotely. There are multiple ways to do this.
One of my favorite ways is to use Guacamole, which offers a HTML5 browser based access to VNC servers.
But for simplicity, in this guide, we are going to use TightVNC client for Windows. Using this VNC client app, we will view the Android device from my Windows system.
1. Provide VNC Server details on the Client app
Open the VNC client and provide the IP address and port number. In this case, they are 192.168.1.20:5902.
Wait!!! But the image above shows 2, and not 5902 for port.
As explained previously, VNC ports are usually in the range 5900 to 5999. For VNC ports, it is customary to provide only the incremental number from 5900. Therefore, for port 5902, the increment is 2. The TightVNC client app automatically trims the port number down to just the incremental number.
2. Provide VNC Password
Next provide the VNC password that you chose while setting up the VNC Server for Android.
Be the 1 in 200,000. Help us sustain what we do.Join Us (starting from just $1.67/month)
3. Access Android VNC Server on Windows
You should now be able to remotely access and interact with your Android device. You could work on it and control it using your mouse (and keyboard) - mouse-click to select, click and drag to move screen or scroll, etc.
So there you have it - the full graphical interface of Android that can be remotely controlled from practically any platform.
Final Thoughts on Running a VNC Server on Android
While this is all fun to do, I want to share my experience in using VNC Server for Android without root. Simply put, the performance was not great and it was not a smooth experience controlling the Android device using a mouse. It was choppy and slow. And this was on my Pixel 3, which has decent specifications at this point (March 2021).
On older Android devices, the experience might be even worse. Nevertheless, the droidVNC-NG app works great, is really one of a kind at this point, and free to use.
There are alternatives such as the VNC Server app from XDA Developers. This app allows both wifi and USB access. Wired access may provide a smoother experience but I have not tried this yet. If you have tried this, I would appreciate if you share your experience in the comments.
Other than that, it was a fun and easy project to setup a VNC Server for Android and access it remotely.