Thanks, I'll take a look.
If you ever want to restore on a newer Android (at least I needed this on lineageos with android 15 or 16), you need to fix SELinux permissions on the data files. This is the script I use after restoring, but before starting the app. Maybe it helps.
#!/bin/bash
# Fix restored file permissions by copying permissions from parent directory
set -euo pipefail
if [ "$#" -ne 1 ]; then
echo "Usage: $0 /data/user/0/<appname>"
exit 1
fi
APP_DIR=$1
SEL_CONFIG=$(getfattr -d -n 'security.selinux' $APP_DIR | grep security.selinux | cut -d'=' -f2- | tr -d '"')
find $APP_DIR -exec setfattr -n security.selinux -v "$SEL_CONFIG" {} \;