In Photoshop 5.5:
Image > Mode > Indexed color.
If the bmp is already indexed, I switch back to RGB (to allow full spectrum available), put the HTC "invisible" grey in background, then go back to indexed color format.
There are a few choices within the indexed color option, so the best guess is "Adaptative" and "8bit/pixel" for color depth, which defaults the number of colors to 256.
The first one I just go "indexed color" > "RGB" > (and back to) "indexed color".
The second one I replace the grey that is in the original picture with the one you say, R127,G127,B127, but it shouldn't work because it seems all the other bmps in the squads folder use 176-176-176.
So the first one I reposted should be the better.