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
a1ba4fda
Commit
a1ba4fda
authored
Sep 06, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve install Magisk
parent
1c06b04c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
2 deletions
+7
-2
InstallMagisk.java
.../main/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java
+4
-2
Utils.java
app/src/main/java/com/topjohnwu/magisk/utils/Utils.java
+1
-0
strings.xml
app/src/main/res/values-zh-rTW/strings.xml
+1
-0
strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java
View file @
a1ba4fda
...
@@ -166,7 +166,7 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
...
@@ -166,7 +166,7 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
shell
.
sh
(
mList
,
shell
.
sh
(
mList
,
"cd "
+
install
,
"cd "
+
install
,
"KEEPFORCEENCRYPT="
+
mKeepEnc
+
" KEEPVERITY="
+
mKeepVerity
+
" sh "
+
"KEEPFORCEENCRYPT="
+
mKeepEnc
+
" KEEPVERITY="
+
mKeepVerity
+
" sh "
+
"update-binary indep boot_patch.sh "
+
boot
+
" 2>&1"
+
"update-binary indep boot_patch.sh "
+
boot
+
" && echo 'Success!' || echo 'Failed!'"
" && echo 'Success!' || echo 'Failed!'"
);
);
...
@@ -213,8 +213,10 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
...
@@ -213,8 +213,10 @@ public class InstallMagisk extends ParallelTask<Void, Void, Boolean> {
// Finals
// Finals
getShell
().
sh_raw
(
getShell
().
sh_raw
(
"cd "
+
install
,
"mv bin/busybox busybox"
,
"mv bin/busybox busybox"
,
"rm -rf bin *.img update-binary"
);
"rm -rf bin *.img update-binary"
,
"cd /"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
return
false
;
return
false
;
...
...
app/src/main/java/com/topjohnwu/magisk/utils/Utils.java
View file @
a1ba4fda
...
@@ -354,6 +354,7 @@ public class Utils {
...
@@ -354,6 +354,7 @@ public class Utils {
mm
.
toast
(
R
.
string
.
no_boot_file_patch_support
,
Toast
.
LENGTH_LONG
);
mm
.
toast
(
R
.
string
.
no_boot_file_patch_support
,
Toast
.
LENGTH_LONG
);
return
;
return
;
}
}
mm
.
toast
(
R
.
string
.
boot_file_patch_msg
,
Toast
.
LENGTH_LONG
);
Intent
intent
=
new
Intent
(
Intent
.
ACTION_GET_CONTENT
);
Intent
intent
=
new
Intent
(
Intent
.
ACTION_GET_CONTENT
);
intent
.
setType
(
"*/*"
);
intent
.
setType
(
"*/*"
);
fragment
.
startActivityForResult
(
intent
,
SELECT_BOOT_IMG
,
fragment
.
startActivityForResult
(
intent
,
SELECT_BOOT_IMG
,
...
...
app/src/main/res/values-zh-rTW/strings.xml
View file @
a1ba4fda
...
@@ -212,5 +212,6 @@
...
@@ -212,5 +212,6 @@
<string
name=
"restore_stock_boot"
>
還原原廠 boot 映像
</string>
<string
name=
"restore_stock_boot"
>
還原原廠 boot 映像
</string>
<string
name=
"restore_done"
>
還原完成!
</string>
<string
name=
"restore_done"
>
還原完成!
</string>
<string
name=
"restore_fail"
>
原廠 boot 映像備份不存在!
</string>
<string
name=
"restore_fail"
>
原廠 boot 映像備份不存在!
</string>
<string
name=
"boot_file_patch_msg"
>
選擇原廠 boot 映像備份;支援 .img 以及 .img.tar 格式
</string>
</resources>
</resources>
app/src/main/res/values/strings.xml
View file @
a1ba4fda
...
@@ -116,6 +116,7 @@
...
@@ -116,6 +116,7 @@
<string
name=
"direct_install"
>
Direct Install (Recommend)
</string>
<string
name=
"direct_install"
>
Direct Install (Recommend)
</string>
<string
name=
"select_method"
>
Select Method
</string>
<string
name=
"select_method"
>
Select Method
</string>
<string
name=
"no_boot_file_patch_support"
>
Target Magisk version doesn\'t support boot image file patching
</string>
<string
name=
"no_boot_file_patch_support"
>
Target Magisk version doesn\'t support boot image file patching
</string>
<string
name=
"boot_file_patch_msg"
>
Select stock boot image dump in .img or .img.tar format
</string>
<string
name=
"complete_uninstall"
>
Complete Uninstall
</string>
<string
name=
"complete_uninstall"
>
Complete Uninstall
</string>
<string
name=
"restore_stock_boot"
>
Restore Stock Boot
</string>
<string
name=
"restore_stock_boot"
>
Restore Stock Boot
</string>
<string
name=
"restore_done"
>
Restoration done!
</string>
<string
name=
"restore_done"
>
Restoration done!
</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