The second sentence is correct. Most verbs do something "to" the predicate. "To substitute" does something "on behalf of" the predicate. Whenever you are doing something on behalf of another person or thing, you must use the word "for." This also allows you to imply substitution. "I'm in the meeting for Ms. Alford," is a short form of "I'm substituting for Ms. Alford in this meeting."
On a side note: On behalf of those of us who grew up without smart phones, the plain word "phone" almost always brings up an image of a plain old-fashioned phone, which doesn't substitute for a laptop. You might consider saying "smart phone" rather than "phone." It'll be another 25 years before "phone" always means "smart phone" to the majority of unknown readers.