![](/static/253f0d9b/assets/icons/icon-96x96.png)
![](https://lemdro.id/pictrs/image/6d56629c-a7b1-465d-8b58-ad77926e3a41.png)
Do you have access to a computer with an sd card reader? I believe the best and safest thing to do is to connect it to a computer, create disk image from it and try ro use a data recovery tool in the image file.
Edit: if you only have the phone, maybe you could try looking for apps to copy a disk image from the sd card and to recover data or try using some terminal emulator or one of those apps that install a linux distro inside android to use the dd command and then use testdisk and photorec tools. I recommend the second option, because the tools are open sourc and well tested
I also prefer to get my software from the distro’s repos, but for software from third parties, flatpak adds a security layer, making it more secure when compared, for example, to aur.