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:
Edwin Wong
2017-12-01 16:44:53 -08:00
parent 58fe9fd1fe
commit 59fcc20138
5 changed files with 54 additions and 3 deletions

View File

@@ -3,6 +3,24 @@
#
LOCAL_PATH := $(call my-dir)
# -----------------------------------------------------------------------------
# Copies move script to /system/bin.
# The mv command preserves SELinux labels(i.e. media_data_file).
# We need to run restorecon to put the correct context after the move.
# However, restorecon is not implemented for /vendor/bin, so we put
# the script in /system/bin.
#
include $(CLEAR_VARS)
LOCAL_SRC_FILES := move_widevine_data.sh
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_MODULE := $(LOCAL_SRC_FILES)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_OWNER := widevine
include $(BUILD_PREBUILT)
# -----------------------------------------------------------------------------
# Builds android.hardware.drm@1.0-service.widevine
#
@@ -30,6 +48,7 @@ LOCAL_HEADER_LIBRARIES := \
LOCAL_MODULE := android.hardware.drm@1.0-service.widevine
LOCAL_INIT_RC := src_hidl/android.hardware.drm@1.0-service.widevine.rc
LOCAL_REQUIRED_MODULES := move_widevine_data.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin/hw
LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE_OWNER := widevine