The MakoServer is available on the Android App Store and is prepackaged as a Barracuda Application Server and Lua Web Tutorial.
The Android App store version consists of a small Java application designed specifically for starting and stopping the natively compiled Mako Server. You can also run the Mako Server directly from an Android shell. Controlling the server from a shell gives you more options and you can use the command line version to load your own applications, not just the tutorials. The following information is for users that wish to manage the server from an Android shell.
The Mako Server for Android is a native application that must be started from a terminal emulator. You can run the Mako Server on a standard (non rooted) Android or on a rooted Android. Only a rooted Android enables the Mako Server to open the server's default port numbers 80 and 443. The server uses alternative port numbers for non rooted Androids (typically 9357 for HTTP and 9443 for HTTPS).
The instructions below are for standard non rooted and rooted Androids.
The above command sequence downloads the Mako Server archive and unpacks the archive. The last command in the list above instructs the Mako Server to load and run the tutorials.
Use your phone browser and navigate to http://localhost:portno, where portno is the server's listen port number. The server's listen port number is printed to the terminal window and is 80 for rooted androids and typically 9357 for non rooted Androids.
We recommend using the Chrome browser and not the default Android web browser since the default web browser does not support WebSocket. WebSockets are used by some of the demos and tutorials.
You can also map your phone as a Windows drive when the Mako Server is running the downloaded demos. To map/mount your phone: Click the Windows Start button, Right-click Computer, Click Map Network Drive..., enter http://phone-ip-addr:portno/fs/ and click the finish button.
You can find your Android phone's IP address connected to your local wireless network as follows: Wireless Controls > Wi-Fi settings > tap on the network you are connected to. It will pop up a dialog with network status and IP address.
When you are done testing the Mako Server, press CTRL-C in the terminal window or exit the Terminal Application. Note: you may consider using an alternative keyboard such as the Hacker's Keyboard, which supports CTRL-C.
Starting the Mako Server with the "-d" option makes the server run as a background (daemon) process. The background process will not be subject to Android's process management and will run until explicitly terminated via the terminal window or after a phone reboot.
All tutorials can be used on the phone, however, the Pac-Man game must be controlled from another computer using a telnet client. The WebDAV server demo, which is embedded in the tutorials, also requires that you connect to it from another computer. The following instructions are for setting up the environment for these two examples.
You can now control the Pac-Man game running on your phone from a PC.
The phone should now be mapped as a network drive in Windows.
Note: The server has limited access on the phone and many of the phone's directories cannot be opened. One option is to map the following URL instead of the URL above. The following URL is to the cache directory of the Android app, a directory with both read and write access: http://phone-IP-address:9357/fs/data/data/net.makoserver.android/cache/
Not all Android devices respond to ARP requests. This means that Putty and WebDAV will not be able to connect to the phone. To circumvent this problem, Open Chrome on the phone, enter the IP address of the PC in the address field, and click Go. This command will fail, but it will populate the PC's ARP cache. You should now be able to connect Putty to the telnet server on the phone.
The PC IP address can be found as follows:
Your computer's IP address appears in the Value column, next to IPv4 Address.