-
Notifications
You must be signed in to change notification settings - Fork 9
/
ota_preprocess.mokee
54 lines (51 loc) · 1.96 KB
/
ota_preprocess.mokee
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
#
# Copyright (C) 2015-2016 The MoKee Open Source Project
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
SCRIPT=$ANDROID_BUILD_TOP/device/xiaomi/cancro/releasetools/device_check.sh
FILES=("system/system/app/NfcNci"
"system/system/priv-app/Tag"
"system/system/etc/*nfc*"
"system/system/vendor/etc/permissions/*nfc*"
"system/system/framework/*nfc*"
"system/system/lib/*nfc*"
"system/system/vendor/firmware/bcm2079x-b5_firmware.ncd"
"system/system/vendor/firmware/bcm2079x-b5_pre_firmware.ncd"
"system/system/etc/MTP/MTP_Speaker_cal.acdb"
"system/system/etc/MTP/MTP_Speaker_cal_4.acdb"
"system/system/etc/acdbdata/MTP/MTP_Speaker_cal.acdb"
"system/system/etc/acdbdata/MTP/MTP_Speaker_cal_4.acdb"
"system/system/vendor/etc/mixer_paths.xml"
"system/system/vendor/etc/mixer_paths_4.xml"
"system/system/vendor/etc/diracmobile.config"
"system/system/vendor/etc/diracmobile_4.config"
"system/system/vendor/etc/permissions/android.hardware.consumerir.xml"
"system/system/vendor/lib/hw/[email protected]"
"system/system/vendor/bin/hw/[email protected]"
"system/system/vendor/etc/init/[email protected]")
if [ -f $SCRIPT ];then
cp $SCRIPT out/
fi
for i in "${FILES[@]}"; do
parent=$(dirname $i)
if [ ! -z $(check_f z2/$i) ];then
mkdirp out/$parent 2> /dev/null
mv z2/$i out/$parent/
fi
if [ ! -z $(check_f z1/$i) ];then
rm -r z1/$i
fi
done