-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathcustomize.sh
52 lines (40 loc) · 1.31 KB
/
customize.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
49
50
51
52
#!/system/bin/sh
# Function to install a manager app
installApk() {
filelist=$(ls $1)
for file in $filelist; do
extension="${file##*.}"
if [ "$extension" = "apk" ]; then
echo "- Installing ""$file""..."
pm install -r "$1/$file"
ui_print "- Successfully installed $file"
else
ui_print "- Error: ""$file" "is not an apk file."
fi
done
}
#
# Installing manager and extracting busybox
#
performInstall() {
# Perform manager installation
unzip -o "$ZIPFILE" 'app/*' -d /data/local/tmp >&2
apkDir="/data/local/tmp/app"
installApk $apkDir
# Remove app dir from $MODPATH and tmp dir
rm -rf $apkDir
rm -rf $MODPATH/app
}
setPermissions() {
# The following is the default rule, DO NOT remove
set_perm $MODPATH/system/etc/lspeed/binary/busybox 0 0 0777
set_perm $MODPATH/system/etc/lspeed/binary/main_function 0 0 0777
set_perm $MODPATH/system/etc/lspeed/binary/governor_tuner 0 0 0777
# Here are some examples:
# set_perm_recursive $MODPATH/system/lib 0 0 0755 0644
# set_perm $MODPATH/system/bin/app_process32 0 2000 0755 u:object_r:zygote_exec:s0
# set_perm $MODPATH/system/bin/dex2oat 0 2000 0755 u:object_r:dex2oat_exec:s0
# set_perm $MODPATH/system/lib/libart.so 0 0 0644
}
performInstall
setPermissions