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
1d9359d5
Commit
1d9359d5
authored
Mar 20, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix additional setup
parent
945f8810
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
MagiskInstaller.java
...main/java/com/topjohnwu/magisk/tasks/MagiskInstaller.java
+15
-16
utils.sh
app/src/main/res/raw/utils.sh
+1
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/tasks/MagiskInstaller.java
View file @
1d9359d5
...
@@ -147,12 +147,9 @@ public abstract class MagiskInstaller {
...
@@ -147,12 +147,9 @@ public abstract class MagiskInstaller {
name
=
ze
.
getName
();
name
=
ze
.
getName
();
if
(
name
==
null
)
if
(
name
==
null
)
continue
;
continue
;
File
dest
;
File
dest
=
(
installDir
instanceof
SuFile
)
?
if
(
installDir
instanceof
SuFile
)
{
new
SuFile
(
installDir
,
name
)
:
dest
=
new
SuFile
(
installDir
,
name
);
new
File
(
installDir
,
name
);
}
else
{
dest
=
new
File
(
installDir
,
name
);
}
dest
.
getParentFile
().
mkdirs
();
dest
.
getParentFile
().
mkdirs
();
try
(
OutputStream
out
=
new
SuFileOutputStream
(
dest
))
{
try
(
OutputStream
out
=
new
SuFileOutputStream
(
dest
))
{
ShellUtils
.
pump
(
zi
,
out
);
ShellUtils
.
pump
(
zi
,
out
);
...
@@ -162,6 +159,13 @@ public abstract class MagiskInstaller {
...
@@ -162,6 +159,13 @@ public abstract class MagiskInstaller {
console
.
add
(
"! Cannot unzip zip"
);
console
.
add
(
"! Cannot unzip zip"
);
return
false
;
return
false
;
}
}
SuFile
init64
=
new
SuFile
(
installDir
,
"magiskinit64"
);
if
(
Build
.
VERSION
.
SDK_INT
>=
21
&&
Build
.
SUPPORTED_64_BIT_ABIS
.
length
!=
0
)
{
init64
.
renameTo
(
new
SuFile
(
installDir
,
"magiskinit"
));
}
else
{
init64
.
delete
();
}
return
true
;
return
true
;
}
}
...
@@ -211,18 +215,13 @@ public abstract class MagiskInstaller {
...
@@ -211,18 +215,13 @@ public abstract class MagiskInstaller {
return
false
;
return
false
;
}
}
Shell
.
Job
job
=
Shell
.
sh
(
"cd "
+
installDir
);
if
(
Shell
.
sh
(
"cd "
+
installDir
,
Utils
.
fmt
(
if
(
Build
.
VERSION
.
SDK_INT
>=
21
&&
Build
.
SUPPORTED_64_BIT_ABIS
.
length
!=
0
)
{
"KEEPFORCEENCRYPT=%b KEEPVERITY=%b sh update-binary sh boot_patch.sh %s"
,
job
.
add
(
"mv -f magiskinit64 magiskinit 2>/dev/null"
);
Config
.
keepEnc
,
Config
.
keepVerity
,
srcBoot
))
}
else
{
.
to
(
console
,
logs
).
exec
().
isSuccess
())
job
.
add
(
"rm -f magiskinit64 2>/dev/null"
);
}
if
(!
job
.
add
(
Utils
.
fmt
(
"KEEPFORCEENCRYPT=%b KEEPVERITY=%b "
+
"sh update-binary sh boot_patch.sh %s"
,
Config
.
keepEnc
,
Config
.
keepVerity
,
srcBoot
)).
to
(
console
,
logs
).
exec
().
isSuccess
())
return
false
;
return
false
;
job
=
Shell
.
sh
(
"./magiskboot --cleanup"
,
Shell
.
Job
job
=
Shell
.
sh
(
"./magiskboot --cleanup"
,
"mv bin/busybox busybox"
,
"mv bin/busybox busybox"
,
"rm -rf magisk.apk bin boot.img update-binary"
,
"rm -rf magisk.apk bin boot.img update-binary"
,
"cd /"
);
"cd /"
);
...
...
app/src/main/res/raw/utils.sh
View file @
1d9359d5
...
@@ -15,6 +15,7 @@ fix_env() {
...
@@ -15,6 +15,7 @@ fix_env() {
$MAGISKTMP
/mirror/bin/busybox
--install
-s
$MAGISKTMP
/busybox
$MAGISKTMP
/mirror/bin/busybox
--install
-s
$MAGISKTMP
/busybox
rm
-f
update-binary magisk.apk
rm
-f
update-binary magisk.apk
chmod
-R
755
.
chmod
-R
755
.
./magiskinit
-x
magisk magisk
cd
/
cd
/
}
}
...
...
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