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
d7d80d3f
Commit
d7d80d3f
authored
Oct 20, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update encryption detection for determining default flags
parent
41b01003
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
flash_script.sh
scripts/flash_script.sh
+1
-2
util_functions.sh
scripts/util_functions.sh
+5
-2
No files found.
scripts/flash_script.sh
View file @
d7d80d3f
...
...
@@ -47,6 +47,7 @@ mount_partitions
find_boot_image
find_dtbo_image
check_data
get_flags
[
-z
$BOOTIMAGE
]
&&
abort
"! Unable to detect target image"
...
...
@@ -72,8 +73,6 @@ remove_system_su
ui_print
"- Constructing environment"
check_data
if
$DATA
;
then
MAGISKBIN
=
/data/magisk
$DATA_DE
&&
MAGISKBIN
=
/data/adb/magisk
...
...
scripts/util_functions.sh
View file @
d7d80d3f
...
...
@@ -94,7 +94,7 @@ mount_partitions() {
mount
-t
ext4
-o
ro
$SYSTEMBLOCK
/system
fi
[
-f
/system/build.prop
]
||
is_mounted /system
||
abort
"! Cannot mount /system"
cat
/proc/mounts |
grep
-E
'/dev/root|/system_root'
>
/dev/null
&&
SYSTEM_ROOT
=
true
||
SYSTEM_ROOT
=
false
grep
-qE
'/dev/root|/system_root'
/proc/mounts
&&
SYSTEM_ROOT
=
true
||
SYSTEM_ROOT
=
false
if
[
-f
/system/init
]
;
then
SYSTEM_ROOT
=
true
mkdir
/system_root 2>/dev/null
...
...
@@ -125,7 +125,10 @@ get_flags() {
fi
fi
if
[
-z
$KEEPFORCEENCRYPT
]
;
then
if
[
"
`
getprop ro.crypto.state
`
"
=
"encrypted"
]
;
then
grep
' /data '
/proc/mounts |
grep
-q
'dm-'
&&
FDE
=
true
||
FDE
=
false
[
-d
/data/unencrypted
]
&&
FBE
=
true
||
FBE
=
false
# No data access means unable to decrypt in recovery
if
$FDE
||
$FBE
||
!
$DATA
;
then
KEEPFORCEENCRYPT
=
true
ui_print
"- Encrypted data detected, keep forceencrypt"
else
...
...
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