-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
92 lines (71 loc) · 3.64 KB
/
install.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
SKIPMOUNT=false
#是否安装模块后自动关闭,改为true,安装后不会自动勾选启用
# Set to true if you need to load system.prop
PROPFILE=false
#是否使用common/system.prop文件
# Set to true if you need post-fs-data script
POSTFSDATA=true
#是否使用post-fs-data脚本执行文件
# Set to true if you need late_start service script
LATESTARTSERVICE=false
#是否在开机时候允许允许common/service.sh中脚本
##########################################################################################
# Installation Message
##########################################################################################
# Set what you want to show when installing your mod
print_modname() {
ui_print "*******************************"
ui_print " qxqzx.xyz "
ui_print " Forked by qxqzx from ZnDong "
ui_print "*******************************"
}
##########################################################################################
# Replace list
##########################################################################################
# List all directories you want to directly replace in the system
# Check the documentations for more info about how Magic Mount works, and why you need this
# This is an example
REPLACE="
/system/app/Youtube
/system/priv-app/SystemUI
/system/priv-app/Settings
/system/framework
"
# Construct your own list here, it will override the example above
# !DO NOT! remove this if you don't need to replace anything, leave it empty as it is now
REPLACE="
"
#添加您要精简的APP/文件夹目录
#例如:精简状态栏,找到状态栏目录为 /system/priv-app/SystemUI/SystemUI.apk
#转化加入:/system/priv-app/SystemUI
#(可以搭配高级设置获取APP目录)
##########################################################################################
# Permissions
##########################################################################################
#释放文件,普通shell命令
on_install() {
ui_print "- 释放证书文件到system目录"
unzip -o "$ZIPFILE" 'system/*' -d $MODPATH >&2
}
set_permissions() {
# Only some special files require specific permissions
# The default permissions should be good enough for most cases
# Here are some examples for the set_perm functions:
# set_perm_recursive <dirname> <owner> <group> <dirpermission> <filepermission> <contexts> (default: u:object_r:system_file:s0)
# set_perm_recursive $MODPATH/system/lib 0 0 0755 0644
# set_perm <filename> <owner> <group> <permission> <contexts> (default: u:object_r:system_file:s0)
# 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
# The following is default permissions, DO NOT remove
set_perm_recursive $MODPATH 0 0 0755 0644
#设置权限,基本不要去动
}
##########################################################################################
# Custom Functions
##########################################################################################
# This file (config.sh) will be sourced by the main flash script after util_functions.sh
# If you need custom logic, please add them here as functions, and call these functions in
# update-binary. Refrain from adding code directly into update-binary, as it will make it
# difficult for you to migrate your modules to newer template versions.
# Make update-binary as clean as possible, try to only do function calls in it.