Drop the smartphone along an array of magnets and analyze the recorded magnetic field to extract the linear acceleration. (Note, that there is a simple an alternative version using acoustic detection.)

This experiment has been developed by Simon Goertz as a part of his thesis (in German) on smartphone experiments for linear acceleration. Another experiment from his thesis uses the same method to explore linear acceleration on an air track.