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
38ab6858
Commit
38ab6858
authored
Aug 23, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not crash root service in stub
parent
a54114f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
DynLoad.java
stub/src/main/java/com/topjohnwu/magisk/DynLoad.java
+16
-12
No files found.
stub/src/main/java/com/topjohnwu/magisk/DynLoad.java
View file @
38ab6858
...
@@ -60,20 +60,24 @@ public class DynLoad {
...
@@ -60,20 +60,24 @@ public class DynLoad {
// Copy from external for easier development
// Copy from external for easier development
if
(
BuildConfig
.
DEBUG
)
{
if
(
BuildConfig
.
DEBUG
)
{
File
external
=
new
File
(
context
.
getExternalFilesDir
(
null
),
"magisk.apk"
);
try
{
if
(
external
.
exists
())
{
File
external
=
new
File
(
context
.
getExternalFilesDir
(
null
),
"magisk.apk"
);
try
{
if
(
external
.
exists
())
{
var
in
=
new
FileInputStream
(
external
);
try
{
var
out
=
new
FileOutputStream
(
apk
);
var
in
=
new
FileInputStream
(
external
);
try
(
in
;
out
)
{
var
out
=
new
FileOutputStream
(
apk
);
APKInstall
.
transfer
(
in
,
out
);
try
(
in
;
out
)
{
APKInstall
.
transfer
(
in
,
out
);
}
}
catch
(
IOException
e
)
{
Log
.
e
(
DynLoad
.
class
.
getSimpleName
(),
""
,
e
);
apk
.
delete
();
}
finally
{
external
.
delete
();
}
}
}
catch
(
IOException
e
)
{
Log
.
e
(
DynLoad
.
class
.
getSimpleName
(),
""
,
e
);
apk
.
delete
();
}
finally
{
external
.
delete
();
}
}
}
catch
(
SecurityException
e
)
{
// Do not crash in root service
}
}
}
}
...
...
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