Recently I upgraded from Android 4.4.4 to Android 5.0 (Lollipop) on my Samsung Galaxy S5. The upgrade took place in two steps, and I needed to delete a few hundred megabytes of apps and data to make room for the installation. I was a little tense, because the last time I tried something slightly experimental I had to do a factory reset of my phone. I had changed a setting on the phone to use Android Runtime instead of Dalvik and ended up doing a factory reset to get a working phone back (read the whole thing here).
I became even more tense when I saw virtually the same screen telling me it was optimizing my applications (381). This seemed to turn out okay, because when it was done I was able to pick up the phone and start playing with the settings. I looked at many settings and some apps (some apps didn't work with the new version of Android - not sure if it was because it is a new version or because of what I learned after I had upgraded, Android 5.0 uses ART instead of Dalvik).
It was one of the security settings that I changed that c aused part of the problem. There was a setting to lock your SIM card if someone tried to change it or if it was changed. This is actually not so new, but it is the first time I tried it. There is a nice list of what and how to do this as well as Android versions supported here. Anyway I did do it, my first mistake, and didn't really think further about it.
The next day, my wife told me she had been trying to get in touch with me by phone and text, but I hadn't received anything. This was particularly odd since I was getting email and had cast a movie to my Chromecast on my TV over Flixster from my phone the night before. I thought about and figured out that my phone was only getting anything when I was using WiFi.
I decided I needed some help. Normally I can fix these things on my own; after all it is part of my job. This time I decided to call Samsung first for support -- my second mistake. Although Samsung had done an excellent job helping me out previously, when I let them do the same this time, they ended up changing something on my phone that locked the SIM card. My phone had been remotely bricked. Samsung Support then suggested that the only way I could fix this is by contacting Verizon Support.
So Samsung bricked by phone and it was okay... I called Verizon, hoping they could help. They gave me a couple of codes to try, to no avail. The next day I contacted both Samsung and Verizon again. Samsung was willing, after some convincing, to create a ticket for me to talk to another support representative over the phone (instead of live chat).
In half the time that the Samsung chat took, Verizon was able to completely solve my problem. The representative there, after trying everything else, gave me a final code to try and suggested to use all my tries up so I wouldn't leave myself vulnerable (good advice). It didn't matter because the final code combination, unlock code and pin code he gave me did some kind of overwrite of the any previous code and got me my phone back - hallelujah!