By default iOS applications store their files sandboxed to maximize security. But sometimes you need to backup application files directly.
In my case I had an older voice recording software (QuickVoice Pro) and a lot of recorded audio files. These files could not be moved to iCloud since the software does not support that feature. To access and archive the raw audio files, I had to look for a free and official way to backup those files (and fortunately found one).
Using a Mac:
- iTunes / Finder for locally backing up the iOS device see apple docs for further instructions
- foremost (FOSS)
- disk utility
- terminal to execute the recovery command (with admin rights)
The preperations are straight forward:
- Backup your iOS device with iTunes / Finder
- install foremost (
brew install foremost)
- Open your backup iOS folder and check that your backup has been created (
Recover (all) files
Now open the Disk Utility software and select
Create Image from Folder (Shift + Meta + N). Now select the backuped iOS folder from the instructions above (your folder name will differ from the shown one of course):
none and click
Find the created and mounted dmg image from the previous step (in my case it is
$ diskutil list
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +6.2 GB disk7
Physical Store disk6s2
1: APFS Volume 00008020-00011844025... 5.4 GB disk7s1
Now we tell foremost to recover all files from the backup image (sudo is needed):
$ sudo foremost -t all -i /dev/disk7
The process takes some time, depending on the volume of files.
After foremost is done, you'll find all recovered files in a folder like
~/output_$DATE_OF_RECOVERY/, grouped by recognized file types.
Foremost is a very powerful, which can be extended by custom file types. You can find out more about foremost in the ubuntu docs for example.
Happy recovering :)