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
ba7cb473
Commit
ba7cb473
authored
Mar 23, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make version reporting consistent
parent
48d417f9
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
19 additions
and
13 deletions
+19
-13
daemon.cpp
native/jni/core/daemon.cpp
+1
-1
magisk.cpp
native/jni/core/magisk.cpp
+1
-1
flags.h
native/jni/include/flags.h
+2
-2
main.cpp
native/jni/magiskboot/main.cpp
+1
-1
magiskhide.cpp
native/jni/magiskhide/magiskhide.cpp
+1
-1
magiskpolicy.cpp
native/jni/magiskpolicy/magiskpolicy.cpp
+1
-1
resetprop.cpp
native/jni/resetprop/resetprop.cpp
+1
-1
su.cpp
native/jni/su/su.cpp
+1
-1
addon.d.sh
scripts/addon.d.sh
+5
-2
flash_script.sh
scripts/flash_script.sh
+5
-2
No files found.
native/jni/core/daemon.cpp
View file @
ba7cb473
...
@@ -124,7 +124,7 @@ static void main_daemon() {
...
@@ -124,7 +124,7 @@ static void main_daemon() {
});
});
}
}
LOGI
(
SHOW
_VER
(
Magisk
)
" daemon started
\n
"
);
LOGI
(
NAME_WITH
_VER
(
Magisk
)
" daemon started
\n
"
);
// Get server stat
// Get server stat
stat
(
"/proc/self/exe"
,
&
self_st
);
stat
(
"/proc/self/exe"
,
&
self_st
);
...
...
native/jni/core/magisk.cpp
View file @
ba7cb473
...
@@ -15,7 +15,7 @@ using namespace std::literals;
...
@@ -15,7 +15,7 @@ using namespace std::literals;
[[
noreturn
]]
static
void
usage
()
{
[[
noreturn
]]
static
void
usage
()
{
fprintf
(
stderr
,
fprintf
(
stderr
,
FULL
_VER
(
Magisk
)
R"EOF( multi-call binary
NAME_WITH
_VER
(
Magisk
)
R"EOF( multi-call binary
Usage: magisk [applet [arguments]...]
Usage: magisk [applet [arguments]...]
or: magisk [options]...
or: magisk [options]...
...
...
native/jni/include/flags.h
View file @
ba7cb473
...
@@ -11,9 +11,9 @@
...
@@ -11,9 +11,9 @@
#define MAGISK_VERSION str(__MVSTR)
#define MAGISK_VERSION str(__MVSTR)
#define MAGISK_VER_CODE __MCODE
#define MAGISK_VER_CODE __MCODE
#define MAGISK_FULL_VER MAGISK_VERSION "(" str(MAGISK_VER_CODE) ")"
#define SHOW_VER(name) str(name) " v" MAGISK_VERSION "(" str(MAGISK_VER_CODE) ")"
#define NAME_WITH_VER(name) str(name) " " MAGISK_FULL_VER
#define FULL_VER(name) SHOW_VER(name) " (by topjohnwu)"
#ifdef __MDBG
#ifdef __MDBG
#define MAGISK_DEBUG
#define MAGISK_DEBUG
...
...
native/jni/magiskboot/main.cpp
View file @
ba7cb473
...
@@ -16,7 +16,7 @@ using namespace std;
...
@@ -16,7 +16,7 @@ using namespace std;
static
void
usage
(
char
*
arg0
)
{
static
void
usage
(
char
*
arg0
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
FULL
_VER
(
MagiskBoot
)
R"EOF( - Boot Image Modification Tool
NAME_WITH
_VER
(
MagiskBoot
)
R"EOF( - Boot Image Modification Tool
Usage: %s <action> [args...]
Usage: %s <action> [args...]
...
...
native/jni/magiskhide/magiskhide.cpp
View file @
ba7cb473
...
@@ -20,7 +20,7 @@ bool hide_enabled = false;
...
@@ -20,7 +20,7 @@ bool hide_enabled = false;
[[
noreturn
]]
static
void
usage
(
char
*
arg0
)
{
[[
noreturn
]]
static
void
usage
(
char
*
arg0
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
FULL
_VER
(
MagiskHide
)
"
\n\n
"
NAME_WITH
_VER
(
MagiskHide
)
"
\n\n
"
"Usage: %s [action [arguments...] ]
\n\n
"
"Usage: %s [action [arguments...] ]
\n\n
"
"Actions:
\n
"
"Actions:
\n
"
" status Return the status of magiskhide
\n
"
" status Return the status of magiskhide
\n
"
...
...
native/jni/magiskpolicy/magiskpolicy.cpp
View file @
ba7cb473
...
@@ -12,7 +12,7 @@ using namespace std::literals;
...
@@ -12,7 +12,7 @@ using namespace std::literals;
[[
noreturn
]]
static
void
usage
(
char
*
arg0
)
{
[[
noreturn
]]
static
void
usage
(
char
*
arg0
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
FULL
_VER
(
MagiskPolicy
)
R"EOF(
NAME_WITH
_VER
(
MagiskPolicy
)
R"EOF(
Usage: %s [--options...] [policy statements...]
Usage: %s [--options...] [policy statements...]
...
...
native/jni/resetprop/resetprop.cpp
View file @
ba7cb473
...
@@ -55,7 +55,7 @@ illegal:
...
@@ -55,7 +55,7 @@ illegal:
[[
noreturn
]]
static
void
usage
(
char
*
arg0
)
{
[[
noreturn
]]
static
void
usage
(
char
*
arg0
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
FULL
_VER
(
resetprop
)
" - System Props Modification Tool
\n\n
"
NAME_WITH
_VER
(
resetprop
)
" - System Props Modification Tool
\n\n
"
"Usage: %s [flags] [options...]
\n
"
"Usage: %s [flags] [options...]
\n
"
"
\n
"
"
\n
"
"Options:
\n
"
"Options:
\n
"
...
...
native/jni/su/su.cpp
View file @
ba7cb473
...
@@ -34,7 +34,7 @@ static void usage(int status) {
...
@@ -34,7 +34,7 @@ static void usage(int status) {
FILE
*
stream
=
(
status
==
EXIT_SUCCESS
)
?
stdout
:
stderr
;
FILE
*
stream
=
(
status
==
EXIT_SUCCESS
)
?
stdout
:
stderr
;
fprintf
(
stream
,
fprintf
(
stream
,
FULL
_VER
(
MagiskSU
)
"
\n\n
"
NAME_WITH
_VER
(
MagiskSU
)
"
\n\n
"
"Usage: su [options] [-] [user [argument...]]
\n\n
"
"Usage: su [options] [-] [user [argument...]]
\n\n
"
"Options:
\n
"
"Options:
\n
"
" -c, --command COMMAND pass COMMAND to the invoked shell
\n
"
" -c, --command COMMAND pass COMMAND to the invoked shell
\n
"
...
...
scripts/addon.d.sh
View file @
ba7cb473
...
@@ -74,8 +74,11 @@ main() {
...
@@ -74,8 +74,11 @@ main() {
$BOOTMODE
||
recovery_actions
$BOOTMODE
||
recovery_actions
PRETTY_VER
=
$MAGISK_VER
if
echo
$MAGISK_VER
|
grep
-q
'\.'
;
then
echo
$PRETTY_VER
|
grep
-q
'\.'
&&
PRETTY_VER
=
v
$PRETTY_VER
PRETTY_VER
=
$MAGISK_VER
else
PRETTY_VER
=
"
$MAGISK_VER
(
$MAGISK_VER_CODE
)"
fi
print_title
"Magisk
$PRETTY_VER
addon.d"
print_title
"Magisk
$PRETTY_VER
addon.d"
mount_partitions
mount_partitions
...
...
scripts/flash_script.sh
View file @
ba7cb473
...
@@ -34,8 +34,11 @@ setup_flashable
...
@@ -34,8 +34,11 @@ setup_flashable
# Detection
# Detection
############
############
PRETTY_VER
=
$MAGISK_VER
if
echo
$MAGISK_VER
|
grep
-q
'\.'
;
then
echo
$PRETTY_VER
|
grep
-q
'\.'
&&
PRETTY_VER
=
v
$PRETTY_VER
PRETTY_VER
=
$MAGISK_VER
else
PRETTY_VER
=
"
$MAGISK_VER
(
$MAGISK_VER_CODE
)"
fi
print_title
"Magisk
$PRETTY_VER
Installer"
print_title
"Magisk
$PRETTY_VER
Installer"
is_mounted /data
||
mount /data
||
is_mounted /cache
||
mount /cache
is_mounted /data
||
mount /data
||
is_mounted /cache
||
mount /cache
...
...
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