blob: a8e89b4311e46acaee116a8d9ecee3ce54c89f70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#!/bin/bash
# this file should be placed last in the PATCHSETS list of
# android-build-configs
function export_config(){
file=$1-optee-p-widevine
echo "Exporting configs from android-build-configs/${file}"
while read line; do
if echo "${line}"|tr -d '[:blank:]'|grep -q '^$'; then
continue
fi
if ! echo ${line} |grep -q '^#'; then
echo "export ${line}"
eval "export ${line}"
fi
done < android-build-configs/${file}
}
echo "Building ExoPlayer.."
if [ -f "external/optee-widevine-ref/build-exo.sh" ]; then
external/optee-widevine-ref/build-exo.sh
RESULT=$?
if [ $RESULT -eq 0 ]; then
if [ -d "optee/tools-images-hikey960" ]; then
mkdir -p out/target/product/hikey960/system/priv-app/
cp $(find ../ExoPlayer -name \*.apk) out/target/product/hikey960/system/priv-app/
else
mkdir -p out/target/product/hikey/system/priv-app/
cp $(find ../ExoPlayer -name \*.apk) out/target/product/hikey/system/priv-app/
fi
fi
else
echo "No ExoPlayer build script found!"
fi
# print newline for readability
echo
echo "Building wvdrmengine and related packages by calling"
echo "'lunch' and 'mmma vendor/widevine'"
echo
if [ -d "vendor/widevine" ]; then
if [ -d "optee/tools-images-hikey960" ]; then
echo "Skip for now"
#export_config hikey960 && . build/envsetup.sh && lunch hikey960-userdebug && mmma vendor/widevine
else
echo "Skip for now"
#export_config hikey && . build/envsetup.sh && lunch hikey-userdebug && mmma vendor/widevine
fi
else
echo "No wvdrmengine dir found!"
fi
|