There isn't an easy way, but still, it might be possible. The keyword to it is File carving (find some more links on this topic in our data-recovery tag-wiki).
Make sure to not have any modifications/changes going on on your device, or at least as few as possible! Each change (written file etc.) lowers your chances of a successful recovery.
A crucial pre-condition to this is either a rooted device, or a custom recovery.
- With a custom recovery: Take a nandroid backup
- With a rooted device: create images from your storage
For manual image creation, you'd first need to figure where the partitions are that you need. Your data is usually stored in two places: the
/data partition, and your SD card(s). Let's find where they are:
- connect to your device via adb (follow up to the adb tag-wiki for details if you're not familiar with this) using
- execute the
- in the output, look for the corresponding entries to
/data and your SD cards
- take a note of the corresponding device entries (usually starting with
At this point it would be helpful to have an empty external SD card:
- still connected via
adb shell, get root access by executing
dd if=<data-dev> of=/sdcard/data.img (replacing
<data-dev> with the device of your
/data partition), repeat similarly for your internal SD card
adb shell (simply type
exit and hit the return key)
- pull the files to your computer using
adb pull /sdcard/data.img data.img, or connect the card using a card-reader to access them directly from your computer
If you don't have an external SD card, but have a Linux computer available (I cannot say whether it works on Windows as well, but it should at least on a Mac), you can instead try the following:
adb shell "stty raw; cat <data-dev>" > data.img
This would create the image files directly on your computer.
Now, once you've got the image files on your computer, you can examine their contents using some forensics software. TestDisk would be a suitable tool, and is available for free, plus runs on most major systems. For details on this, you might wish to check One Way to Use a Linux Computer to Recover Files from an Android Device. The TestDisk Wiki (see previous link) also includes several articles on how to recover deleted files.