mirror of
https://github.com/topjohnwu/Magisk
synced 2025-10-27 04:02:14 +01:00
Compare commits
556 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6119c24720 | ||
|
|
7da205f4c8 | ||
|
|
754fafcfe9 | ||
|
|
bd7766b17e | ||
|
|
70b7d73453 | ||
|
|
5ad4702a5b | ||
|
|
40b6fe03c2 | ||
|
|
49ecba2476 | ||
|
|
ebd509d92d | ||
|
|
7193374a7e | ||
|
|
6728445542 | ||
|
|
10ed299c78 | ||
|
|
32b124913e | ||
|
|
599ae95251 | ||
|
|
d1be34c34a | ||
|
|
bc2cac90fe | ||
|
|
28350e3ad9 | ||
|
|
f48e6c93b8 | ||
|
|
7cfc24d68f | ||
|
|
a58d3ea04d | ||
|
|
dfee9954e0 | ||
|
|
eed86c760f | ||
|
|
c471bb6f67 | ||
|
|
518c2b0f95 | ||
|
|
328fc44194 | ||
|
|
b6f735a8f6 | ||
|
|
deae08fc4b | ||
|
|
c61135ee7b | ||
|
|
97cf15007f | ||
|
|
e8302dfbe2 | ||
|
|
558f95cf7e | ||
|
|
18f6ead891 | ||
|
|
10bd25be52 | ||
|
|
65511845d2 | ||
|
|
1c743839ea | ||
|
|
bcae9dec41 | ||
|
|
482c9af41f | ||
|
|
2bf2e7461f | ||
|
|
7d1082b1cb | ||
|
|
0dbae83aec | ||
|
|
f927c1b997 | ||
|
|
89ec7dad2b | ||
|
|
4fd61345af | ||
|
|
66cca24453 | ||
|
|
e733484fab | ||
|
|
e5c3183025 | ||
|
|
930c82316a | ||
|
|
3dc22db265 | ||
|
|
d8c51cb286 | ||
|
|
2f79d0c3b3 | ||
|
|
d8bb3af06b | ||
|
|
e139e8777b | ||
|
|
d52d7cfbd9 | ||
|
|
4f74a259e3 | ||
|
|
74da6e1dc0 | ||
|
|
84ffdf0ed5 | ||
|
|
022b18c8ce | ||
|
|
b92b1dcddb | ||
|
|
1472dbb291 | ||
|
|
d58a8dc868 | ||
|
|
e94be0b70e | ||
|
|
f6ae7e1bf1 | ||
|
|
f7b4935677 | ||
|
|
a3c49de6a5 | ||
|
|
e8dd1b292f | ||
|
|
d21264d01b | ||
|
|
b0567eadfd | ||
|
|
5fc2058336 | ||
|
|
d0567d29d2 | ||
|
|
4db0ad32f0 | ||
|
|
d065040321 | ||
|
|
17f0fea3fc | ||
|
|
8ca1e43533 | ||
|
|
bd01c314dc | ||
|
|
e404476609 | ||
|
|
942c870981 | ||
|
|
baff9256c5 | ||
|
|
b4c0a255fc | ||
|
|
9f6a27c20d | ||
|
|
742dc137ed | ||
|
|
39a6bd33ce | ||
|
|
4672a5fad6 | ||
|
|
e649b0a2df | ||
|
|
fd8dbe3eff | ||
|
|
bb97cc594d | ||
|
|
70a322263e | ||
|
|
c6f144d482 | ||
|
|
3709489b3a | ||
|
|
145ef32e28 | ||
|
|
2212800a23 | ||
|
|
2e25431bb6 | ||
|
|
32c8e7522f | ||
|
|
a5e4f3cc6b | ||
|
|
a30777bd9f | ||
|
|
e989195a68 | ||
|
|
997d58932e | ||
|
|
b4015f877f | ||
|
|
d15fff95b9 | ||
|
|
687e3b13ea | ||
|
|
8c6bb383b7 | ||
|
|
bc592c1d13 | ||
|
|
968bd8be67 | ||
|
|
d8b8adb88c | ||
|
|
f42d820891 | ||
|
|
bc21a1fb71 | ||
|
|
3bc31374ac | ||
|
|
858e7bae2b | ||
|
|
8c02d120a2 | ||
|
|
07e353f4ff | ||
|
|
bb33d9e600 | ||
|
|
68eb0bdec9 | ||
|
|
32ee8e462c | ||
|
|
e79aa54b70 | ||
|
|
9a95652034 | ||
|
|
912c188b53 | ||
|
|
e9d0f615ba | ||
|
|
9136573596 | ||
|
|
2487ec94e6 | ||
|
|
811489f157 | ||
|
|
b438cc9335 | ||
|
|
1d3d30fa45 | ||
|
|
72b5985398 | ||
|
|
2db60e0a6b | ||
|
|
e710848345 | ||
|
|
8d6f3c2450 | ||
|
|
f863d127e7 | ||
|
|
a831110816 | ||
|
|
e97bdb53f4 | ||
|
|
fe1439fbac | ||
|
|
2bc30e5c22 | ||
|
|
7244c02a0d | ||
|
|
6c229ffa68 | ||
|
|
cdc5d983f3 | ||
|
|
96688e4dac | ||
|
|
28a945fee9 | ||
|
|
c7e777255a | ||
|
|
2dd4cf040e | ||
|
|
d1b9eca5eb | ||
|
|
594a67fe28 | ||
|
|
cddeaffada | ||
|
|
2a8898e7c3 | ||
|
|
ce3f3b09b4 | ||
|
|
fe4b3df7e9 | ||
|
|
25bdbcf526 | ||
|
|
df7eaa5598 | ||
|
|
bb7099376b | ||
|
|
0327fd9710 | ||
|
|
e645c6e465 | ||
|
|
78a3d36ccc | ||
|
|
3942858ccd | ||
|
|
03c8d716cc | ||
|
|
60181c4fcb | ||
|
|
c215447405 | ||
|
|
89330b89d8 | ||
|
|
a8f3718ed0 | ||
|
|
a78ba44709 | ||
|
|
ff110e3513 | ||
|
|
cfae6c63b5 | ||
|
|
dbfe49c56f | ||
|
|
98e21f9f5b | ||
|
|
83af0497e4 | ||
|
|
6ce37b44db | ||
|
|
9cb1cf756f | ||
|
|
ffa005e4ab | ||
|
|
af102e47f1 | ||
|
|
73064a816d | ||
|
|
9b4ae8fcc5 | ||
|
|
a1a2c52409 | ||
|
|
9a0b26e0b0 | ||
|
|
b805b96e16 | ||
|
|
590e7f7724 | ||
|
|
4d61e5e319 | ||
|
|
8c8a63ebfb | ||
|
|
e5e34797a8 | ||
|
|
8516ebe6f5 | ||
|
|
9f6205f47f | ||
|
|
8b2ec23a89 | ||
|
|
1816ca6b02 | ||
|
|
7394ff9346 | ||
|
|
bb5a6a1c28 | ||
|
|
b614b06736 | ||
|
|
7a376c9efc | ||
|
|
518f3d229f | ||
|
|
46c91f923d | ||
|
|
3a2262dfb3 | ||
|
|
ff7c38f8e9 | ||
|
|
4229ba364f | ||
|
|
ba8e7a211a | ||
|
|
6b41653a32 | ||
|
|
59c1125e72 | ||
|
|
b536046720 | ||
|
|
619b805894 | ||
|
|
8662537883 | ||
|
|
717890395b | ||
|
|
b7b4164f4f | ||
|
|
7e65296470 | ||
|
|
cd5f5d702f | ||
|
|
44b93e7cc4 | ||
|
|
0eb79e5acd | ||
|
|
eceba26894 | ||
|
|
0bf404f75e | ||
|
|
cd8dd65a65 | ||
|
|
50c56f8b50 | ||
|
|
9e9f8ca8f3 | ||
|
|
f63af0601c | ||
|
|
189c671ce2 | ||
|
|
bb39a01361 | ||
|
|
764999704a | ||
|
|
ecfa4aafc1 | ||
|
|
a1e33c4d2f | ||
|
|
7f8ba74dac | ||
|
|
e3df62d812 | ||
|
|
1913125881 | ||
|
|
e8e58f3fed | ||
|
|
1ca9ec384b | ||
|
|
9522255e3a | ||
|
|
2a22fa694e | ||
|
|
1591f5a0ca | ||
|
|
3bc4e9a724 | ||
|
|
f7a6bb0723 | ||
|
|
e9c17a3ef7 | ||
|
|
29bb5840b5 | ||
|
|
c9d8d860f6 | ||
|
|
cc18096882 | ||
|
|
15f2a664d1 | ||
|
|
70b4f62ddc | ||
|
|
e1023fdfaf | ||
|
|
5e9648387a | ||
|
|
2ba8b4df67 | ||
|
|
3a084c5d7b | ||
|
|
f7200e39c3 | ||
|
|
a7dfc20967 | ||
|
|
6eb7c0b5d6 | ||
|
|
0b3c078aeb | ||
|
|
750872cc37 | ||
|
|
29895ff474 | ||
|
|
44adccc147 | ||
|
|
2a7e2c70b5 | ||
|
|
8d431b6762 | ||
|
|
273849c0c8 | ||
|
|
5cc14405c7 | ||
|
|
f0cfd60e62 | ||
|
|
d6547f0701 | ||
|
|
3b68905037 | ||
|
|
eae611c54d | ||
|
|
b37bad35c2 | ||
|
|
5fab15fee5 | ||
|
|
10c8ea17aa | ||
|
|
7058c8ff5a | ||
|
|
64e85da59f | ||
|
|
f79fad64aa | ||
|
|
cb70eebb08 | ||
|
|
edaf8787d1 | ||
|
|
24164c8580 | ||
|
|
9fca7011aa | ||
|
|
b13eb3fd40 | ||
|
|
b7986a351c | ||
|
|
ce87591c62 | ||
|
|
25c289ad3e | ||
|
|
8c5f11b7dd | ||
|
|
7f7dda9ec2 | ||
|
|
9c1005ff0c | ||
|
|
5b36b4472c | ||
|
|
a3fcc64aaa | ||
|
|
f3078bc903 | ||
|
|
6072744f7e | ||
|
|
a87ad35a50 | ||
|
|
cf56d7e4ed | ||
|
|
e33a5eb307 | ||
|
|
e5b704eb32 | ||
|
|
56457bd325 | ||
|
|
bdbb3c6657 | ||
|
|
c4d7001489 | ||
|
|
c07bac9a63 | ||
|
|
d27d04783f | ||
|
|
58de5a7ec7 | ||
|
|
504a9b4746 | ||
|
|
cccb5a3e08 | ||
|
|
d75fa62cab | ||
|
|
3d43c3c5bc | ||
|
|
b570b363d9 | ||
|
|
b9968aa1e6 | ||
|
|
c0d77808f6 | ||
|
|
9679492c28 | ||
|
|
f3b68e6543 | ||
|
|
0dcfaaf5ff | ||
|
|
ba513dcb9a | ||
|
|
ebabc60477 | ||
|
|
cf565d0145 | ||
|
|
52a23e7904 | ||
|
|
9e22b80714 | ||
|
|
7eed9c4a6d | ||
|
|
bf42fce17e | ||
|
|
9d421226a7 | ||
|
|
7b9be8369e | ||
|
|
7cf4b819ae | ||
|
|
9e1aea33c3 | ||
|
|
8767a88854 | ||
|
|
47c0084641 | ||
|
|
54e6a790cf | ||
|
|
2a86bc8695 | ||
|
|
04538372c6 | ||
|
|
9430ed66cd | ||
|
|
96f8efc27a | ||
|
|
a90e8b6112 | ||
|
|
561c1fb798 | ||
|
|
806fec7017 | ||
|
|
b3da28eade | ||
|
|
166f6412c2 | ||
|
|
1e877808bc | ||
|
|
1777d9f751 | ||
|
|
309b99eac0 | ||
|
|
a5aa1b3917 | ||
|
|
aced0632ec | ||
|
|
4e801788d7 | ||
|
|
0b4baad78b | ||
|
|
201e32d4c4 | ||
|
|
0980cb6eb5 | ||
|
|
f75d23363b | ||
|
|
6c0ba66f17 | ||
|
|
f32ce7392e | ||
|
|
8bf382adad | ||
|
|
541ba357bb | ||
|
|
b6578b52e3 | ||
|
|
fb01c43ece | ||
|
|
b9a012c6e3 | ||
|
|
17684ed8a8 | ||
|
|
1b6b3b2cd5 | ||
|
|
acd8567586 | ||
|
|
e780c76c93 | ||
|
|
532c6caddf | ||
|
|
ef8d9be633 | ||
|
|
2cdbcc5666 | ||
|
|
c282a8f328 | ||
|
|
b9eab39541 | ||
|
|
20903784a4 | ||
|
|
3ec9ff7467 | ||
|
|
17d3a87b1f | ||
|
|
14c5c60863 | ||
|
|
70a80090c4 | ||
|
|
b6cb5d09cb | ||
|
|
69cfde4516 | ||
|
|
bdc83da098 | ||
|
|
f872a122a9 | ||
|
|
aa92e4cbd0 | ||
|
|
e603877a17 | ||
|
|
bb96477779 | ||
|
|
543ee79720 | ||
|
|
ea8cd98361 | ||
|
|
58849f28a8 | ||
|
|
d66c284bed | ||
|
|
693848280b | ||
|
|
396afaa181 | ||
|
|
05ed29133b | ||
|
|
a31c1e8084 | ||
|
|
21891230f2 | ||
|
|
47da76c5a5 | ||
|
|
6017ff2318 | ||
|
|
e16d604d0d | ||
|
|
d3d5703f3f | ||
|
|
62fe92d922 | ||
|
|
512e7be74f | ||
|
|
727abbea8f | ||
|
|
76f81ece62 | ||
|
|
495654f9ff | ||
|
|
95fec2100e | ||
|
|
623a879797 | ||
|
|
4c96d23f48 | ||
|
|
9bc8f6e9d7 | ||
|
|
e00e6509ee | ||
|
|
be5739508b | ||
|
|
38c867ea94 | ||
|
|
2a985ce6c0 | ||
|
|
e4f3fb36f3 | ||
|
|
b2f8792873 | ||
|
|
2065133e2d | ||
|
|
86da87f254 | ||
|
|
102a7f8723 | ||
|
|
e9afc15719 | ||
|
|
08527dde9b | ||
|
|
d9c3a3c9a9 | ||
|
|
fe89f9e55e | ||
|
|
73802aabac | ||
|
|
bc66733289 | ||
|
|
f4c93b2251 | ||
|
|
c079c598f2 | ||
|
|
8a2f0063d4 | ||
|
|
dfe4b33f2f | ||
|
|
2f7cfa7ab2 | ||
|
|
bdcb813ee6 | ||
|
|
f0751007f3 | ||
|
|
6ad993704c | ||
|
|
796c3009c7 | ||
|
|
144ff5e716 | ||
|
|
054a1e5ea4 | ||
|
|
a223f6056e | ||
|
|
a1fd7704e0 | ||
|
|
b94227efc9 | ||
|
|
3a7e782c07 | ||
|
|
8f6b33d790 | ||
|
|
f476daa041 | ||
|
|
acfde9458d | ||
|
|
82e969627a | ||
|
|
40766b3375 | ||
|
|
d274e45587 | ||
|
|
0a0eb3f710 | ||
|
|
81d054a525 | ||
|
|
2e185f4ec9 | ||
|
|
67f347f880 | ||
|
|
81542fc6a8 | ||
|
|
5aced279d6 | ||
|
|
3f016f785f | ||
|
|
a6427d081e | ||
|
|
8c7fbe20f9 | ||
|
|
469aba8ed0 | ||
|
|
6e8e4ad5da | ||
|
|
2f33d654e4 | ||
|
|
760b6385f1 | ||
|
|
91527500f9 | ||
|
|
e87d989ca3 | ||
|
|
64d61bae08 | ||
|
|
9862265465 | ||
|
|
624b7616d0 | ||
|
|
d53f33bed8 | ||
|
|
02e039d792 | ||
|
|
9f9333315e | ||
|
|
0d10b812fe | ||
|
|
b4fe4f3d10 | ||
|
|
ba93fcbda0 | ||
|
|
88d19a4ca4 | ||
|
|
af7b9ea898 | ||
|
|
09cd0468cf | ||
|
|
529aa754f5 | ||
|
|
3c7e865555 | ||
|
|
7877ac0c3b | ||
|
|
1442e29d0e | ||
|
|
9a7e9b736e | ||
|
|
c421e45fa0 | ||
|
|
8833d21ac3 | ||
|
|
1a3c522c94 | ||
|
|
c55aa92d4f | ||
|
|
212a303347 | ||
|
|
3f3568d8af | ||
|
|
1e3bcfc8cd | ||
|
|
a4ce9f6f05 | ||
|
|
65dc99744e | ||
|
|
c6d4740b0c | ||
|
|
9f91c8b59d | ||
|
|
2b3b087c29 | ||
|
|
e08d46aa76 | ||
|
|
feccc97a14 | ||
|
|
77eec3d21d | ||
|
|
ecaafd1b70 | ||
|
|
0d51997e46 | ||
|
|
463cbceb07 | ||
|
|
1437c5c63f | ||
|
|
52f1d50902 | ||
|
|
a839cb787e | ||
|
|
f621fb2060 | ||
|
|
2ccd8b8838 | ||
|
|
7ef0746c52 | ||
|
|
6f609f0dd7 | ||
|
|
ee2a30470a | ||
|
|
e11fb2c09e | ||
|
|
c6e9270590 | ||
|
|
3e2e171407 | ||
|
|
332f531a10 | ||
|
|
bae2c9bc63 | ||
|
|
5ac68f8df8 | ||
|
|
06d3b94804 | ||
|
|
e7c314fefc | ||
|
|
faab79b41a | ||
|
|
14204c9bfc | ||
|
|
45dbd4464b | ||
|
|
472255924a | ||
|
|
6d3ac2aa55 | ||
|
|
9ad03994d1 | ||
|
|
35228f80b8 | ||
|
|
69ded881c6 | ||
|
|
d9bce45db4 | ||
|
|
5e92b4faa9 | ||
|
|
db501822ef | ||
|
|
ef9948a967 | ||
|
|
298f09402f | ||
|
|
d4149d4b7a | ||
|
|
3315228a90 | ||
|
|
f72205c401 | ||
|
|
11862bbaee | ||
|
|
8d846993ee | ||
|
|
1f84626278 | ||
|
|
b4cfe6e9c0 | ||
|
|
94a861e318 | ||
|
|
1421e775d2 | ||
|
|
f8eab72c7a | ||
|
|
2afd2f0d3b | ||
|
|
2b72f40cec | ||
|
|
ff5c0d6361 | ||
|
|
198b14e5fc | ||
|
|
f9fea265cf | ||
|
|
668601ca23 | ||
|
|
99406f2099 | ||
|
|
632b3cb9ae | ||
|
|
0bf04c04f9 | ||
|
|
dc29018ec0 | ||
|
|
b6412afe96 | ||
|
|
4e88186903 | ||
|
|
f387378b69 | ||
|
|
f894e6b4ea | ||
|
|
e33f5996f3 | ||
|
|
8f7f1ff7dd | ||
|
|
54a0e52e05 | ||
|
|
b2431b982f | ||
|
|
8d6d619eed | ||
|
|
70e332b9e8 | ||
|
|
0a53c42a8a | ||
|
|
0ccc92dc1e | ||
|
|
c9157cc13b | ||
|
|
2b1270381d | ||
|
|
cdb8ee3946 | ||
|
|
1e3586621b | ||
|
|
c07e9ac29d | ||
|
|
6e3bb48574 | ||
|
|
16d7ae62bd | ||
|
|
eea3cb32a5 | ||
|
|
670fe8590c | ||
|
|
30c048723c | ||
|
|
85dc669ddf | ||
|
|
397c1a1c2b | ||
|
|
f1d3e35aac | ||
|
|
0e69201f05 | ||
|
|
f8fdaf5c1f | ||
|
|
1f3b81338c | ||
|
|
5921d3a42a | ||
|
|
dbbc85719e | ||
|
|
0ddb6c3f10 | ||
|
|
e13281726c | ||
|
|
0ddf4355a1 | ||
|
|
7c8a3ca1a8 | ||
|
|
3068738a70 | ||
|
|
cfa0d8b7c0 | ||
|
|
7ac41652f7 | ||
|
|
24a510bc2e | ||
|
|
0498540439 | ||
|
|
da94c2e1e5 | ||
|
|
bcdd74514f | ||
|
|
1d0c36a0ab | ||
|
|
a34ea8f131 | ||
|
|
7fbfa6a52b | ||
|
|
799ef3380d | ||
|
|
d5087858ca | ||
|
|
d9fc5650b8 | ||
|
|
9ea028f5ab | ||
|
|
aa309087fd | ||
|
|
57bdd9d3bf | ||
|
|
dc9871fe5b | ||
|
|
3255ca3ea4 |
18
.gitattributes
vendored
Normal file
18
.gitattributes
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text eol=lf
|
||||
|
||||
# Explicitly declare text files you want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
# *.c text
|
||||
# *.h text
|
||||
|
||||
# Declare files that will always have CRLF line endings on checkout.
|
||||
*.cmd text eol=crlf
|
||||
*.bat text eol=crlf
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
chromeos/** binary
|
||||
*.jar binary
|
||||
*.exe binary
|
||||
*.apk binary
|
||||
*.png binary
|
||||
17
.gitignore
vendored
17
.gitignore
vendored
@@ -1,3 +1,16 @@
|
||||
obj
|
||||
libs
|
||||
out
|
||||
*.zip
|
||||
*.jks
|
||||
*.apk
|
||||
|
||||
# Built binaries
|
||||
ziptools/zipadjust
|
||||
|
||||
# Android Studio / Gradle
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
|
||||
31
.gitmodules
vendored
31
.gitmodules
vendored
@@ -1,6 +1,27 @@
|
||||
[submodule "selinux"]
|
||||
path = selinux
|
||||
url = https://github.com/topjohnwu/selinux
|
||||
[submodule "jni/sepolicy-inject"]
|
||||
path = jni/sepolicy-inject
|
||||
url = https://github.com/topjohnwu/sepolicy-inject
|
||||
path = native/jni/external/selinux
|
||||
url = https://github.com/topjohnwu/selinux.git
|
||||
[submodule "su"]
|
||||
path = native/jni/su
|
||||
url = https://github.com/topjohnwu/MagiskSU.git
|
||||
[submodule "magiskpolicy"]
|
||||
path = native/jni/magiskpolicy
|
||||
url = https://github.com/topjohnwu/magiskpolicy.git
|
||||
[submodule "MagiskManager"]
|
||||
path = app
|
||||
url = https://github.com/topjohnwu/MagiskManager.git
|
||||
[submodule "busybox"]
|
||||
path = native/jni/external/busybox
|
||||
url = https://github.com/topjohnwu/ndk-busybox.git
|
||||
[submodule "dtc"]
|
||||
path = native/jni/external/dtc
|
||||
url = https://github.com/dgibson/dtc
|
||||
[submodule "lz4"]
|
||||
path = native/jni/external/lz4
|
||||
url = https://github.com/lz4/lz4.git
|
||||
[submodule "bzip2"]
|
||||
path = native/jni/external/bzip2
|
||||
url = https://github.com/nemequ/bzip2.git
|
||||
[submodule "xz"]
|
||||
path = native/jni/external/xz
|
||||
url = https://github.com/xz-mirror/xz.git
|
||||
|
||||
80
README.MD
80
README.MD
@@ -1,3 +1,79 @@
|
||||
# Magisk
|
||||
Static binaries included:
|
||||
* Busybox: http://forum.xda-developers.com/android/software-hacking/tool-busybox-flashable-archs-t3348543
|
||||
|
||||
## How to build Magisk
|
||||
|
||||
#### Building has been tested on 3 major platforms: macOS, Ubuntu, Windows 10
|
||||
|
||||
### Environment Requirements
|
||||
|
||||
1. Python 3.5+: run `build.py` script
|
||||
2. Java Development Kit (JDK) 8: Compile Magisk Manager and sign zips
|
||||
3. Latest Android SDK: `ANDROID_HOME` environment variable should point to the Android SDK folder
|
||||
4. Android NDK: Install NDK along with SDK (`$ANDROID_HOME/ndk-bundle`), or specify custom path `ANDROID_NDK`
|
||||
5. (Windows Only) Python package Colorama: Install with `pip install colorama`, used for ANSI color codes
|
||||
|
||||
### Instructions and Notes
|
||||
1. Magisk can be built with the latest NDK (r16 as of writing), however binaries released officially will be built with NDK r10e due to ELF incompatibilities with the binaries built from the newer NDKs.
|
||||
2. The easiest way to setup the environment is by importing the folder as an Android Studio project. The IDE will download required components and construct the environment for you. You still have to set the `ANDROID_HOME` environment variable to point to the SDK path.
|
||||
3. Run `build.py` with argument `-h` to see the built-in help message. The `-h` option also works for each supported actions, e.g. `./build.py binary -h`
|
||||
4. Build everything with `build.py`, don't directly call `gradlew` or `ndk-build`, since most requires special setup / dependencies.
|
||||
5. By default, `build.py` will build binaries and Magisk Manager in debug mode. If you want to build Magisk Manager in release mode (through the flag `--release`), you will need to place a Java Keystore file at `release_signature.jks` to sign Magisk Manager's APK. For more information, check out [Google's Official Documentation](https://developer.android.com/studio/publish/app-signing.html#signing-manually).
|
||||
|
||||
|
||||
## License
|
||||
|
||||
```
|
||||
Magisk, including all git submodules are free software:
|
||||
you can redistribute it and/or modify it under the terms of the
|
||||
GNU General Public License as published by the Free Software Foundation,
|
||||
either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
```
|
||||
|
||||
## Credits
|
||||
|
||||
**MagiskManager** (`app`)
|
||||
|
||||
* Copyright 2016-2018, John Wu (@topjohnwu)
|
||||
* All contributors and translators on Github
|
||||
|
||||
**MagiskSU** (`native/jni/su`)
|
||||
|
||||
* Copyright 2016-2018, John Wu (@topjohnwu)
|
||||
* Copyright 2015, Pierre-Hugues Husson (phh@phh.me)
|
||||
* Copyright 2013, Koushik Dutta (@koush)
|
||||
* Copyright 2010, Adam Shanks (@ChainsDD)
|
||||
* Copyright 2008, Zinx Verituse (@zinxv)
|
||||
|
||||
**MagiskPolicy** (`native/jni/magiskpolicy`)
|
||||
|
||||
* Copyright 2016-2018, John Wu (@topjohnwu)
|
||||
* Copyright 2015, Pierre-Hugues Husson (phh@phh.me)
|
||||
* Copyright 2015, Joshua Brindle (@joshua_brindle)
|
||||
|
||||
**MagiskHide** (`native/jni/magiskhide`)
|
||||
|
||||
* Copyright 2016-2018, John Wu (@topjohnwu)
|
||||
* Copyright 2016, Pierre-Hugues Husson (phh@phh.me)
|
||||
|
||||
**resetprop** (`native/jni/resetprop`)
|
||||
|
||||
* Copyright 2016-2018 John Wu (@topjohnwu)
|
||||
* Copyright 2016 nkk71 (nkk71x@gmail.com)
|
||||
|
||||
**External Dependencies** (`native/jni/external`)
|
||||
|
||||
* Makefile for busybox, generated by [ndk-busybox-kitchen](https://github.com/topjohnwu/ndk-busybox-kitchen)
|
||||
* Each dependencies has its own license/copyright information in each subdirectory.
|
||||
All of them are either GPL or GPL compatible.
|
||||
|
||||
**Others Not Mentioned**
|
||||
|
||||
* Copyright 2016-2018, John Wu (@topjohnwu)
|
||||
|
||||
1
app
Submodule
1
app
Submodule
Submodule app added at c840a30c30
27
build.gradle
Normal file
27
build.gradle
Normal file
@@ -0,0 +1,27 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
36
docs/README.MD
Normal file
36
docs/README.MD
Normal file
@@ -0,0 +1,36 @@
|
||||
# Magisk Documentations
|
||||
(Updated on 2018.1.8) ([Changelog](changelog.md))
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Introduction](#introduction)
|
||||
- [Tips and Tricks](tips.md)
|
||||
- [OTA Installation Tips](tips.md#ota-installation-tips)
|
||||
|
||||
The following are for developers
|
||||
|
||||
- [Procedure Diagram](https://cdn.rawgit.com/topjohnwu/Magisk/7d1082b1cb91db90ed0a29d8b092723fc3d69c58/docs/procedures.html)
|
||||
- [Magisk Details](details.md)
|
||||
- [Boot Stages](details.md#boot-stages)
|
||||
- [Magic Mount Details](details.md#magic-mount-details)
|
||||
- [Simple Mount Details](details.md#simple-mount-details)
|
||||
- [Available Tools](tools.md)
|
||||
- [magiskboot](tools.md#magiskboot)
|
||||
- [magiskinit](tools.md#magiskinit)
|
||||
- [magiskpolicy](tools.md#magiskpolicy)
|
||||
- [magisk](tools.md#magisk)
|
||||
- [su](tools.md#su)
|
||||
- [resetprop](tools.md#resetprop)
|
||||
- [magiskhide](tools.md#magiskhide)
|
||||
- [Modules](modules.md)
|
||||
- [Modules and Templates](modules.md#magisk-module-format)
|
||||
- [Submit Modules to Repo](https://github.com/topjohnwu/Magisk_Repo_Submissions)
|
||||
- [Tips and Tricks](tips.md)
|
||||
- [Remove Files](tips.md#remove-files)
|
||||
- [Remove Folders](tips.md#remove-folders)
|
||||
|
||||
|
||||
## Introduction
|
||||
Magisk is a suite of open source tools for devices running Android version higher than 5.0 Lollipop (API 21). It establishes an environment which covers most stuffs you need for Android customization, such as root, boot scripts, SELinux patches, AVB2.0 / dm-verity / forceencrypt patches etc..
|
||||
|
||||
Furthermore, Magisk provides a **Systemless Interface** to alter the system (or vendor) arbitrarily while the actual partitions stay completely intact, all of which accomplished by only patching the boot image. With its systemless nature along with several other hacks, Magisk can hide modifications from nearly any existing system integrity verifications, one of the main target is to hide from [Google's SafetyNet API](https://developer.android.com/training/safetynet/index.html).
|
||||
8
docs/changelog.md
Normal file
8
docs/changelog.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Changelog
|
||||
- 2017.8.16
|
||||
- Initial version for Magisk v13.5
|
||||
- 2017.9.28
|
||||
- Update applets info to Magisk v14.1
|
||||
- Add OTA tips
|
||||
- 2017.1.8
|
||||
- Update to Magisk v15.2
|
||||
59
docs/details.md
Normal file
59
docs/details.md
Normal file
File diff suppressed because one or more lines are too long
BIN
docs/images/disable_auto_ota.png
Normal file
BIN
docs/images/disable_auto_ota.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 245 KiB |
BIN
docs/images/flashfire.png
Normal file
BIN
docs/images/flashfire.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 224 KiB |
BIN
docs/images/install_second_slot.png
Normal file
BIN
docs/images/install_second_slot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 237 KiB |
BIN
docs/images/ota_step2.png
Normal file
BIN
docs/images/ota_step2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 176 KiB |
BIN
docs/images/repo_description.png
Normal file
BIN
docs/images/repo_description.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
BIN
docs/images/restore_img.png
Normal file
BIN
docs/images/restore_img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 244 KiB |
49
docs/modules.md
Normal file
49
docs/modules.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Magisk Modules
|
||||
## Magisk Module Format
|
||||
A Magisk module is a folder placed in the root folder in `magisk.img`, which has a structure as described below:
|
||||
|
||||
```
|
||||
$MOUNTPOINT
|
||||
├── .
|
||||
├── .
|
||||
├── $MODID <--- The ID of the module, should match with module.prop
|
||||
│ ├── auto_mount <--- If this file exists, auto mount is enabled
|
||||
│ ├── disable <--- If this file exists, the module is disabled
|
||||
│ ├── module.prop <--- This files stores the identity and properties of the module
|
||||
│ ├── post-fs-data.sh <--- This script will be executed in post-fs-data
|
||||
│ ├── remove <--- If this file exists, the module will be removed next reboot
|
||||
│ ├── service.sh <--- This script will be executed in late_start service
|
||||
│ ├── system.prop <--- This file will be loaded as system props
|
||||
│ ├── system <--- If auto mount is enabled, Magisk will "Magic Mount" this folder
|
||||
│ │ ├── .
|
||||
│ │ ├── .
|
||||
│ │ └── .
|
||||
│ ├── vendor <--- Auto generated. A symlink to $MODID/system/vendor
|
||||
│ ├── . <--- Any other files/folders are allowed
|
||||
│ └── .
|
||||
├── another_module
|
||||
│ ├── .
|
||||
│ └── .
|
||||
├── .
|
||||
├── .
|
||||
```
|
||||
You are not required to use my Magisk Module Template to create a module. As long as you place files with the structure above, it will be recognized as a module.
|
||||
|
||||
## Magisk Module Template
|
||||
The **Magisk Module Template** is hosted **[here](https://github.com/topjohnwu/magisk-module-template)**.
|
||||
|
||||
It is a template to create a flashable zip to install Magisk Modules. It is designed to be simple to use so that anyone can create their own modules easily. The template itself contains minimal scripting for installation; most of the functions are located externally in [util_functions.sh](https://github.com/topjohnwu/Magisk/blob/master/scripts/util_functions.sh), which will be installed along with Magisk, and can be upgraded through a Magisk upgrade without the need of a template update.
|
||||
|
||||
Here are some files you would want to know:
|
||||
|
||||
- `config.sh`: A simple script used as a configuration file. It is the place to configure which features your module needs/disables. A detailed instructions on how to use the template is also written in this file.
|
||||
- `module.prop`: This file contains your module's indentity and properties, including name and versions etc.. This file will be used to identify your module on an actual device and in the [Magisk Modules Repo](https://github.com/Magisk-Modules-Repo)
|
||||
- `common/*`: Boot stage scripts and `system.prop`
|
||||
- `META-INF/com/google/android/update-binary`: The actual installation script. Modify this file for advanced custom behavior
|
||||
|
||||
And here are some notes to be aware of:
|
||||
|
||||
- The template depends on external Magisk scripts, please specify the correct `minMagisk` value in `module.prop` with the template version your module is based on, or the minimum Magisk version your module is tested on.
|
||||
- **Windows users please check here!!** The line endings of all text files should be in the **Unix format**. Please use advanced text editors like Sublime, Atom, Notepad++ etc. to edit **ALL** text files, **NEVER** use Windows Notepad.
|
||||
- In `module.prop`, `version` can be an arbitrary string, so any fancy version name (e.g. `ultra-beta-v1.1.1.1`) is allowed. However, `versionCode` **MUST** be an integer. The value is used for version comparison.
|
||||
- Make sure your module ID **does not contain any spaces**.
|
||||
11
docs/procedures.html
Normal file
11
docs/procedures.html
Normal file
File diff suppressed because one or more lines are too long
53
docs/tips.md
Normal file
53
docs/tips.md
Normal file
File diff suppressed because one or more lines are too long
287
docs/tools.md
Normal file
287
docs/tools.md
Normal file
File diff suppressed because one or more lines are too long
22
gradle.properties
Normal file
22
gradle.properties
Normal file
@@ -0,0 +1,22 @@
|
||||
# Project-wide Gradle settings.
|
||||
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
||||
org.gradle.jvmargs=-Xmx2560m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
org.gradle.parallel=true
|
||||
|
||||
# When set to true the Gradle daemon is used to run the build. For local developer builds this is our favorite property.
|
||||
# The developer environment is optimized for speed and feedback so we nearly always run Gradle jobs with the daemon.
|
||||
org.gradle.daemon=true
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#Mon Dec 04 11:24:34 CST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
|
||||
160
gradlew
vendored
Executable file
160
gradlew
vendored
Executable file
@@ -0,0 +1,160 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
90
gradlew.bat
vendored
Normal file
90
gradlew.bat
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -1,35 +0,0 @@
|
||||
my_path := $(call my-dir)
|
||||
|
||||
LOCAL_PATH := $(my_path)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := magiskhide
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
||||
LOCAL_LDFLAGS := -static
|
||||
LOCAL_STATIC_LIBRARIES := libc libcutils
|
||||
LOCAL_SRC_FILES := magiskhide.c
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := bootimgtools
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
||||
LOCAL_LDFLAGS := -static
|
||||
LOCAL_STATIC_LIBRARIES := libc libcutils
|
||||
LOCAL_SRC_FILES := bootimgtools.c extract.c repack.c hexpatch.c
|
||||
LOCAL_CFLAGS += -std=gnu11
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := sepolicy-inject
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
||||
LOCAL_LDFLAGS := -static
|
||||
LOCAL_STATIC_LIBRARIES := libc libcutils libsepol
|
||||
LOCAL_SRC_FILES := sepolicy-inject/sepolicy-inject.c sepolicy-inject/builtin_rules.c
|
||||
LOCAL_C_INCLUDES := selinux/libsepol/include/
|
||||
LOCAL_CFLAGS += -std=gnu11
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
include selinux/libsepol/Android.mk
|
||||
@@ -1,3 +0,0 @@
|
||||
APP_ABI := x86 armeabi
|
||||
APP_PIE = true
|
||||
APP_PLATFORM := android-21
|
||||
@@ -1,45 +0,0 @@
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "bootimgtools.h"
|
||||
|
||||
/********************
|
||||
Patch Boot Image
|
||||
*********************/
|
||||
|
||||
int usage(char *arg0) {
|
||||
fprintf(stderr, "Boot Image Unpack/Repack Tool\n");
|
||||
fprintf(stderr, "%s --extract <bootimage>\n", arg0);
|
||||
fprintf(stderr, " Unpack <bootimage> into current directory\n\n");
|
||||
fprintf(stderr, "%s --repack <bootimage>\n", arg0);
|
||||
fprintf(stderr, " Repack kernel, dt, ramdisk... from current directory to new-image.img\n <bootimage> is the image you've just unpacked\n\n");
|
||||
fprintf(stderr, "%s --hexpatch <bootimage> <hexpattern1> <hexpattern2>\n", arg0);
|
||||
fprintf(stderr, " Search <hexpattern1> in <bootimage>, and replace with <hexpattern2>\n\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char ch;
|
||||
struct option long_options[] = {
|
||||
{"extract", required_argument, NULL, 'e'},
|
||||
{"repack", required_argument, NULL, 'r'},
|
||||
{"hexpatch", required_argument, NULL, 'p'},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
while ((ch = getopt_long(argc, argv, "e:r:p:", long_options, NULL)) != -1) {
|
||||
switch (ch) {
|
||||
case 'e':
|
||||
return extract(optarg);
|
||||
case 'r':
|
||||
return repack(optarg);
|
||||
case 'p':
|
||||
if (argc < 5) return usage(argv[0]);
|
||||
optind += 2;
|
||||
return hexpatch(argv[optind - 3], argv[optind - 2], argv[optind - 1]);
|
||||
default:
|
||||
return usage(argv[0]);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user