在安卓手机上使用 Unlock Music CLI 版
准备
- 下载 Termux 并安装
- 下载并安装 MT 管理器 非必须,但推荐
- 下载 Unlock Music CLI 版,选择 Linux arm64 版本
解压
um-linux-arm64-vx.x.xx.tar.gz并将um移动到系统目录解压
um-linux-arm64-vx.x.xx.tar.gz可用 MT 管理器解压
设置外部存储访问权限
termux-setup-storage在 Termux 中运行以下命令:
mv /storage/emulated/0/Download/um $PREFIX/bin/注
/storage/emulated/0/Download/um是你解压um后的um实际文件路径
授予执行权限
chmod 550 $PREFIX/bin/um检查是否安装成功
um -h
使用
um -i /storage/emulated/0/Download/KuGouLite/Music -o /storage/emulated/0/Music提示
-i 参数指定你要解锁的歌曲目录,-o 参数指定你要输出的歌曲目录。
扩展
下面是我自用的一个脚本,可以自动解锁酷狗概念版下载的歌曲并输出到指定目录,再自动删除源文件:
um.sh
#!/bin/bash
source_dir="/storage/emulated/0/Download/KuGouLite/Music/"
destination="/storage/emulated/0/Music/"
for file in "$source_dir"*; do
timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
warning="\033[1;33mWARNING\033[0m"
if [[ "$file" == *.kgm.flac ]]; then
new_file="${file//_HQ/}"
new_file="${new_file//_SQ/}"
new_file="${new_file//.kgm.flac/.kgm}"
mv -- "$file" "$new_file"
um -i "$new_file" -o "$destination"
rm "$new_file"
echo -e "$timestamp $warning successfully removed \"$new_file\""
elif [[ "$file" == *.mp3 ]]; then
new_file="${file//_HQ/}"
new_file="${new_file//_SQ/}"
if [[ "$file" != "$new_file" ]]; then
mv -- "$file" "$new_file"
file="$new_file"
fi
mv -- "$file" "$destination"
echo -e "$timestamp $warning successfully moved \"$file\" to \"$destination$(basename "$file")\""
fi
done贡献者
更新日志
2025/12/17 06:10
查看所有更新日志