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
79dfdb29
Commit
79dfdb29
authored
Jan 12, 2021
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor tweaks for patching tar files
parent
eb21c8b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
MagiskInstaller.kt
...n/java/com/topjohnwu/magisk/core/tasks/MagiskInstaller.kt
+4
-3
No files found.
app/src/main/java/com/topjohnwu/magisk/core/tasks/MagiskInstaller.kt
View file @
79dfdb29
...
@@ -191,9 +191,10 @@ abstract class MagiskInstallImpl : KoinComponent {
...
@@ -191,9 +191,10 @@ abstract class MagiskInstallImpl : KoinComponent {
if
(
rawData
.
size
<
256
)
if
(
rawData
.
size
<
256
)
continue
continue
// Patch flags to AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED
// Patch flags to AVB_VBMETA_IMAGE_FLAGS_HASHTREE_DISABLED |
// AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED
console
.
add
(
"-- Patching: vbmeta.img"
)
console
.
add
(
"-- Patching: vbmeta.img"
)
ByteBuffer
.
wrap
(
rawData
).
putInt
(
120
,
2
)
ByteBuffer
.
wrap
(
rawData
).
putInt
(
120
,
3
)
tarOut
.
putNextEntry
(
newEntry
(
"vbmeta.img"
,
rawData
.
size
.
toLong
()))
tarOut
.
putNextEntry
(
newEntry
(
"vbmeta.img"
,
rawData
.
size
.
toLong
()))
tarOut
.
write
(
rawData
)
tarOut
.
write
(
rawData
)
}
else
{
}
else
{
...
@@ -204,7 +205,7 @@ abstract class MagiskInstallImpl : KoinComponent {
...
@@ -204,7 +205,7 @@ abstract class MagiskInstallImpl : KoinComponent {
}
}
val
boot
=
SuFile
.
open
(
installDir
,
"boot.img"
)
val
boot
=
SuFile
.
open
(
installDir
,
"boot.img"
)
val
recovery
=
SuFile
.
open
(
installDir
,
"recovery.img"
)
val
recovery
=
SuFile
.
open
(
installDir
,
"recovery.img"
)
if
(
recovery
.
exists
()
&&
boot
.
exists
())
{
if
(
Config
.
recovery
&&
recovery
.
exists
()
&&
boot
.
exists
())
{
// Install Magisk to recovery
// Install Magisk to recovery
srcBoot
=
recovery
.
path
srcBoot
=
recovery
.
path
// Repack boot image to prevent restore
// Repack boot image to prevent restore
...
...
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