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
0ddf4355
Commit
0ddf4355
authored
Nov 08, 2016
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update build.sh
parent
7c8a3ca1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
README.MD
README.MD
+8
-1
build.sh
build.sh
+10
-4
No files found.
README.MD
View file @
0ddf4355
# Magisk
# Magisk
Static binaries included:
###Static binaries included:
*
Busybox: http://forum.xda-developers.com/android/software-hacking/tool-busybox-flashable-archs-t3348543
*
Busybox: http://forum.xda-developers.com/android/software-hacking/tool-busybox-flashable-archs-t3348543
###How to build Magisk
1.
Only support MacOS and Linux
2.
Download and install NDK
3.
Add the NDK directory into PATH.
To check if success, please try calling
`which ndk-build`
and see if it returns the NDK directory
4.
Execute
`./build.sh`
, it will give you further information
build.sh
View file @
0ddf4355
#!/bin/bash
#!/bin/bash
usage
()
{
usage
()
{
echo
"
$0
all <version n
umber
>"
echo
"
$0
all <version n
ame
>"
echo
-e
"
\t
Build binaries, zip, and sign Magisk"
echo
-e
"
\t
Build binaries, zip, and sign Magisk"
echo
-e
"
\t
This is equlivant to first --build, then --zip"
echo
-e
"
\t
This is equlivant to first --build, then --zip"
echo
"
$0
clean"
echo
"
$0
clean"
echo
-e
"
\t
Cleanup compiled / generated files"
echo
-e
"
\t
Cleanup compiled / generated files"
echo
"
$0
build"
echo
"
$0
build"
echo
-e
"
\t
Build the binaries with ndk"
echo
-e
"
\t
Build the binaries with ndk"
echo
"
$0
zip <version n
umber
>"
echo
"
$0
zip <version n
ame
>"
echo
-e
"
\t
Zip and sign Magisk"
echo
-e
"
\t
Zip and sign Magisk"
echo
"
$0
uninstaller"
echo
"
$0
uninstaller"
echo
-e
"
\t
Zip and sign the uninstaller"
echo
-e
"
\t
Zip and sign the uninstaller"
...
@@ -19,7 +19,7 @@ cleanup() {
...
@@ -19,7 +19,7 @@ cleanup() {
echo
"************************"
echo
"************************"
echo
"* Cleaning up"
echo
"* Cleaning up"
echo
"************************"
echo
"************************"
ndk-build clean
ndk-build clean
2>/dev/null
ls
zip_static/arm/
*
|
grep
-v
"busybox"
| xargs
rm
-rfv
ls
zip_static/arm/
*
|
grep
-v
"busybox"
| xargs
rm
-rfv
ls
zip_static/arm64/
*
|
grep
-v
"busybox"
| xargs
rm
-rfv
ls
zip_static/arm64/
*
|
grep
-v
"busybox"
| xargs
rm
-rfv
ls
zip_static/x86/
*
|
grep
-v
"busybox"
| xargs
rm
-rfv
ls
zip_static/x86/
*
|
grep
-v
"busybox"
| xargs
rm
-rfv
...
@@ -41,6 +41,12 @@ build_bin() {
...
@@ -41,6 +41,12 @@ build_bin() {
echo
"************************"
echo
"************************"
echo
"* Building binaries"
echo
"* Building binaries"
echo
"************************"
echo
"************************"
if
[
-z
`
which ndk-build
`
]
;
then
echo
"!!!!!!!!!!!!!!!!!!!!!!!!"
echo
"! Please add ndk-build to PATH!"
echo
"!!!!!!!!!!!!!!!!!!!!!!!!"
exit
1
fi
ndk-build
-j4
ndk-build
-j4
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
"!!!!!!!!!!!!!!!!!!!!!!!!"
echo
"!!!!!!!!!!!!!!!!!!!!!!!!"
...
@@ -73,7 +79,7 @@ zip_package() {
...
@@ -73,7 +79,7 @@ zip_package() {
echo
"* Adding version info"
echo
"* Adding version info"
echo
"************************"
echo
"************************"
sed
"s/MAGISK_VERSION_STUB/Magisk v
$1
Boot Image Patcher/g"
scripts/flash_script.sh
>
zip_static/META-INF/com/google/android/update-binary
sed
"s/MAGISK_VERSION_STUB/Magisk v
$1
Boot Image Patcher/g"
scripts/flash_script.sh
>
zip_static/META-INF/com/google/android/update-binary
sed
"s/MAGISK_VERSION_STUB/setprop magisk.version
$1
/g"
scripts/magic_mask.sh
>
zip_static/common/magic_mask.sh
sed
"s/MAGISK_VERSION_STUB/setprop magisk.version
\"
$1
\"
/g"
scripts/magic_mask.sh
>
zip_static/common/magic_mask.sh
echo
"************************"
echo
"************************"
echo
"* Zipping Magisk v
$1
"
echo
"* Zipping Magisk v
$1
"
echo
"************************"
echo
"************************"
...
...
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