Scotty from Strange Parts famously built a fully-functioning iPhone from replacement parts sourced in Chinese electronic wholesale markets. Now he’s gone a step further, and upgraded one to have a headphone jack: “Is it possible? I’m headed to Shenzhen to find out!”
I’m pretty proud of the final implementation. I took apart an Apple lightning to headphone adapter, put that inside the phone, and hooked it up by man in the middling the lightning jack with a flexible PCB. The PCB has a switching chip that switches between connecting the headphone adapter to the phone by default, and then disconnecting it and connecting the lightning jack when something is plugged into it. I have a couple other timer chips that briefly disconnect everything from the phone when something is connected/disconnected to improve the reliability of the phone detecting when something is plugged/unplugged (otherwise it sometimes gets confused).
You won’t be doing this work with the soldering iron grandpa left ya.