Most are aware that unlocking the bootloader on Nexus devices typically wipes the /data partition. You can sometimes root without unlocking the bootloader, backup data through a root-enabled app, unlock your bootloader, and then restore your data. However, most would prefer not to go through that hassle. Now, you can unlock as normal, and get that wiped data back.
Usually the operating system will just delete the reference pointer in the index that says that a file exists with such-and-such name and it’s located at this position on the hard disk / memory location…The issue is that data recovery tools need an actual mounted drive in order to dig deep and unearth those funny pictures of cats you so tragically deleted by accident. These newest batches of phones don’t have external SDcards which are super easy to mount as drives. Internal memory mounts as MTP/PTP which is not treated as a mounted drive and cannot be scanned by these data recovery tools.
Thus, a method was created to scan those drives and recovered the data. The method is for the Galaxy Nexus, but should actually be compatible with any device with an internal SD card. While it is for use on Windows 7, it should be easily translated over to Linux. It’s a pretty long process, but after following it, users will be able to use their favorite data recovery tool on their devices to recover the lost data.