Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
f79fad64
Commit
f79fad64
authored
Jul 31, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix several script issues
parent
cb70eebb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
bootstages.c
jni/daemon/bootstages.c
+13
-13
No files found.
jni/daemon/bootstages.c
View file @
f79fad64
...
...
@@ -161,7 +161,8 @@ void exec_module_script(const char* stage) {
char
*
module
;
vec_for_each
(
&
module_list
,
module
)
{
snprintf
(
buf
,
PATH_MAX
,
"%s/%s/%s.sh"
,
MOUNTPOINT
,
module
,
stage
);
if
(
access
(
buf
,
F_OK
)
==
-
1
)
snprintf
(
buf2
,
PATH_MAX
,
"%s/%s/disable"
,
MOUNTPOINT
,
module
);
if
(
access
(
buf
,
F_OK
)
==
-
1
||
access
(
buf2
,
F_OK
)
==
0
)
continue
;
LOGI
(
"%s: exec [%s.sh]
\n
"
,
module
,
stage
);
char
*
const
command
[]
=
{
"sh"
,
buf
,
NULL
};
...
...
@@ -551,10 +552,6 @@ void post_fs_data(int client) {
xmkdir
(
COREDIR
"/props"
,
0755
);
}
// Run common scripts
LOGI
(
"* Running post-fs-data.d scripts
\n
"
);
exec_common_script
(
"post-fs-data"
);
// Core only mode
if
(
access
(
DISABLEFILE
,
F_OK
)
==
0
)
goto
core_only
;
...
...
@@ -702,6 +699,10 @@ void post_fs_data(int client) {
exec_module_script
(
"post-fs-data"
);
core_only:
// Run common scripts
LOGI
(
"* Running post-fs-data.d scripts
\n
"
);
exec_common_script
(
"post-fs-data"
);
// Systemless hosts
if
(
access
(
HOSTSFILE
,
F_OK
)
==
0
)
{
LOGI
(
"* Enabling systemless hosts file support"
);
...
...
@@ -734,19 +735,18 @@ void late_start(int client) {
// Wait till the full patch is done
pthread_join
(
sepol_patch
,
NULL
);
// Run scripts after full patch, most reliable way to run scripts
LOGI
(
"* Running service.d scripts
\n
"
);
exec_common_script
(
"service"
);
// Core only mode
if
(
access
(
DISABLEFILE
,
F_OK
)
==
0
)
{
setprop
(
"ro.magisk.disable"
,
"1"
);
return
;
}
if
(
access
(
DISABLEFILE
,
F_OK
)
==
0
)
goto
core_only
;
LOGI
(
"* Running module service scripts
\n
"
);
exec_module_script
(
"service"
);
core_only:
// Run scripts after full patch, most reliable way to run scripts
LOGI
(
"* Running service.d scripts
\n
"
);
exec_common_script
(
"service"
);
// Install Magisk Manager if exists
if
(
access
(
MANAGERAPK
,
F_OK
)
==
0
)
{
while
(
1
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment