[XDA Assist] XDA Visitor:
The question:

Is it actually possible recovering your data on an android device after flashing it with a Stock ROM?

The reason:

The whole story is about to be told, and you know that you don't have to read it.

I went through a few days of hell (and apparently it's a waste of time) in learning how to get back my photos.

1. Lenovo Vibe P1 (16GB internal memory) with 64GB SD card, no root.

A lot of space and a lot of photos. "Job" Gallery, Personal Gallery, "Fun" Gallery.

I decided to keep my photos organized and moved my "Job" Gallery to my SD card, as well as all other files, that I wouldn't miss much if they would get lost, as it often happens with SD cards, I believe.

"Job" Gallery is what I sometimes have to show to people by actually giving them my phone.

In order to keep my Personal Gallery away from anyone I simply moved it into an internal memory Folder with a "." in it's name (Hidden or System Folder is what Android calls them).

2. Personal photos lost.

One of the popular "Cleaning\Boosting" Apps or Android itself (not sure by now) decides to give me an advice to wipe my "Photos Cache", which is what I did, sadly.

It turned out that it deleted my personal photos from the Hidden Folder.

3. Failed Recovery.

Downloading "Data Recovery" apps did not help much since most of them wanted a Rooted device.

And those that could work without Root some why just wouldn't locate anything from my Hidden Folder.

4. Failed Rooting = dead SDcard.

I already knew about how hard it is to root my device, not to mention that going Android6.0 made it even harder, so I never wanted to take that risk.

Now I sort of a had to try, since most of the data I really cared about was lost.

Downloading rooting apps and trying them out somehow killed my SDcard.

5. Failed SDcard Recovery = dead CardReader, dying HardDrive.

While using some Data Recovery software on my PC with SDcard plugged via CardReader, something apparently went wrong and my HardDrive started having one of those dying sounds.

It still worked though, so I could spend some time browsing the recovered SDcard data.

Sadly, those files where unreadable, probably because the recovery software was trial, so it made all of them "Unreadable Before You Pay", hard to tell by now.

I decided to try another Recovery Tool, ignoring the HardDrive issue for now, but my CardReader or the SDcard or both appeared to be dead.

6. Bricking the Vibe.

After spending some time doing backups of my dying HardDrive data, I returned to Rooting my smartphone, but by "manual" methods this time.

Trying all of those scary weird methods while actually learning all the stuff about "flashing" led me into bricking my device.

7. Failed Rooted Recovery.

Somehow, by following few guides, I finally managed to do everything correct (I hope).

I mean, unlocking bootloader by fastboot, gaining temporary root by ADB, flashing TWRP recovery and Stock ROM by QFIL, installing SuperSU, and actually rooting the device.

Right after, I downloaded a bunch of recovery apps to try again, but all of the photos and pictures, found by scanning, were useless.

Even those results before rooting were much better.

8. Failed RAW Recovery.

Surfing different forums, led me to a guide about using PC recovery tools on an Android RAW image.

While surfing, I have already tried about five PC-Android recovery tools and they didn't help much, but I decided to try it anyway.

By using BusyBox, Cygwin, NetCat, ADB, VhdxTool, I made a RAW image of my internal memory partition, converted it into a VHD and mounted it for scanning.

After using about 25-30 recovery tools I did not find any of those desired lost photos.

Scanning results on jpegs are pretty much the same for each tool.

Thank you for reading if you decided to do so anyway.

I also found others who did try to recover their precious data, like I did (after flashing and going through all the problems with rooting and getting a RAW file).

It seems like they all failed as well, so the question is - is it actually possible?

I know it's much easier with an HDD, since I know that those mansions usually keep ghosts for years, while Android totally exhausted and after all, killed me.

I really need help with this, since I see no more ways to try. If you have any advice, please share.

P.S. I'm sorry for my english, not native.