Android network unlock

I saw that a company had managed to unlock the g1, only needing the IMEI number to do so. This made me wonder how much information I would be able to obtain about the unlocking process, just by looking at the code, so I grabed a copy and started searching (thanks to grep), this is what I got so far.

From the video showing of the unlocking process, I found the string (SIM network unlock PIN:) displayed when the user is about enter the unlocking key, and started by searching for this, and got a file packages/apps/Phone/res/values/strings.xml, which containes the line “<string name=”label_ndp”>SIM network unlock PIN:</string>”, and some additional lines with content like “Network unlock successful”, this seems to be some translation like file (other translation is also in the folder “values”).

Next I tried searching for “label_ndp”, and among others got the file packages/apps/Phone/res/layout/sim_ndp.xml, which seems to be a layout file, for tha network unlock screen (or network depersonalization as it seems to be referrenced by the system), which has a line containg “android:text=”@string/label_ndp”/>”.

By searching for “sim_ndb”, i found a file, containing a line “setContentView(R.layout.sim_ndp);”, “packages/apps/Phone/src/com/android/phone/”. This file seems to be loading the layout, and linking it to some code, like the lines:

My next search was on the string “supplyNetworkDepersonalization“, which gave a about a handful of results, the most interesting was /frameworks/base/telephony/java/com/android/internal/telephony/gsm/, which has the following function

This is about as far as I got, if any one else has some interresting knowledge/links about this subject, please let me know…