Modifying the Protocol

Because the protocol is specified and generated using the Protocol Buffers format, it is easy to modify and extend. New message types can be easily introduced by adding new optional fields without breaking compatibility with unmodified versions of the client, server, or VM. Optional fields not recognized by a component running an older protocol version will be simply ignored as if they never existed.

For best results, avoid altering any existing fields, especially required ones, as this will likely result in breaking existing deployed components.

First check out the svmp-protocol-def project

git clone https://github.com/SVMP/svmp-protocol-def

You will also need the Protocol Buffers v2.5.0 tools installed, specifically the protoc compiler. Version 2.6 has not yet been tested for compatibility.

SVMP Server

The SVMP Server utilizes a Javascript library that interprets the protocol specification file at run time so no code generation is required in this case. Simply copy the updated svmp.proto file into the svmp-server/protocol/ directory, overwriting the copy already there. Then restart the server process.

Android Client

Both the Android client application and the SVMP daemon contained within the virtual device image itself utilize a Java code library generated from the protocol buffer specification file. This Java code is contained in the svmp-protocol-def and must be regenerated for any protocol changes to take effect.

To re-generate the Java code in the svmp-protocol-def package in the Android client: