By placing a .35mm pinhole in front of the smartphone lens, everything in front of the camera becomes equally focused.
Macro photos can be taken by bringing objects very close to the lens/ pinhole combo.
Any kind of homemade pinhole will yield results, with improved sharpness coming from from laser-drilled / acid-etched pinholes.
Example image follows: