It is often the case that a phone is locked and you cannot bypass the login screen. For many phones, JTAG is the answer. JTAG, or Joint Test Action Group, is an Institute of Electrical and Electronics Engineers (IEEE) standard for testing chips. Test access points (TAPs) are used to directly access the chip and extract data. This was designed for a wide range of chips and works well on many phones. Android phones often have the TAP order published. Technically one can JTAG an iPhone, but finding the TAPs is a challenge because they are not published.
IEEE 1149.1 defines these connector pins:
TDI (Test Data In)
TDO (Test Data Out)
TCK (Test Clock)
TMS (Test Mode Select)
TRST (Test Reset), optional
Basically, the forensic examiner takes the back off of the phone (and sometimes has to strip it down even further), and then connects wires either by soldering or by using some other means (such as using special connectors called jigs) to the TAPs of the phone’s memory chip. Those wires are also connected to a JTAG device (the RIFF box is my personal favorite) that uses software to extract the data directly from the memory chip. The output is raw binary data, but many phone forensics tools allow the examiner to import that raw data dump, and then the tool can analyze it.
A related technique is the chip-off. In that technique, the chip is removed completely and put in a special device to extract the data. This is rarely used because chip-off destroys the phone. JTAG, if done properly, won’t damage the actual phone, and the phone can be reassembled when the process is done.
Note that JTAG will get around passcodes/passwords/PIN numbers, but if the chip is encrypted, then neither JTAG nor chip-off will decrypt the encrypted information.