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
ad94f102
Commit
ad94f102
authored
Jun 01, 2020
by
Chris Renshaw
Committed by
topjohnwu
Jun 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix direct install on NAND devices
Co-authored-by:
John Wu
<
topjohnwu@gmail.com
>
parent
02b2290b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
MagiskInstallImpl.kt
...java/com/topjohnwu/magisk/core/tasks/MagiskInstallImpl.kt
+10
-0
util_functions.sh
scripts/util_functions.sh
+2
-2
No files found.
app/src/main/java/com/topjohnwu/magisk/core/tasks/MagiskInstallImpl.kt
View file @
ad94f102
...
...
@@ -239,6 +239,12 @@ abstract class MagiskInstallImpl : FlashResultListener {
}
private
fun
patchBoot
():
Boolean
{
var
srcNand
=
""
if
(
"[ -c $srcBoot ] && nanddump -f boot.img $srcBoot"
.
sh
().
isSuccess
)
{
srcNand
=
srcBoot
srcBoot
=
File
(
installDir
,
"boot.img"
).
path
}
var
isSigned
=
false
try
{
SuFileInputStream
(
srcBoot
).
use
{
...
...
@@ -258,6 +264,10 @@ abstract class MagiskInstallImpl : FlashResultListener {
return
false
}
if
(
srcNand
.
isNotEmpty
())
{
srcBoot
=
srcNand
}
val
job
=
Shell
.
sh
(
"./magiskboot cleanup"
,
"mv bin/busybox busybox"
,
...
...
scripts/util_functions.sh
View file @
ad94f102
...
...
@@ -411,8 +411,8 @@ flash_image() {
[
$img_sz
-gt
$blk_sz
]
&&
return
1
eval
$CMD1
|
eval
$CMD2
|
cat
- /dev/zero
>
"
$2
"
2>/dev/null
elif
[
-c
"
$2
"
]
;
then
flash_eraseall
"
$2
"
eval
$CMD1
|
eval
$CMD2
| nandwrite
-p
"
$2
"
-
flash_eraseall
"
$2
"
>
&2
eval
$CMD1
|
eval
$CMD2
| nandwrite
-p
"
$2
"
-
>
&2
else
ui_print
"- Not block or char device, storing image"
eval
$CMD1
|
eval
$CMD2
>
"
$2
"
2>/dev/null
...
...
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