-
Notifications
You must be signed in to change notification settings - Fork 0
/
extract-files.sh
executable file
·46 lines (37 loc) · 1.93 KB
/
extract-files.sh
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
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -e
export DEVICE=jason
export DEVICE_COMMON=sdm660-common
export VENDOR=xiaomi
export DEVICE_BRINGUP_YEAR=2017
./../../$VENDOR/$DEVICE_COMMON/extract-files.sh "$@"
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
DEVICE_BLOB_ROOT="$MY_DIR"/../../../vendor/"$VENDOR"/"$DEVICE"/proprietary
sed -i 's/\x1e\x40\x9a\x99\x99\x99\x99\x99\x3b\x40\x10/\x1e\x40\x9a\x99\x99\x99\x99\x99\x3b\x40\x01/' \
"$DEVICE_BLOB_ROOT"/vendor/lib/libmmcamera_jason_s5k3p8sp_sunny.so
patchelf --remove-needed libandroid.so "$DEVICE_BLOB_ROOT"/vendor/lib/libarcsoft_beauty_shot.so
patchelf --remove-needed libandroid.so "$DEVICE_BLOB_ROOT"/vendor/lib/libFaceGrade.so
patchelf --remove-needed libandroid.so "$DEVICE_BLOB_ROOT"/vendor/lib/libmmcamera2_stats_modules.so
patchelf --remove-needed libandroid.so "$DEVICE_BLOB_ROOT"/vendor/lib/libmpbase.so
patchelf --remove-needed libandroid.so "$DEVICE_BLOB_ROOT"/vendor/lib/libVDClearShot.so
patchelf --remove-needed libgui.so "$DEVICE_BLOB_ROOT"/vendor/lib/libmmcamera_ppeiscore.so
patchelf --remove-needed libgui.so "$DEVICE_BLOB_ROOT"/vendor/lib/libmmcamera2_stats_modules.so
patchelf --replace-needed libicuuc.so libicuuc-v28.so "$DEVICE_BLOB_ROOT"/vendor/lib/libMiCameraHal.so
patchelf --set-soname "libicuuc.so" "$DEVICE_BLOB_ROOT"/vendor/lib/libicuuc-v28.so