In order to run the Android jack build server multiple times on one host, one has to modfiy jack’s ports in the config.

$HOME/.jack file

The $HOME/.jack (Older versions: $HOME/.jack-settings) file contains the following settings for Jack server variables in a full bash syntax (Symlink one file to the other):

SERVER=true. Enable the server feature of Jack.
SERVER_PORT_SERVICE=8177. Set the TCP port number of the server for compilation purposes.
SERVER_PORT_ADMIN=8178. Set the TCP port number of the server for admin purposes.
SERVER_NB_COMPILE=4. Set the maximum number of allowed parallel compilations.
SERVER_TIMEOUT=60. Set the number of idle seconds the server must wait without any compilation before shutting itself down.
SERVER_LOG=${SERVER_LOG:=$SERVER_DIR/jack-$SERVER_PORT_SERVICE.log}. Set the file where server logs are written. By default, this variable can be overloaded by an environment variable.
JACK_VM_COMMAND=${JACK_VM_COMMAND:=java}. Set the default command used to launch a JVM on the host. By default, this variable can be overloaded by environment variable.


There’s also ~/.jack-server/ which should have the same ports as the .jack .jack-settings file:


You need to modify all/both files,because I modified SERVER_PORT_SERVICE and SERVER_PORT_ADMIN (default 8076/8077) in .jack and nothing happend. ~/.jack-server/ stayed always on the default: 8076,8077.

Also comment out comment out the line with uninstall-server in <AOSP>/prebuilts/sdk/tools/