alameda 0.1 - JAD (Java Application Descriptor) downloader for Motorola phones ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Alameda is the open-source Linux counterpart of Motorola's MIDway Tool (see http://developer.motorola.com/?path=1.2.6.28). It allows you to load a JAD file and accompanying JAR file to a Motorola cellular phone attached to your PC using a serial cable. Most phones with USB connections also fall into this category since their drivers emulate a serial port on the PC. REQUIREMENTS ~~~~~~~~~~~~ - A working connection between your phone and your PC. For USB devices, this means that the appropriate driver must be loaded to make a /dev/ttyACMn device usable (for details on modifying the stock kernel drivers for this, look at the appropriate section below). For both types (serial and USB), this means that the phone must respond to AT commands in, eg. minicom. - On your phone, the "Java App Loader" must be enabled. Once selected and the cables unplugged, future connections are in a special mode that allows Java applications to be downloaded into your phone. The phone should no longer be responsive to AT commands. If you do not have this menu item in your settings menus anywhere, search the web for ways of enabling access to it. That is beyond the scope of this program. - Uh, a JAD file and a JAR file to download. This means either a game, a browser (Opera Mini), etc. or your own. HOW TO USE ~~~~~~~~~~ 1. Adjust the define at the top of alameda.c to reflect the device you want to use: #define DEVICE "/dev/ttyACM0" 2. Compile alameda: make 3. Execute it with the JAD file: ./alameda example.jad Note that the MIDlet-Jar-URL attribute in the JAD file must be such that alameda can find the corresponding JAR file by simply opening the filename. This means that URLs will NOT work, nor will most complicated path structures. For best results, stick with just the filename, place everything in the same directory, and run alameda from that same directory. MODIFYING THE STOCK ACM (USB) DRIVERS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The cdc-acm module, included in the vanilla kernel distribution of Linux 2.6, is the correct driver for most phones' USB serial emulation. However, they're not loaded when a phone is plugged in. The problem is that the device IDs for insertion of these drives are too restrictive out-of-the-box. A quick hack is to add laxer filters to the device ID tables. Get ready to compile a new kernel (or at least the cdc-acm module). Open drivers/usb/class/cdc-acm.c. Scroll down to the definition of the acm_ids table (90% into the file; line 1063 in 2.6.17.11). Add the following lines at the end of the table: { USB_DEVICE_INFO(USB_CLASS_COMM, 0, 0) }, { USB_DEVICE_INFO(USB_CLASS_COMM, 2, 0) }, AUTHOR ~~~~~~ The author of alameda is Catalin Patulea . Feel free to e-mail me with questions and comments. If you would like to see some of the other things I've done, check out my web site, at http://vv.carleton.ca/~cat/. LICENSE ~~~~~~~ Alameda is released under the BSD license. For full details, see LICENSE.