How can I recover a photo taken as my phone shut down?

MeinOne

New member
May 27, 2018
2
0
0
Visit site
I was taking a photo and at the same time my phone shut down from low battery, now the photo appears in gallery (as an image of a lightning bolt in a triangle) but it has 0B and it's resolution is -1x-1 pixels. Is there any way I can recover it?

I'm using an HTC One M7
 

Rukbat

Retired Moderator
Feb 12, 2012
44,529
26
0
Visit site
There's nothing to recover. The sequence is:

Write an entry to the directory
Get space enough for the picture from Linux
Write the picture to the space
Write the location of the space and the file size to the directory.

Your phone got as far as the first step before it shut down. It never saved the picture, so it's not in storage so you can't "recover" it. About all you can do is delete it so the file system doesn't get messed up with an orphan entry. (All that gets "deleted" is the first byte of the entry in the directory, but that's enough. If Linux actually appropriated space, that space will get returned to the "unused space pool". If you don't delete it, you'll probably lose that amount of space forever [or until you do a factory reset].)