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
1e175e74
Commit
1e175e74
authored
Aug 06, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent crashes
parent
75a46c36
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
DownloadBusybox.java
...ain/java/com/topjohnwu/magisk/asyncs/DownloadBusybox.java
+1
-0
Shell.java
app/src/main/java/com/topjohnwu/magisk/utils/Shell.java
+2
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/asyncs/DownloadBusybox.java
View file @
1e175e74
...
@@ -16,6 +16,7 @@ public class DownloadBusybox extends ParallelTask<Void, Void, Void> {
...
@@ -16,6 +16,7 @@ public class DownloadBusybox extends ParallelTask<Void, Void, Void> {
private
File
busybox
;
private
File
busybox
;
public
DownloadBusybox
(
Context
context
,
File
bb
)
{
public
DownloadBusybox
(
Context
context
,
File
bb
)
{
super
(
context
);
busybox
=
bb
;
busybox
=
bb
;
}
}
...
...
app/src/main/java/com/topjohnwu/magisk/utils/Shell.java
View file @
1e175e74
package
com
.
topjohnwu
.
magisk
.
utils
;
package
com
.
topjohnwu
.
magisk
.
utils
;
import
android.content.Context
;
import
android.content.Context
;
import
android.text.TextUtils
;
import
com.topjohnwu.magisk.MagiskManager
;
import
com.topjohnwu.magisk.MagiskManager
;
...
@@ -48,7 +49,7 @@ public class Shell {
...
@@ -48,7 +49,7 @@ public class Shell {
in
.
write
((
"id\n"
).
getBytes
(
"UTF-8"
));
in
.
write
((
"id\n"
).
getBytes
(
"UTF-8"
));
in
.
flush
();
in
.
flush
();
String
s
=
new
BufferedReader
(
new
InputStreamReader
(
out
)).
readLine
();
String
s
=
new
BufferedReader
(
new
InputStreamReader
(
out
)).
readLine
();
if
(
s
.
isEmpty
(
)
||
!
s
.
contains
(
"uid=0"
))
{
if
(
TextUtils
.
isEmpty
(
s
)
||
!
s
.
contains
(
"uid=0"
))
{
in
.
close
();
in
.
close
();
out
.
close
();
out
.
close
();
process
.
destroy
();
process
.
destroy
();
...
...
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