Change move_widevine_data.sh to move L3 files
Bug: b/130252305
Test: nyc-mr2-release -> pi-dev, oc-mr1-release -> pi-dev
nyc-mr2-release -> oc-mr1-release -> pi-dev upgrades with offline
licenses
Merge of http://go/ag/7323341
In N, the L3 files were stored in /data/mediadrm/IDM[uid]/. In O, they
were moved to /data/mediadrm/IDM[uid]/L3/. In P, we moved the contents
of mediadrm to /data/vendor/mediadrm/. For an O->P upgrade, the L3 files
can be read in /data/vendor/mediadrm/IDM[uid]/L3/, but when we upgrade
N->P, the L3 files sit in /data/vendor/mediadrm/IDM[uid]/, unable to be
read. This CL addresses this issue by changing the script to move any L3
files if they exist under this directory to the L3 subdirectory after we
do the bulk move from /data/mediadrm/ to /data/vendor/mediadrm/.
Change-Id: I319c323879766df063d25478046367878023a7cf
(cherry picked from commit 1a6ca36976)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
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
|
||||
@@ -10,6 +11,13 @@ if [ ! -f "$FILES_MOVED" ]; then
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user