Especially for recovering JPEG files, I would strongly propose to try the recovery software PhotoRec. It was originally developed to do exactly that, recover not files, but JPEG photos, on the disk - not even looking at the file system. As long as nothing got overwritten, it should recover a large part I expect.
I did not need it myself yet, but the way it works makes very much sense.
Runs on Linux, Windows, Mac, licensed under GPL v2+
PhotoRec
comes in one package with the related software TestDisc
- the package file named testdisk-* should contain both programms: TestDisk & PhotoRec Download
Note on recovering other files than photos:
PhotoRec should work well for many other file types, the programm PhotoRec was developed to be good at recovering photos, but was soon extended to work with other file formats with some kind of predictable structure too.
Interestingly, the open source license has a real practical relevance in this case: If the card is not removable, and you can not get an image from it to be used in a PC - you could, theoretically, compile/port it for your phone, to run it there in text mode per ssh connection from a PC.