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
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 Bluetooth name of your device)
, 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 prompted `Confirm passkey XXXXXX (yes/no)`
- Type a passkey. You will be prompted for a passkey on both devices. Enter any same passkey in both devices.
- Now you can set
agent off
andpairable off
again.
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.
You will need the Bluetooth MAC adress 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 hex characters shown at the first line)
Windows
ToDo: Document procedure, both with Windows bluetooth stack and Toshiba's bluetooth stack.
Data cable
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 [NokiaCableArchivedPages] 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 /dev/{phone}
(as superuser) to make the device node readable/writable by everyone (non-permanently).
Windows
ToDo: document procedure
IrDA
It is also possible to connect to IrDA (Infrared) capable phones via a 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] device = [Device Node/Bluetooth Address/COM Port] name = [Phone's friendly name, can be anything user-set] connection = [Connection mode]
Create a empty text file and type/paste the following template:
[gammu] device = name = connection =
- device:
- If connecting over Bluetooth, set it to the XX:XX:XX:XX:XX:XX Bluetooth address of the phone. If connecting via data cable, under Linux set it to the phone's interface device node, under Windows set it to the phone's COM port, as
comX:
- name:
- An identifier for the phone, can be anything user-set
- 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, bluephonet for connections over Bluetooth and fbusdku5 or dku2 for direct USB connections. Please refer to this documentation snippet from Gammu [gammusnippet] for more information.
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] device = com8: name = Nokia 3100 connection = fbus
- (Nokia 7210 at /dev/ttyUSB0, Linux)
[gammu] device = /dev/ttyUSB0 name = Nokia 7210 connection = fbus
- (Nokia 7230 over Bluetooth)
[gammu] device = 9C:4A:00:00:00:00 name = Nokia 7230 connection = bluephonet
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 tells Gammu that the following argument 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 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.