Kahvibreak Nokia S40 Game Dumping
This guide is for Nokia S40 phones. If you have a Symbian or a Nokia 3410 / 6310i phone, please read their respective guides by going back to the main Nokia section.
This page will guide you through the process of copying a file from your Nokia S40 mobile phone to your computer, using the Gammu software utility under a Linux-based or Windows operating system. For Linux users, a basic knowledge of their environment is expected. This procedure can be used to backup media files from the phone's internal memory and digitally purchased games.
Notice. Help needed! : Some Nokia models make use of a "Forward-Lock" feature that encrypts the game JAR files when downloaded and stored to the phone's internal memory. This renders the game files unuseable without knowing the phone's keys.
1. Getting the software
Linux
If your distribution offers it, search and install the gammu package from your package manager. Otherwise or if prefered, head over to Gammu's download page to get the sources and follow the instructions on building and installing.
Windows
Download Gammu from Gammu's download page , look for Windows executables under the "Windows Binaries" section. There's three releases available. You will likely want the *-Windows-64bit.exe or *-Windows.exe version, according to your system specs. During the installation, you will be prompted whether to add Gammu's files to the system PATH. It's not necessary to do so, but it will make things easier.
Tip: If you don't want to install the software, you can use 7-zip to extract the installer contents. Gammu will run fine from the extracted folder.
You might need to install "Visual C++ Redistributable Packages" to run Gammu in case they are not already on your system. You can find it here
2. Connecting your phone to the Computer
Depending on your phone model/capabilities, this process will vary. Bluetooth is by far the most convenient and compatible way, if both your phone and your computer have such capability. Some phones work over Bluetooth but do not do so over data cable, or vice-versa.
Bluetooth (Recommended, if available on your phone/computer)
Make sure your phone haves Bluetooth enabled and phone visibility is set to discoverable mode.
On most phones Bluetooth settings are at Menu > Settings > Connectivity > Bluetooth
You will need the Bluetooth MAC address of your phone. It usually looks like a XX:XX:XX:XX:XX:XX string composed of hexadecimal numbers (0-9 and A-F characters). Sometimes it's shown without the : between them.
On some phones you can check it out by dialing the code *#2820#
(It's the 12 characters shown at the first line)
Linux
- Pair your phone to the bluetooth adaptor of your computer. Use your favourite method for doing so.
For convenience, here's an how-to using bluetoothctl:
- Make sure Bluetooth works in your system and the
bluetoothctl
utility is installed. - Depending on your user permissions, you might have to run bluetoothctl as root.
- On a terminal run
bluetoothctl
(sudo bluetoothctl
to do so as root). you should be greeted with a[bluetooth]#
prompt. - Run the
list
command. You should get something like this:
Controller XX:XX:XX:XX:XX:XX BlueZ X.XX [default]
. If not, make sure you have the required permissions. - Make sure the controller is powered and pairable, to do so run
power on
,pairable on
andagent on
(The agent is the pairing passkey negotiator). - Start scanning for devices, run
scan on
. Eventually, new found devices will be echoed to the command line.
You can display all found (and paired) devices with thedevices
command. You should see your phone appear on the list. - Pair with your phone. Given your phone is
Device XX:XX:XX:XX:XX:XX [Friendly device name]
, runpair XX:XX:XX:XX:XX:XX
. This XX:XX:XX:XX:XX:XX string is the Bluetooth MAC address of your phone, you will need it later.
Depending on your device, you will either have to:- Confirm a passkey. Type
yes
when promptedConfirm passkey XXXXXX (yes/no)
- Type a passkey. You will be prompted for a passkey on both devices. Enter any same passkey in both devices.
- Confirm a passkey. Type
- Now you can set
agent off
andpairable off
again.
- Make sure Bluetooth works in your system and the
You might be prompted by your phone whether to let the computer connect automatically. It's recommended to select yes for convenience, but not needed.
Windows
- ToDo: Document procedure with Toshiba's bluetooth stack. Document MAC obtaining.
- Pair your phone with the computer: open the device paring wizard by pressing Windows + R and typing in
DevicePairingWizard
. Wait for your phone to appear, select it and follow the steps prompted by Windows. If it does not appears, make sure the phone is set on discoverable mode and it's not already paired to your computer. Even if it was already paired, it's recommended to re-pair it to avoid possible issues. (Remember you have to remove the pairing from both devices!) - Find the COM port assigned to your phone's "Nokia PC Suite" serial interface.
Press Windows + R and type incontrol printers
, then press Enter. Right click at your phone, select "Properties" and go to the "Services" tab. A list of services will appear, look for the "Nokia PC Suite" one, make sure it's enabled and remember the COM port number at it's right.
- Pair your phone with the computer: open the device paring wizard by pressing Windows + R and typing in
Data cable
Photo credits: User CHC - NO "i" from Howard Forums
Nokia phones may have many different connector types:
- USB:
- Use a standard USB cable to perform the connection.
- Pop-Port:
- Nokia phones with Pop-Port connector may have different technologies regarding data cable connection, despite the Pop-Port connector being the same:
- Serial: on older phones. You will need either a Nokia CA-42, Nokia DKU-5 or aftermarket compatible cable. Such cables have a chip to do serial emulation over USB (Help Needed: CA-42 Might be internally performing differently, but should work)
- USB: on newer phones. You will need either a Nokia CA-53, Nokia CA-70, Nokia DKU-2 or aftermarket compatible cable. Such cables do direct connection between the computer and the phone, which does USB directly.
- You may check here and here (newer list) whether your phone needs a serial or direct USB type cable. Also, you can tell some USB capable phones by checking whether they have a "USB data Cable" option on Settings > Connectivity.
- Other connectors:
- Some other phones have very specific connectors. Most of them are direct USB, so the procedure should not vary.
Linux
Connect your cable to the phone then to the computer.
If your phone does USB it may prompt you with a mode selection choice. Choose "Default Mode" / "Nokia PC Suite mode". If you are not, make sure the "USB data cable" setting at Settings > Connectivity is set to "Default Mode" / "PC Suite", if any.
Check the output of the dmesg
command (Might require superuser permissions). Depending on your device, something like this should appear:
- (Nokia 6151, does direct USB)
[10674.228192] usb 3-1.2: Product: Nokia 6151 [10674.228200] usb 3-1.2: Manufacturer: Nokia [10674.389704] cdc_acm 3-1.2:1.1: ttyACM0: USB ACM device
- (Aftermarket USB-Serial data cable, with Prolific PL2303 chip)
[ 2953.638050] usbserial: USB Serial support registered for pl2303 [ 2953.638097] pl2303 3-1.2:1.0: pl2303 converter detected [ 2953.639975] usb 3-1.2: pl2303 converter now attached to ttyUSB0
In the above cases, /dev/ttyACM0 and /dev/ttyUSB0 are the device nodes assigned to the phone's data interface.
You will likely want to make it readable/writable by your user. Do chmod 777 [device node]
(as superuser) to make the device node readable/writable by everyone (non-permanently).
Windows
This section is a stub. It is not finished
On Windows, you will may encounter issues depending on your cable and connection type.
- Original Nokia Serial to USB cables
- Original Nokia Direct USB cables
- PL2303-based Serial to USB cables: No drivers at Windows Update. Without driver it appears on Windows Device Manager as "USB-Serial Controller" under "Other Devices"
Drivers available at: http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41 for Windows XP up to 10, Don't forget to reboot.
HXA/XA chip variants not supported on Win8 and above, there's an unnoficial patch to the drivers to make them interface those chip variants again on Win10 computers [ToDo]
Despite Gammu having a special connection type fbuspl2303 for pl2303 chips, the standard fbus was proven more reliable in our tests.
To open Device Manager, Press Windows + R and execute devmgmt.msc
IrDA
It is also possible to connect to IrDA (Infrared) capable phones via an IrDA interface. Not recommended since some phones have a mysterious firmware bug causing them to brick over time when using Gammu to interface them over IrDA.
3. Configuring Gammu
Gammu uses text files to store it's configuration parameters.
At their simplest form, they have the following syntax:
[gammu] connection = [Connection mode] device = [Device Node/Bluetooth Address/COM Port] name = [Phone's friendly name, can be anything user-set]
Create a empty text file and type/paste the following template:
[gammu] connection = device = name =
- connection:
- This is the protocol variant Gammu will use to communicate with the phone. The most common values are fbus for Serial-over-USB phones, phonetblue or bluephonet for connections over Bluetooth and fbusdku5 or dku2 for direct USB connections. Trying different settings is the best way to find out one that works. There's some technical documentation about connection types in this documentation snippet from Gammu.
- Some of our test results, for orientative purposes:
Test results: Device | Linux | Windows | --------------------------------------------------------------------- Nokia 3100 (Via Serial to USB data cable) | fbus | Nokia 7230 (Via Bluetooth) | bluephonet | phonetblue | Nokia 6151 (Via direct USB) | fbususb | ??? | ---------------------------------------------------------------------
- device:
- Linux: if connecting over Bluetooth, set it to the XX:XX:XX:XX:XX:XX Bluetooth address of the phone. If connecting via data cable, set it to the phone's interface device node
- Windows: set it to the phone's COM port, as
comX:
- name:
- An identifier for the phone, can be anything user-set
Additional information for Windows users:
- Strange issues were experienced while reordering the elements in the config file. This should not be happening, but placing the connection field after the device one seems to cause the connection to fail. Due to this, we recommend keeping the fields ordered in the same way as our examples.
- Adding `GammuCoding = CP1250` will make gammu output special characters in filenames in the character encoding understood by Windows command line. It's recommended to add it to the config file when running under Windows.
Save the text file to a known location, and copy it's path. Filename does not matters. (On Windows, hold Shift and right click on the file then select "Copy as Path")
Examples
- (Nokia 3100 at COM8, Windows)
[gammu] GammuCoding = CP1250 connection = fbus device = com8: name = Nokia 3100
- (Nokia 7210 at /dev/ttyUSB0, Linux)
[gammu] connection = fbus device = /dev/ttyUSB0 name = Nokia 7210
- (Nokia 7230 over Bluetooth, Linux)
[gammu] connection = bluephonet device = 9C:4A:00:00:00:00 name = Nokia 7230
[ToDo: Win/BT]
4. Using Gammu
Gammu is interfaced via the command line, with a simple set of commands.
Gammu command syntax looks like the following:
gammu [parameters] [command] [command options]
1. Launching Gammu from the command line.
- Linux:
- Use your favourite way of running a shell.
- Windows:
- If you used the installer and added Gammu to the system path, press Windows Key + R, then type in cmd and press Enter.
- If you extracted the files using 7Zip or did not add Gammu to the system path, browse to the directory where Gammu files are and do Shift + Right Click on the bin folder, then choose "open command window here"
- On both cases, if done right, typing
gammu
and pressing Enter should greet you with the program's built-in help message.
2. Specifying the config file.
- We should tell Gammu where our configuration file is. To do so, we will specify it as a command-line argument.
First of all, append a-c
argument after thegammu
command on the command line. This argument tells Gammu that argument following it will be the path to the configuration file. So now, paste the path after it, enclosed in " . On Windows, keep in mind that Ctrl+V won't work, do Right Click > Paste. Use your favourite way on Linux, many graphical terminal emulators let you paste by doing Ctrl+Shift+V.
- For example, if the config file path is
C:\Example\gammu_config.txt
the command will look like this:
gammu -c "C:\Example\gammu_config.txt"
Tip: On Windows command line and most shells you can quickly recall past commands with the Up and Down arrow keys.
3. Testing the connection.
- Now, let's check whether the connection is working and properly configured. Gammu's identify command will print basic information about your phone, and it's a quick way of testing whether the connection works. Append
identify
to the command line arguments:gammu -c "C:\Example\gammu_config.txt" identify
- Once run, something like this should appear:
Device : /dev/ttyUSB0 Manufacturer : Nokia Model : 3100 (RH-19) Firmware : 05.91 C (22-10-04) [...]
- Note: If you get a "No response from device in specified time" error, make sure the connection type (Step 3) is properly set. Sometimes it's a matter of trial and error.
4. Listing the phone filesystem contents
- To list the phone filesystem contents, use the Gammu command getfilesystem, the same way it was previously done with identify:
gammu -c "C:\Example\gammu_config.txt" getfilesystem
The default format at which Gammu prints those make the listing easier to read but harder to figure out the file's path. It's recommended to add the argument -flatall to the getfilesystem command, to make exact file paths easier to figure out:
gammu -c "C:\Example\gammu_config.txt" getfilesystem -flatall
- Different Nokia phones may have two ways of identifying files inside it's filesystem:
- ID-Based (On older models). Example: (with -flatall option):
- ID-Based (On older models). Example: (with -flatall option):
- Different Nokia phones may have two ways of identifying files inside it's filesystem:
[...] c:/65;File;"Snake_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT";"Snake_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jad";"Fri Oct 22 13:37:34 2004";343; c:/66;File;"Snake_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT";"Snake_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jar";"Fri Oct 22 13:37:34 2004";43080;P [...]
- On the example above, among others, there's a file called Snake_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jar onto a folder called Snake_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT. In this case the file identifier is
c:/66
- True paths (On newer models). Example (with -flatall option):
- On the example above, among others, there's a file called Snake_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jar onto a folder called Snake_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT. In this case the file identifier is
[...] d:/predefjava/predefgames/snake3d_C8.jar;File;"snake3d_C8_private";"snake3d_C8.jar";"Fri Jan 1 12:00:00 2010";267310;PR d:/predefjava/predefgames/snake3d_C8.jad;File;"snake3d_C8_private";"snake3d_C8.jad";"Fri Jan 1 12:00:00 2010";2767;PR [...]
- On the example above, among others, there's a file called snake3d_C8.jar onto a folder called predefgames which it's itself inside a folder called predefjava. In this case the file identifier is
d:/predefjava/predefgames/snake3d_C8.jar
- On the example above, among others, there's a file called snake3d_C8.jar onto a folder called predefgames which it's itself inside a folder called predefjava. In this case the file identifier is
- Important note: if the listing process gets stuck in the middle for some seconds then continue, it's due to a firmware bug on some Nokia phones that prevent them from sucessfully sending the list. The returned list is incomplete and the only workaround is trying to use another connection method (Bluetooth or Cable)
- Hint: J2ME games have
.jar
as it's file extension. On some obscure cases, some games (and screensavers) are Adobe Flash Lite-based, which have a.swf
extension.
5. Getting the files
- To obtain files from the phone, the getfiles command is used, along the file's identifer:
gammu -c "C:\Example\gammu_config.txt" getfiles [File identifier]
- For example, to get step 4 example files, the commands would look
gammu -c "C:\Example\gammu_config.txt" getfiles c:/66
andgammu -c "C:\Example\gammu_config.txt" getfiles d:/predefjava/predefgames/snake3d_C8.jar
respectively. - If everything was sucessfull, something like this should appear:
Getting "snake3d_C8.jar" 100 percent done.267310 Bytes in 10 seconds, 26731 Bytes/sec Saving to snake3d_C8.jar
- Files are stored on shell's current working directory:
- If you are on Linux, running
pwd
will return the current working directory. Navigate there with your favourite file browser. - If you are on Windows, execute
explorer .
to open the current working directory in Windows Explorer.
- If you are on Linux, running