Widevine persistent data is stored in /data/mediadrm, HALs are not allowed to access files in /data. Move persistent data to /data/vendor/mediadrm/widevine for older devices, and persistent data will not be saved under /data/vendor. Test: Play Movies & Tv, Netflix bug: 36601695 Change-Id: I31fdd43b7db327bf6d8343dc95e9883ae6bce70d
22 lines
506 B
Bash
Executable File
22 lines
506 B
Bash
Executable File
#!/system/bin/sh
|
|
|
|
DEST_PATH="/data/vendor/mediadrm"
|
|
FILES_MOVED="/data/vendor/mediadrm/files_moved"
|
|
SRC_PATH="/data/mediadrm"
|
|
|
|
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"
|
|
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
|