How can I add an internal pocket to pants that don't have one? I've got a number of pants and shorts that I'd love to be able to carry my phone in, especially a couple of running shorts. But, they were (inconsiderately!) designed with no pockets.

In the case of too-small pockets, I've sometimes modified the garment to enlarge the pocket by cutting the inside and adding more fabric. But how should I go about adding a pocket if there's no pre-existing opening?

I would like to have a pocket approximately the dimensions of a smartphone, and wouldn't put anything heavier than the smartphone (and maybe one car key) in it. There's no liner, just one layer of fabric (spandex) with a hem at the side of the legs. The waistband is a separate piece sewn on top, not a fold-and-sewn waistband.
You could sew a passepoil pocket (I don't know if there is a more common way to call it in English), and maybe use a zipper to close it. If there is a seam at the side, you might want to use that as the location for the pocket.
Anyways, for instructions (in Dutch, but with a lot of pictures) you can check http://fromfabrictofashion.nl/diy-de-paspelzak/ . If anybody knows an English site, please feel free to edit!
Basically it's about sewing a rectangle to the right side of the fabric, then cut through both layers of fabric, and pull the rectangle through the hole. You can attach the pocket to that rectangle. Or, if you make the rectangle large enough, that could already be the pocket.