- Verify that the phone is really network locked by "calling" *#7465625#.
- Root the phone (so that you can become a superuser below)
- Download and install Android SDK Manager (rev. 16).
- Enable USB debugging on the phone by enabling Menu > Settings > Applications > 'USB Debugging'.
- Connect the phone to the computer via USB cable.
- Start the Windows Command prompt (e.g. Start Menu -> cmd) and go to the ' platform-tools' directory where the Android SDK is installed, e.g. cd "c:\Program Files (x86)\Android\android-sdk\platform-tools\".
- Run ADB by executing 'adb shell'.
- In the ADB shell, become a superuser by executing 'su' (prompt will change from a dollar sign to a hash symbol confirming you are a superuser).
- Copy /dev/block/bml5 to the SD card by executing 'cat /dev/block/bml5 > /sdcard/bml5.img'.
- Exit superuser mode by executing 'exit' (prompt will go back to a dollar sign).
- Exit ADB by executing 'exit'.
- Copy the bml5.img file on the SD card to the computer by executing 'adb pull /sdcard/bml5.img'.
- Open the bml5.img in a hex-editor, e.g. TotalCommander.
- Search for the hexadecimal string "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 30 30 30 30 30 30 30 30". There was several matches, where some were preceeded by '00000000' (non informative) and some with, say, '15351874' (the 8-digit unlock code; different for each unique phone). Done!
Then I disconnecting and turned off the phone, replaced the SIM card with a SIM card from another provider, and started up the phone. Then the phone detected the new SIM card and that the phone was locked to another provider and asks you to 'Enter Network Lock Control Key'. Entering the above 8-digit phone and voila, the phone was unlocked. Now my phone works also with this other SIM card. Also, calling '*#7465625#' now reports (it used to be that the first one was [ON]):
Network Lock [OFF]
Network Subset Lock [OFF]
SP Lock [OFF]
CP Lock [OFF]
Network Lock [OFF]
Network Subset Lock [OFF]
SP Lock [OFF]
CP Lock [OFF]