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
e4044766
Commit
e4044766
authored
Dec 07, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix logs on decrypted /data
parent
942c8709
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
daemon.c
core/jni/core/daemon.c
+3
-4
log_monitor.c
core/jni/core/log_monitor.c
+2
-3
daemon.h
core/jni/include/daemon.h
+0
-1
No files found.
core/jni/core/daemon.c
View file @
e4044766
...
...
@@ -20,7 +20,6 @@
#include "daemon.h"
#include "resetprop.h"
pthread_t
sepol_patch
;
int
is_daemon_init
=
0
,
seperate_vendor
=
0
;
static
void
*
request_handler
(
void
*
args
)
{
...
...
@@ -232,6 +231,9 @@ void start_daemon() {
exit
(
1
);
xlisten
(
fd
,
10
);
// Start the log monitor
monitor_logs
();
if
((
is_daemon_init
=
access
(
MAGISKTMP
,
F_OK
)
==
0
))
{
// Restart stuffs if the daemon is restarted
exec_command_sync
(
"logcat"
,
"-b"
,
"all"
,
"-c"
,
NULL
);
...
...
@@ -241,9 +243,6 @@ void start_daemon() {
daemon_init
();
}
// Start the log monitor
monitor_logs
();
LOGI
(
"Magisk v"
xstr
(
MAGISK_VERSION
)
"("
xstr
(
MAGISK_VER_CODE
)
") daemon started
\n
"
);
// Change process name
...
...
core/jni/core/log_monitor.c
View file @
e4044766
...
...
@@ -50,7 +50,7 @@ static void *logger_thread(void *args) {
static
void
*
magisk_log_thread
(
void
*
args
)
{
int
have_data
=
0
;
//
Temp buffer fo
r logs before we have data access
//
Buffe
r logs before we have data access
struct
vector
logs
;
vec_init
(
&
logs
);
...
...
@@ -70,7 +70,6 @@ static void *magisk_log_thread(void *args) {
if
(
!
have_data
)
{
if
((
have_data
=
check_data
()))
{
// Dump buffered logs to file
if
(
!
is_daemon_init
)
rename
(
LOGFILE
,
LASTLOG
);
log
=
xfopen
(
LOGFILE
,
"a"
);
setbuf
(
log
,
NULL
);
...
...
core/jni/include/daemon.h
View file @
e4044766
...
...
@@ -7,7 +7,6 @@
#include <pthread.h>
#include <sys/un.h>
extern
pthread_t
sepol_patch
;
extern
int
is_daemon_init
,
seperate_vendor
;
// Commands require connecting to daemon
...
...
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