This is how I protect my cellular phone when carrying it in a backpack.
The outer shell is a plastic box that came from a pharmacy. Glued to the lid is blue plastic
foam from a sleeping pad. The box is filled with light-yellow foam used to fill air gaps
around doors and windows: I sprayed it from a can into the box with the phone in place,
wrapped in plastic, then trimmed the rigid foam as required, including the two "grab slots."
The black stuff (source forgotten) is similar to Neoprene and lies atop the phone as
“fine-tuning material” that immobilizes the phone vertically.
.