Files
vendor_google_walleye/proprietary/bin/move_widevine_data.sh
Christian Hoffmann 8d1c1d3abf Import blobs from RP1A.201005.004.A1
* And subsequent modifications taken from
* repo: https://github.com/TheMuppets/proprietary_vendor_google
* branch: lineage-19.1
* as of: a434787e0f1855e6e6df58301669b0b6d8dd3d61

Change-Id: Ia82b29ab0af3ef51e8f42b6b3ff79fae4e072978
2022-10-01 08:39:50 +02:00

30 lines
817 B
Bash
Executable File

#!/system/bin/sh
DEST_PATH="/data/vendor/mediadrm"
FILES_MOVED="/data/vendor/mediadrm/files_moved"
SRC_PATH="/data/mediadrm"
L3_FILE_PATTERN="ay64.dat*"
if [ ! -f "$FILES_MOVED" ]; then
for i in "$SRC_PATH/IDM"*; do
dest_path=$DEST_PATH/"${i#$SRC_PATH/}"
if [ -d "$i" ]; then
mkdir -p $dest_path -m 700
mv $i "$DEST_PATH"
for file in ${dest_path}/${L3_FILE_PATTERN}; do
[ -e "${file}" ] || continue
# We need to move any L3 files in the IDM folder to the L3 subfolder.
l3_dir="${dest_path}/L3/"
mkdir -p "${l3_dir}" -m 700
mv "${file}" "${l3_dir}"
done
find $dest_path -print0 | while IFS= read -r -d '' file
do
chgrp media "$file"
done
fi
done
restorecon -R "$DEST_PATH"
echo 1 > "$FILES_MOVED"
fi