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
5743c72c
Commit
5743c72c
authored
Nov 08, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup
parent
4cdd66ce
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
33 deletions
+5
-33
bootstages.cpp
native/jni/daemon/bootstages.cpp
+1
-3
daemon.h
native/jni/include/daemon.h
+0
-8
img.h
native/jni/include/img.h
+0
-8
magisk.h
native/jni/include/magisk.h
+2
-12
applets.cpp
native/jni/misc/applets.cpp
+2
-2
No files found.
native/jni/daemon/bootstages.cpp
View file @
5743c72c
...
@@ -362,9 +362,7 @@ static void simple_mount(const char *path) {
...
@@ -362,9 +362,7 @@ static void simple_mount(const char *path) {
if
(
access
(
buf2
,
F_OK
)
==
-
1
)
if
(
access
(
buf2
,
F_OK
)
==
-
1
)
continue
;
continue
;
if
(
entry
->
d_type
==
DT_DIR
)
{
if
(
entry
->
d_type
==
DT_DIR
)
{
char
*
new_path
=
strdup2
(
buf2
);
simple_mount
(
CharArray
(
buf2
));
simple_mount
(
new_path
);
delete
[]
new_path
;
}
else
if
(
entry
->
d_type
==
DT_REG
)
{
}
else
if
(
entry
->
d_type
==
DT_REG
)
{
// Actual file path
// Actual file path
snprintf
(
buf
,
PATH_MAX
,
"%s%s"
,
SIMPLEMOUNT
,
buf2
);
snprintf
(
buf
,
PATH_MAX
,
"%s%s"
,
SIMPLEMOUNT
,
buf2
);
...
...
native/jni/include/daemon.h
View file @
5743c72c
...
@@ -9,10 +9,6 @@
...
@@ -9,10 +9,6 @@
#include <sys/un.h>
#include <sys/un.h>
#include <sys/socket.h>
#include <sys/socket.h>
#ifdef __cplusplus
extern
"C"
{
#endif
extern
int
setup_done
;
extern
int
setup_done
;
extern
int
seperate_vendor
;
extern
int
seperate_vendor
;
...
@@ -88,8 +84,4 @@ void magiskhide_handler(int client);
...
@@ -88,8 +84,4 @@ void magiskhide_handler(int client);
void
su_daemon_handler
(
int
client
,
struct
ucred
*
credential
);
void
su_daemon_handler
(
int
client
,
struct
ucred
*
credential
);
#ifdef __cplusplus
}
#endif
#endif
#endif
native/jni/include/img.h
View file @
5743c72c
#ifndef IMG_H
#ifndef IMG_H
#define IMG_H
#define IMG_H
#ifdef __cplusplus
extern
"C"
{
#endif
int
create_img
(
const
char
*
img
,
int
size
);
int
create_img
(
const
char
*
img
,
int
size
);
int
resize_img
(
const
char
*
img
,
int
size
);
int
resize_img
(
const
char
*
img
,
int
size
);
char
*
mount_image
(
const
char
*
img
,
const
char
*
target
);
char
*
mount_image
(
const
char
*
img
,
const
char
*
target
);
...
@@ -12,8 +8,4 @@ int umount_image(const char *target, const char *device);
...
@@ -12,8 +8,4 @@ int umount_image(const char *target, const char *device);
int
merge_img
(
const
char
*
source
,
const
char
*
target
);
int
merge_img
(
const
char
*
source
,
const
char
*
target
);
int
trim_img
(
const
char
*
img
,
const
char
*
mount
,
char
*
loop
);
int
trim_img
(
const
char
*
img
,
const
char
*
mount
,
char
*
loop
);
#ifdef __cplusplus
}
#endif
#endif //IMG_H
#endif //IMG_H
native/jni/include/magisk.h
View file @
5743c72c
...
@@ -6,10 +6,6 @@
...
@@ -6,10 +6,6 @@
#include "logging.h"
#include "logging.h"
#ifdef __cplusplus
extern
"C"
{
#endif
#define MAIN_SOCKET "d30138f2310a9fb9c54a3e0c21f58591"
#define MAIN_SOCKET "d30138f2310a9fb9c54a3e0c21f58591"
#define LOG_SOCKET "5864cd77f2f8c59b3882e2d35dbf51e4"
#define LOG_SOCKET "5864cd77f2f8c59b3882e2d35dbf51e4"
#define JAVA_PACKAGE_NAME "com.topjohnwu.magisk"
#define JAVA_PACKAGE_NAME "com.topjohnwu.magisk"
...
@@ -45,10 +41,8 @@ extern "C" {
...
@@ -45,10 +41,8 @@ extern "C" {
extern
char
*
argv0
;
/* For changing process name */
extern
char
*
argv0
;
/* For changing process name */
#define applet_names ((const char *[]) { "magisk", "su", "resetprop", "magiskhide", "imgtool", NULL })
#define applet_names ((const char *[]) { "magisk", "su", "resetprop", "magiskhide", "imgtool", nullptr })
#define init_applet ((const char *[]) { "magiskpolicy", "supolicy", NULL })
#define init_applet ((const char *[]) { "magiskpolicy", "supolicy", nullptr })
extern
int
(
*
applet_main
[])
(
int
,
char
*
[]);
// Multi-call entrypoints
// Multi-call entrypoints
int
magisk_main
(
int
argc
,
char
*
argv
[]);
int
magisk_main
(
int
argc
,
char
*
argv
[]);
...
@@ -58,8 +52,4 @@ int su_client_main(int argc, char *argv[]);
...
@@ -58,8 +52,4 @@ int su_client_main(int argc, char *argv[]);
int
resetprop_main
(
int
argc
,
char
*
argv
[]);
int
resetprop_main
(
int
argc
,
char
*
argv
[]);
int
imgtool_main
(
int
argc
,
char
*
argv
[]);
int
imgtool_main
(
int
argc
,
char
*
argv
[]);
#ifdef __cplusplus
}
#endif
#endif
#endif
native/jni/misc/applets.cpp
View file @
5743c72c
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
#include "magisk.h"
#include "magisk.h"
#include "selinux.h"
#include "selinux.h"
int
(
*
applet_main
[])
(
int
,
char
*
[])
=
static
int
(
*
applet_main
[])
(
int
,
char
*
[])
=
{
magisk_main
,
su_client_main
,
resetprop_main
,
magiskhide_main
,
imgtool_main
,
NULL
};
{
magisk_main
,
su_client_main
,
resetprop_main
,
magiskhide_main
,
imgtool_main
,
nullptr
};
char
*
argv0
;
char
*
argv0
;
...
...
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