Since it’s introduction in 2009 the Nokia N900 has always been a very special Smartphone. And when you have forgotten your lock code you will quickly notice this once again. I had an old N900 lying around which I want to use in a project and of course I have forgotten the lock code. Without your lock code the N900 won’t boot and you can not access your phone. To make the phone usable again I had to reflash the N900 with an old version of the firmware, brute force the lock code with a password cracker, reflash it with the newest version of the firmware and activate the community updates.
The first question was where can I find the firmeware and the flash tool? Since Nokia is bought by Microsoft and Maemo, the Debian based operating system of the N900, is discontinued everything Maemo related on the Nokia servers is gone (http://tablets-dev.nokia.com/nokia_N900.php), even the unofficial clone of this page (http://skeiron.org/tablets-dev/nokia_N900) is not available anymore. But there is copy of the unofficial clone on archive.org:
- http://web.archive.org/web/20131117084237/http://skeiron.org/tablets-dev/maemo_dev_env_downloads/
- http://web.archive.org/web/20131117073524/http://skeiron.org/tablets-dev/nokia_N900/
So if you need any of these files you better download them as quick as you can.
I downloaded the PR1 release of Maemo, the whole process of retrieving the lock code is only possible with the PR1 version of Maemo, I tested the PR1.3 and after a complete flash of the eMMC and rootfs it still asks for the lock code at boottime.
- PR1 Vanilla version of the eMMC content for Nokia N900: RX-51_2009SE_1.2009.41-1.VANILLA_PR_EMMC_MR0_ARM.bin
- the first Maemo 5 Global release for Nokia N900, also called the FIASCO/rootfs image: RX-51_2009SE_1.2009.42-11_PR_COMBINED_MR0_ARM.bin I also downloaded the Maemo Flasher-3.5 Tool, maemo_flasher-3.5_2.5.2.2.tar.gz and extracted it’s content.
(Note: I also downloaded the PR1.3 firmware, Nokia’s last official major Maemo 5 update, to flash this version in the last step. The files are called RX-51_2009SE_10.2010.13-2.VANILLA_PR_EMMC_MR0_ARM.bin and RX-51_2009SE_20.2010.36-2_PR_COMBINED_MR0_ARM.bin.)
After I had everything together I started the flash process:
1) Charge the N900 battery till the led is green
2) Flash eMMC image
Execute the flasher tool on your computer:
The output will look like this:
Plug in the powered down N900 while holding the u key to activate RD mode. Text similar to the following will be displayed on the computer:
Remove the N900 battery to power it down. The manuals point out that it is not a good idea to boot the device in this state and removing the battery is the fool proof way.
3) Flash FIASCO/rootfs
Execute the flasher tool again:
-R enables a reboot of the N900 after flashing, on the computer:
Plug in the powered down N900 while holding ‘u’ key, text similar to the following will be displayed on the computer:
Remove USB cable, the N900 boots, blinking dots and finally Maemo! However the lock code is still set but the automatic lock at boottime is disabled. This is only possible with the PR1 firmware and was changed in later firmeware versions.
4) Retrieve the old lock code
To retrieve the lock code I needed to obtain its hash code and brute force it. To achive this you need to activate the Maemo-Extras repository in the Application Manager:
- Navigate to the application menu (tap the title bar)
- Select Application catalogs
- Select Maemo Extras
- Uncheck Deactivated I installed the aplication rootsh to get root privileges by executing sudo gainroot on the command line. After that I activated the repository Extras-devel in the Application Manager:
- Navigate to the application menu (tap the title bar)
- Select Application catalogs
- Select New
- Enter a catalog name of Maemo extras-devel
- Enter a web address of http://repository.maemo.org/extras-devel/
- Enter a distribution of fremantle
- Enter components of free non-free
- Select Save to install John The Ripper the password cracker tool:
Extract the hash to the file /home/user/MyDocs/hash
Now get the key:
It took the phone only a couple of milliseconds to brute force the 5 digit code. -i:digits tells the tool to only use numerical digits since the phone only accepts numerical input for the password which speeds up the whole process. Now write down the lock code, you will need it later, or change it to the phones default 12345.
5) Install the latest offical Maemo firmware
I followed the same steps as above with the latest PR1.3 release.
- Charge battery
- Flash eMMC
- Flash FIASCO When the phone boots it is asking for the lock code again but this time we are prepared! Settings - About product shows Version 20.2010.36-2.
6) Enable Community SSU
The Community Seamless Software Update (CSSU) is being developed by the Maemo community as a continuation of, and expansion on, Nokia’s update support. It aims to deliver fixes which would be difficult to deliver through Extras (like core Maemo packages). It won’t, however, bundle software which can (or could) be installed through the Extras repositories. After all these years the community is still alive, the last Maemo update was released 01.01.2015.
You can add the repository by opening http://repository.maemo.org/community/community-fremantle.install in the browser on the phone. The Application Manager will launch and ask to install the Community SSU enabler. After the installation close the Application Manager and tap on the brand new Community SSU icon in the applications menu. The Application Manager will start again and present the Maemo 5 Community SSU Package ready to install.
WRITTEN BY
Sebastian Glahn is a Senior Software Engineer living in Cologne. He writes about Software Development, 3D-Printing, Robots and other stuff. He is also a maintainer of several open source projects.