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
9c0e1897
Commit
9c0e1897
authored
Apr 06, 2021
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fallback to getprop when reading system props
Close #4153
parent
3da318b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
util_functions.sh
scripts/util_functions.sh
+14
-4
No files found.
scripts/util_functions.sh
View file @
9c0e1897
...
...
@@ -33,6 +33,16 @@ grep_prop() {
cat
$FILES
2>/dev/null | dos2unix |
sed
-n
"
$REGEX
"
|
head
-n
1
}
grep_get_prop
()
{
local
result
=
$(
grep_prop
$@
)
if
[
-z
"
$result
"
]
;
then
# Fallback to getprop
getprop
"
$1
"
else
echo
$result
fi
}
getvar
()
{
local
VARNAME
=
$1
local
VALUE
...
...
@@ -508,10 +518,10 @@ remove_system_su() {
}
api_level_arch_detect
()
{
API
=
`
grep_prop ro.build.version.sdk
`
ABI
=
`
grep_prop ro.product.cpu.abi |
cut
-c-3
`
ABI2
=
`
grep_prop ro.product.cpu.abi2 |
cut
-c-3
`
ABILONG
=
`
grep_prop ro.product.cpu.abi
`
API
=
$(
grep_get_prop ro.build.version.sdk
)
ABI
=
$(
grep_get_prop ro.product.cpu.abi |
cut
-c-3
)
ABI2
=
$(
grep_get_prop ro.product.cpu.abi2 |
cut
-c-3
)
ABILONG
=
$(
grep_get_prop ro.product.cpu.abi
)
ARCH
=
arm
ARCH32
=
arm
...
...
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