Is all data lost after factory reset? I had an LG Optimus I phone (LG E410f) with Android (can't remember the exact version now, but I believe it was 4.1.2) -- and I had OI Notepad pp installed  (app home is here). There were some very important notes saved on that notepad, but I accidentally did a factory reset while trying to boot into recovery (as far as I remember I did boot into recovery, but now everytime I boot it, the phone will start the initial setup again). I did not finish the initial setup after the accidental factory reset, so as to not overwrite any data in case it's possible to recover.

The device was rooted prior to booting into recovery (but I did not install alternative recovery/os/anything -- I just used some apps that needed root access).

So, my question is: is there any way to recover the app data?
You might have a chance via a custom recovery:


boot into recovery-mode and see if adb devices shows your device
if not, or if you have no custom recovery, you can "temporarily load one" using fastboot boot recovery.img (this is not guaranteed to work with all combinations, but I had luck with this using twrp on several devices)
if it shows up, use adb shell to get to its prompt. This should be a root prompt.
use dd to create an image of the relevant partitions (the /data partition is what you're usually after). Have it created on your external SD card.
use adb pull to get the image to your computer
use a file-carving software (see our data-recovery tag-wiki) to get back your deleted content from that image


Detailed information can be found in the article One Way to Use a Linux Computer to Recover Files from an Android Device – including those for some of the tricky parts: how to find your partition (step 4), plus an alternative way to grab it (adb shell su -c "cat /dev/block/mmcblk0" | pv &gt; mmcblk0.raw would work even if you have no external SD card, and write the image directly to your Linux machine).

If you got no Linux machine, there are several LiveCDs available you could use. To use ADB on those, see our adb tag-wiki for a minimal installation; I'd recommend to simply download the minimalist archive from my site, unpack to an empty directory, and run it from there.