-
Notifications
You must be signed in to change notification settings - Fork 56
/
recompile.sh
48 lines (38 loc) · 1.25 KB
/
recompile.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
47
48
if [ -d classes ]; then
java -jar smali.jar a -a 35 classes -o framework/classes.dex
else
echo "classes directory not found, skipping recompilation."
fi
for i in {2..5}; do
if [ -d "classes$i" ]; then
java -jar smali.jar a -a 35 "classes$i" -o "framework/classes$i.dex"
else
echo "classes$i directory not found, skipping recompilation."
fi
done
if [ -d services_classes ]; then
java -jar smali.jar a -a 35 services_classes -o services/classes.dex
else
echo "services_classes directory not found, skipping recompilation."
fi
for i in {2..5}; do
if [ -d "services_classes$i" ]; then
java -jar smali.jar a -a 35 "services_classes$i" -o "services/classes$i.dex"
else
echo "services_classes$i directory not found, skipping recompilation."
fi
done
cd framework
7z a -tzip ../framework_new.zip *
cd ../services
7z a -tzip ../services_new.zip *
cd ..
zipalign -f -p -v -z 4 framework_new.zip aligned_framework.jar
zipalign -f -p -v -z 4 services_new.zip aligned_services.jar
mkdir -p magisk_module/system/framework
cp aligned_framework.jar magisk_module/system/framework/framework.jar
cp aligned_services.jar magisk_module/system/framework/services.jar
cd magisk_module
zip -r ../moded_framework_services.zip *
cd ..
echo "Cleanup complete."