Android VNC Without root as a PDF document
This document is online at: https://brianaberle777.wordpress.com/android-vnc-server-without-root/
In June 2013 Google allowed the VNC Server to be stolen. Google is committing treason to the entire open source community by supporting this violation of GPL. There is a VNCServer in the Google Play store for $7.99 claiming to be the First and Only VNC Server that does not require a device to be rooted. Search for “Android VNC Server without Root”, its all over the Internet.
A little History:
I have been working with VNC source since 2002. I statically linked VNC into an experimental build of my product and showed it to Andy Harter in 2007 for my work on Windows Mobile. He told me that the static link will violate GPL unless my product is also open source. I respect old school net etiquette and responded by putting VNC in its own process.
The source code, when I obtained it from http://code.google.com/p/android–vnc–server was not so simple to build. To start with I needed SVN, The Subversion source control system. After obtaining all the code, it would not build until I obtained, built, and linked the jpeg and zlib libraries, then I edited the makefile to setup the dependent libraries path and file name.
I republished the source code. I rearranged the build so that this VNC Server does not link to any dependent library. The source from the two needed libraries is now included into one project makefile, and its in all in one zip file. The source is clearly split into their respective folders and it is unchanged. Now you can “download and build”. (Install the Android NDK first) This major simplification to the build process will help to advance the code base by simplifying developer adoption. The source code for building android vncserver is included in the attached files. The binary is also included so you don’t need to build it.
Just want to see VNC work without rooting?
One prerequisite is that you install the “Google ADB USB Driver” on your PC that will launch the process on your Android device. There are many places on the internet that will guide you to the drivers.
- You need to enable the ADB interface on your phone/tablet – look under device settings or security settings
- Plug your Android device into your computer by USB cable
- Open a command prompt(Start/Run/Accessories/Cmd) to the folder where you have the file androidvncserver.
- adb start-server
- adb push androidvncserver /data/local
- adb shell chmod 777 /data/local/androidvncserver
- adb shell /data/local/androidvncserver –t /dev/input/event1 –k /dev/input/event4 &
7. adb shell /data/local/androidvncserver –t /dev/input/event2 –k /dev/input/event4 &
7. adb shell /data/local/androidvncserver –t /dev/input/event3 –k /dev/input/event4 &
———–Find your touch input—————————-^
Step 7 will vary from device to device.
I tested with several VNC viewers. TightVNC works best with the Android VNC Server. Download it for free from http://www.tightvnc.com –only download the viewer. The VNC Server (on your phone) is on port 5901 because 5900 is locked by the OS.
I am using Xfer to view the process list on the device – In this case an LG Optimus. However, the VNC Server has nothing to do with Xfer. Xfer is not required to achieve “VNC Server without root”.
Notice in the process list, under Handles, the androidvncserver process is ‘shell’, this “shell” is the process permission that allows the system files to be accessed with elevated permissions. Your VNC viewer can connect directly if you can route directly over TCP. If your computer can ‘ping’ the phone (if it is on the same sub-net) then you can connect directly from a VNC Viewer to 126.96.36.199::5901 (where 188.8.131.52 is your ip address). If the phone is on another subnet, you need Xfer to tunnel a connection for you. Xfer does encrypt screen data before it is sent over the air.
If you think that VNC Server without Root, is a monumental leap forward in personal technology management, then wrap your mind around this:
The free Xfer Android app allows the device to host any TCP server application on the public Internet. This has been documented in detail in the protocol documentation and it will not be reiterated here. The binaries and documentation for Xfer are here:
The androidvncserver does not encrypt screen data, but if you send it over Xfer, then rest assured that not even the government can see what you are doing. Xfer’s 128 bit encryption uses an additional packet sequence key so that if one packet was cracked (probably months or years too late) even then -the current sequencing scheme would never allow the information to be reused as a valid transaction at the current cipher sequence. The security that Xfer adds is secondary to the new TCP routing capabilities.
This s what it does: Your VNC Client will connect to your computer on port 5900. That connection is tunneled up to a switchboard server on the internet. The Android device must also be able to reach the switchboard server, so it will work whenever the device can browse the internet. The TCP data is sent to the device, decrypted, and forwarded to port 5901. The VNC Server thinks that the VNC Viewer is running on the Android device at 127.0.0.1, when in fact the VNC Client is running on a PC. The VNC Viewer is also unaware of Xfer – connecting at 127.0.0.1 on port 5900.
In the image below, notice the connection path in blue at the top left. This VNC session is safely being routed through a public switchboard server that I have setup.
Using the free Xfer Android app, and the free version (aka the evaluation version) of the Windows GUI, you can route the screen data across subnets for free. This is truly a free solution that uses free components.
Xfer adds an essential element to connecting your computer at home/ office to your phone/tablet. This allows you to push pictures and mp3 between your PC and phone/tablet with the internet between them both. Don’t need to go home and plug in wires because the pictures are already there. If your phone/tablet is lost, damaged, or stolen none of the information is lost.
This may help you understand how much the subnet bridging matters:
… and the above image may help you understand what subnet forwarding can do on an unrooted phone.
Google’s been shady and sneaky too. Gmail users have their every word indexed for direct marketing ad delivery, and while direct marketing may not be illegal, some folks don’t like it.
There is nothing Shady and Sneaky about Xfer. Nobody has ever done this for free before. EDI VANS cost money. Search that. That’s where Xfer came from because it is designed for distributed systems integrations. The same technology is needed between your phone and computer that is need for complete B2B. It becomes one system. That is “System Integration” (aka Distributed Computing) the roots of which are in COM and CORBA that were blocked at the firewall because Xfer did not exist at the time. Xfer is the only solution that bridges subnets recursively deep. That means a single connection path may contain multiple switchboard servers in it. This is all documented in detail in the protocol docs.
As for the entire solution being free – It is. The Windows GUI will not allow any connections into your machine unless you “Start the Xfer Server”. You do not need to “Start Xfer Server”, to accomplish everything presented here as a free solution. You can even evaluate setting up your own Switchboard server using the windows GUI, a private switchboard server will be faster than a public server. I will maintain free public switchboard servers. Plural.
The most disturbing practice of Google is not about what they force you to see, but about what they prevent you from seeing:. An honest web browser displays any HTML document. W3C defined the rules.
IE doesn’t have any problem displaying the HTML and JPG files hosted by the Xfer HTTP Server.
Neither does Netscape(on 64 bit Windows 7).
The newest Firefox is tied into the new Google censorship program: Firefox is a good browser, I hope they fix that.
Thankfully, Apple is not participating in the Google censorship program. As of July 18, 2013 Safari (on Macintosh) looks like this:
And in the next picture you can see Google chrome: (I added the picture at the top of this screenshot)