Move persistent data to /data/vendor.
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
This commit is contained in:
21
libwvdrmengine/move_widevine_data.sh
Executable file
21
libwvdrmengine/move_widevine_data.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user