As noticed by others on the Internet, it is possible to recover photos from an Android phone that were deleted. It is impossible, as far as I know, to recover the full resolution photos. You may, however, recover the thumbnails and those are often large. This also allows you to recover photos which weren't saved, like those from text messages. The problem though is that methods I found while googling require you to edit the image files in a hex editor. For example, as demonstrated in this video. I've instead written a python script which automates this greatly simplifying the fact that you need to recover all the pictures to find one in particular.