Hacking the A660

How to get ringtones, screen savers (pictures), games, and apps onto your phone, without the Sprint PCS Vision service. Backup your phone book too! For free!
jump to sectionwhat you need  bitpim  the amsregistry file  what to do  comments 
jump to pagesample files   further tips  

a660 side view

what you need

collect the following items (versions I've used in parenthesis):
  • Samsung SPH-A660 Dual Band/Tri Mode phone
    aka Sprint PC Vision Phone VI660 (firmware XA28)
  • Phone data cable. I bought the FutureDial cable from RadioShack for $22.49! This is the one that works for me. Also, you can get the same cable for only $8.95 from 3gcables.com, which also works for me.
  • Samsung USB drivers (3.31.0.306) from futuredial.com, found here.
  • BitPim (0.7.22, 0.7.23, 0.7.34, development versions). Very cool free software found here. Download the development release.
  • (optional) GCDCreator (v.1.1.0) by phaZed, found here (some people have had problems with this program -- you may want to try editing one of the sample GCD files first)
required hardware

bitpim

BitPim is a great piece of open source software that you can use for sending and receiving stuff to/from your phone. As of this writing, the Samsung SPH-A660 is not one of its supported phones. This means you should not use the Wallpaper, Ringers, and Calendar tabs (actually I haven't played with the Calendar feature).

You can connect to the phone anyway and do pretty much anything to it using the "view filesystem" option. First install the Samsung USB driver, and when you open BitPim choose "Edit -> Settings" and select the Samsung SPH-A620. This way you will at least be able to transfer your phone book.

To test out your connection, click "Data -> Get Phone Data" and select the PhoneBook and click ok. In a few seconds you should get all of your phone entries. To get to the filesystem of the A660, click "View -> View filesystem" (should be checked). Now you will get a filesystem tab that will let you follow the steps below...

BitPim homepage: http://bitpim.sourceforge.net/
BitPim download: http://sourceforge.net/project/showfiles.php?group_id=75211
Screenshot of filesystem: (screenshot)


the amsregistry file

When you connect your phone with the USB cable, it does not show up as a new drive like a flash card, but rather as a new COM port (or serial device). BitPim will connect to the phone and issue commands for manipulating the phone's filesystem via this COM port. All of the ringtones, pictures, games, and applications that you "download" to the phone are stored in the /ams/ directory:
ams directory
All of the files in these directories do not retain their normal filenames, for example a picture named "my_cat.png" will become "cnts1" on the phone. Instead of reading each filename the phone relies on ".gcd" files for describing each media file and ".jad" files for describing games and apps. It stores a list of all of your installed files in an index file named amsregistry. This file is in a binary format, and on some discussion boards people talk about hacking the amsregistry file format -- while that would be nice to know how it works, it turns out you don't need any special editor or knowledge of the file to get stuff onto your phone. If you delete the amsregsitry file, the phone will simply rebuild it for you!

Sometimes the amsregistry file is locked by the phone and you will be unable to delete it. (In bitpim 0.722, you get a big exception screen.) In that case, turn off the phone. Turn it back on, and do not go into any of the menus. Connect it again and fire up bitpim, then you should be able to delete amsregistry.


what to do

  1. First install the USB driver and setup BitPim
  2. Turn on phone and plug it into a USB port using the data cable.
  3. Run bitpim. Choose the filesystem tab.
  4. At this point, I would backup everything if you haven't already!! Right-click on the root directory "/" and click "Backup entire tree..." and save that zipfile in someplace safe.
  5. Click on the ams directory
  6. What happens next depends on what you want to upload...
jump>> ringtones  pictures  games and apps  phonebook 

ringtones

Ringtones can be MIDI or CMX song files, and are stored in the /ams/Ringers directory with the sequential filenames cnts1, cnts2, cnts3, etc. Each file needs a corresponding GCD file to describe it. You can make these files by hand or using GCDCreator. Don't make any directories within Ringers, or you'll confuse the phone and it won't show anything at all.

Ringers directory
Follow these steps to upload ringers to your phone:
  1. first prepare your media files. Get midi or cmx files and rename them sequentially to cnts1 (no extension), cnts2, cnts3, ... cntsN for N number of files.
  2. make a GCD file for each one of these ringers. Use GCDCreator or do it by hand. I like to make the first .gcd with GCDCreator and then use notepad on the rest of my files. Content-(Version/Vendor/URL) don't matter; I'm not even sure that Content-Size matters.
  3. in BitPim, from the filesystem tab, expand the root "/" tree, and "ams", and locate the "Ringers" directory.
  4. right-click and select "New File", locate your first ringer and select "open"
  5. repeat the previous step for each cntsN and cntsN.gcd file that you want uploaded
  6. delete the /ams/amsregistry file: right-click on it and click "delete".
  7. turn off the phone, then turn it back on. This resets the phone so it knows to reread the filesystem and rebuild the amsregistry file. If you are going to upload other goods, skip this step and perform it at the very end.

pictures

Pictures on the A660 are called "Screen Savers". You can set them as your phone's wallpaper (or background) or for display when certain phonebook entries are calling you. This phone can handle JPG or PNG images, with a size of 128x112. Just like the ringtones, pictures are stored with the sequential filenames cnts1, cnts2, cnts3, ... cntsN for N pictures, and each needs a .gcd file.

Screen Savers directory
Follow these steps to add pictures to your phone:
  1. first prepare your picture files. Get jpg or png files and rename them sequentially to cnts1 (no extension), cnts2, cnts3, ... cntsN for N number of files.
  2. make a GCD file for each one of these pictures. Use GCDCreator or do it by hand. I make the first .gcd with GCDCreator and then use notepad on the rest of my files.
  3. in BitPim, from the filesystem tab, expand the root "/" tree, and "ams", and locate the "Screen Savers" directory.
  4. right-click and select "New File", locate your first picture and select "open" to send it to the phone
  5. repeat the previous step for each cntsN and cntsN.gcd file that you want uploaded
  6. delete the /ams/amsregistry file: right-click on it and click "delete".
  7. turn off the phone, then turn it back on. This resets the phone so it knows to reread the filesystem and rebuild the amsregistry file. If you are going to upload other goods, skip these last two steps and perform them at the very end.

games and apps

The games and applications you put on your phone are stored each with their own subdirectory in /ams/Games and /ams/Applications, repectively. They are really little Java midlets stored inside JAR files. A jar file is zip file containing all of the necessary Java .class files, data files, and whatnot. The jar file gets the filename _jar, and requires a corresponding _jad file to describe it.

Applications and Games directory
Use these instructions for sending games or applications to your phone:
  1. collect your Java apps/games. I don't know what will run on your phone -- start out with programs specifically written for cellphones.
  2. copy or rename each jar file to have the filename "_jar". It'll probably be easiest to make a folder for each jar file you have.
  3. make a _jad file for each _jar file you have. The easiest way of doing this is by opening your "_jar" file with a zip program (like WinZip) and locating the "Manifest.mf" file. Now make a _jad file with a text editor like notepad. As an example, here is the _jad for "The Weather Channel", which came preloaded on my phone:
    MIDlet-1: The Weather Channel, weather_j2me.png, m.WeatherMidlet
    MIDlet-Description:
    MIDlet-Jar-Size: 64077
    MIDlet-Jar-URL: http://ra.pcslab.com/diane/java/Applications/weather-pre.jar
    MIDlet-Name: The Weather Channel
    MIDlet-Vendor: Sun Microsystems
    MIDlet-Version: 1.0
    VendingURL: http://vm.sprintpcs.com/redirect?product=PCSGamej2meweather
    
    and this is the "Manifest.mf" file that the above _jad is derived from:
    Manifest-Version: 1.0
    MicroEdition-Configuration: CLDC-1.0
    MIDlet-Description: 
    MIDlet-Version: 1.0
    Created-By: 1.3.1_04 (Sun Microsystems Inc.)
    MIDlet-Vendor: Sun Microsystems
    MicroEdition-Profile: MIDP-1.0
    MIDlet-1: The Weather Channel, weather_j2me.png, m.WeatherMidlet
    MIDlet-Name: The Weather Channel
    
    As you can see, the fields MIDlet-1, MIDlet-Description, MIDlet-Name, MIDlet-Vendor, and MIDlet-Version are preserved, MIDlet-Jar-Size is the number of bytes occupied by the _jar file, and the URLs are not too important.
  4. in BitPim, right-click on Applications or Games and choose "Make subdirectory..." to make a cnts1, cnts2, ... cntsN directory for each of your N programs.
  5. go into each cnts1, cnts2, etc directory and upload the _jad and _jar files using the "New File" option.
  6. as with all the other uploads, delete your amsregistry file and reset your phone when you are done uploading stuff.

phonebook

With the current version of BitPim, I've only been able to read the A660's phone book and not send modified entries back to the phone. If you choose the Samsung SPH-A620 under Edit->Settings, then you can retrieve your phone book entries (I suppose for backup purposes) using the "Get Phone Data..." menu item. Under "Send Phone Data..." unfortunately the phone book option is disabled.



Samsung A660
(c)2004 Jeff Ahrenholz