I wanted to mount my mobile phone on a tripod and I ended up creating this scad model.
Enter length and thickness of the mobile (w/ or w/o case if you want). One can also increase/decrease the wall holding the mobile, default as 2mm.
Worked perfectly on the first try.
The threads for the tripod mount is the common 1/4-20.