Extract iOS backups using stock macOS Terminal commands only

It isn't really necessary to use an advanced application to extract iOS backups, since the backups are basically just copies of files on the iOS file system that have been renamed to unique file IDs which are stored in a database (Manifest.db).

With the Terminal commands below, you can extract files from unencrypted backups and rename them to their original iOS names.

First, go to the backup folder:
cd ~/Library/Application\ Support/MobileSync/Backup/

Next, locate one of the directories with a 25-character long hexadecimal name that contains a Manifest.db file and lots of 2-character subdirectories and then:
cd NAME_OF_DIR

Some example commands:

Get an overview of all the domains in the backup:
sqlite3 -csv Manifest.db "select domain from Files" | uniq | less

In the following example, the backup files are extracted as APFS file clones (similar to symlinks), but since it would take a very long time to extract all files in the backup (somewhere around 1 or 2 hours maybe), only a selection of the files are extracted.

Filter out the AppDomain files and the files you can access from Files app, then extract everything else to ~/Desktop/ios-backup (could take around 10 minutes, but it depends on the backup size):
sqlite3 Manifest.db '.mode list' '.once /dev/stdout' 'select "find . -name " || fileID || " | xargs -I{} ditto --clone {} ~/""Desktop/ios-backup/'${PWD##*/}'/" || domain || "/" || relativePath || """" from files' | grep -v "File Provider Storage" | grep -v AppDomain | sh

Same as above but also append the filename/file ID of the source backup file to the name of the destination file:
sqlite3 Manifest.db '.mode list' '.once /dev/stdout' 'select "find . -name " || fileID || " | xargs -I{} ditto --clone {} ~/""Desktop/ios-tmp/'${PWD##*/}'/" || domain || "/" || relativePath || "." || fileID || """" from files' | grep -v "File Provider Storage" | grep -v AppDomain | sh

Use the appended name to find the corresponding original file in the backup folder:
find OG_BACKUP_DIR -name OG_BACKUP_FILENAME