N900 Circles of Hell

So I recently bought a Nokia N900 from ebay. It arrived in a nice little package and while the seller promised the phone would be new, it was actually a refurb.

The phone came pre-loaded with a name and some contacts entirely in Chinese. I tried calling the numbers with my sim card, but I only recieved an automated recording saying the number you have dailed is no longer available and then some code with the letters NY in it… which was interesting in it’s own right as I was calling from New York State.

I set out to preform a factory reset on my N900. Doing a factory reset, which to me entails wiping the contacts, calendars, cookies, and any other personal information from the device and resetting it to it’s fresh out of the factory state seems like it would be a simple operation. However, as I would soon come to learn, nothing is simple with the Nokia N900.

The Nokia N900 is more comptuer than phone. It has a 600Mhz processor and runs debian. While iPhones and Android Phones have a built in software factory reset, and older Nokia phones can simply use a four digit numerical code to reset. Since the N900 is anything but simple, doing a factory reset is on the opposite specturm of ease from the above methods.

The Maemo wiki details a two step process for preforming a factory reset (i.e. flashing the device). There are two types of disc storage on the N900: the eMMC storage which holds user-specific settings (/home/user, for example) and the rootfs storage which holds the root file system. According to the wiki, it’s every important to flash the eMMC storage first then take care of the rootfs. Luckily, the commands for flashing the two are virtually identical.

First, I needed to download the flasher program from the Maemo development site. The Linux-based package I downloaded was a nicely compiled binary that found my USB ports and ran fine. YMMV.

Second, I needed to download both the eMMC image and the rootfs image from here. Note: the device ID number is also printed on a sticker on the box; it’s not necessary to pull out the battery (yet). Remaing the eMMC and rootfs .bin files to something less verbose makes life easier.

Once all the *.bin files were placed in my flasher-3.5 folder, doing the flashing was simple.

Don’t forget, eMMC first, then rootfs

./flasher-3.5 -F eMMC.bin -f

A message saying Suitable USB device not found, waiting indicates that the N900 needs to be turned off, then pluged into a USB port while the ‘u’ key is held down. I guess this boots the device into special USB flashing mode, and I still can’t figure out if this key is easier to hold down with my finger or the stylus.

Flashing the eMMC takes a few minutes, then to be sure everything worked, I pulled out the battery (per the wiki instructions (!)). Once again, leaps and bounds from the iPhone and Android in terms of simplicity.

After the eMMC is flashed, the rootfs needs to be flashed. It’s the same command, only the -R flag is tagged on to reboot the device.

./flasher-3.5 -F rootfs.bin -f -R

Ok, yay! Now the N900 is back to factory settings and essentially a new device. All that I had to do was:

  1. Download a binary
  2. Boot the device in a special ‘flashing’ mode
  3. Flash one part of the disc
  4. Pull out the battery
  5. Flash the other part of the disc!

Wasn’t that simple?