forked from gtbluesky/patchrom_ns
-
Notifications
You must be signed in to change notification settings - Fork 4
/
customize_framework.sh
executable file
·46 lines (41 loc) · 1.67 KB
/
customize_framework.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
46
#!/bin/bash
# $1: dir for miui
# $2: dir for original
APKTOOL="$PORT_ROOT/tools/apktool --quiet"
BUILD_OUT=out
SEP_FRAME="framework_ext.jar.out"
if [ $2 = "$BUILD_OUT/framework" ]
then
# remove all files at out/framework those exist in framework_ext.jar.out
for file2 in `find framework_ext.jar.out -name *.smali`; do
file=${file2/framework_ext.jar.out/$BUILD_OUT\/framework}
echo "rm file: $file"
rm -rf "$file"
done
# remove all files at out/framework those exist in telephony-common.jar.out
for file2 in `find telephony-common.jar.out -name *.smali`; do
file=${file2/telephony-common.jar.out/$BUILD_OUT\/framework}
echo "rm file: $file"
rm -rf "$file"
done
cp -rf overlay/framework.jar.out/smali/* $BUILD_OUT/framework/smali
cp -rf ../android/Editor/* $BUILD_OUT/framework/smali/android/widget/
# move some smali to create a separate $SEP_FRAME.jar
# including: smali/miui smali/android/widget
fi
if [ $2 = "$BUILD_OUT/framework_ext" ]
then
# remove all files at out/framework1 those exist in framework.jar.out
for file2 in `find framework.jar.out -name *.smali`; do
file=${file2/framework.jar.out/$BUILD_OUT\/framework_ext}
echo "rm file: $file"
rm -rf "$file"
done
# remove all files at out/framework_ext those exist in telephony-common.jar.out
for file2 in `find telephony-common.jar.out -name *.smali`; do
file=${file2/telephony-common.jar.out/$BUILD_OUT\/framework_ext}
echo "rm file: $file"
rm -rf "$file"
done
cp -rf overlay/framework_ext.jar.out/smali/* $BUILD_OUT/framework_ext/smali
fi