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
4f5c656b
Commit
4f5c656b
authored
Sep 15, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update uninstall method
parent
a31cddbe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
22 deletions
+10
-22
Utils.java
app/src/main/java/com/topjohnwu/magisk/utils/Utils.java
+9
-22
strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/utils/Utils.java
View file @
4f5c656b
...
...
@@ -5,7 +5,6 @@ import android.app.Activity;
import
android.app.DownloadManager
;
import
android.app.NotificationManager
;
import
android.app.PendingIntent
;
import
android.app.ProgressDialog
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.IntentFilter
;
...
...
@@ -16,7 +15,6 @@ import android.database.Cursor;
import
android.net.ConnectivityManager
;
import
android.net.NetworkInfo
;
import
android.net.Uri
;
import
android.os.CountDownTimer
;
import
android.os.Environment
;
import
android.provider.OpenableColumns
;
import
android.support.annotation.StringRes
;
...
...
@@ -508,26 +506,15 @@ public class Utils {
}
in
.
close
();
out
.
close
();
ProgressDialog
progress
=
new
ProgressDialog
(
fragment
.
getActivity
());
progress
.
setTitle
(
R
.
string
.
reboot
);
progress
.
show
();
new
CountDownTimer
(
5000
,
1000
)
{
@Override
public
void
onTick
(
long
millisUntilFinished
)
{
progress
.
setMessage
(
mm
.
getString
(
R
.
string
.
reboot_countdown
,
millisUntilFinished
/
1000
));
}
@Override
public
void
onFinish
()
{
progress
.
setMessage
(
mm
.
getString
(
R
.
string
.
reboot_countdown
,
0
));
Shell
.
getShell
(
mm
).
su_raw
(
"mv -f "
+
uninstaller
+
" /cache/"
+
UNINSTALLER
,
"mv -f "
+
utils
+
" /data/magisk/"
+
UTIL_FUNCTIONS
,
"reboot"
);
}
}.
start
();
Shell
.
getShell
(
mm
).
su
(
"cat "
+
uninstaller
+
" > /cache/"
+
UNINSTALLER
,
"cat "
+
utils
+
" > /data/magisk/"
+
UTIL_FUNCTIONS
);
mm
.
toast
(
R
.
string
.
uninstall_toast
,
Toast
.
LENGTH_LONG
);
Shell
.
getShell
(
mm
).
su_raw
(
"sleep 5"
,
"pm uninstall "
+
mm
.
getApplicationInfo
().
packageName
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
...
...
app/src/main/res/values/strings.xml
View file @
4f5c656b
...
...
@@ -122,6 +122,7 @@
<string
name=
"restore_stock_boot"
>
Restore Stock Boot
</string>
<string
name=
"restore_done"
>
Restoration done!
</string>
<string
name=
"restore_fail"
>
Stock backup does not exist!
</string>
<string
name=
"uninstall_toast"
>
Uninstalling Magisk Manager in 5 seconds, please manually reboot afterwards
</string>
<!--Settings Activity -->
<string
name=
"settings_general_category"
>
General
</string>
...
...
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