From dc26b3ccc0d61960eb8ac76f33d10622c2137f9c Mon Sep 17 00:00:00 2001 From: Athenus Mumei <93336740+athenusmumei@users.noreply.github.com> Date: Fri, 22 May 2026 22:51:30 +0000 Subject: [PATCH] entrypoint.sh: check if files directory exists and is owned by root If the `/app/rootfs/data/data/com.apple.android.music/files` directory is nonexistent or is not owned by root, the wrapper fails to sign in. --- entrypoint.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 5abde2b..c753511 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,6 +3,14 @@ set -e TOKEN_DB_PATH="/app/rootfs/data/data/com.apple.android.music/files/mpl_db/kvs.sqlitedb" +if [ ! -d "/app/rootfs/data/data/com.apple.android.music/files" ]; then + mkdir -p "/app/rootfs/data/data/com.apple.android.music/files" +fi + +if [ $(stat -c %U "/app/rootfs/data") != "root" ] || [ $(stat -c %G "/app/rootfs/data") != "root" ]; then + chown -R root:root "/app/rootfs/data" +fi + if [ ! -f "$TOKEN_DB_PATH" ]; then echo "Login required: account database not found." if [ -z "${USERNAME}" ] || [ -z "${PASSWORD}" ]; then