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
0ef92a48
Commit
0ef92a48
authored
Sep 23, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide OTA option on Pixel devices
parent
85bef8fa
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
Info.kt
app/src/main/java/com/topjohnwu/magisk/core/Info.kt
+1
-0
RootInit.kt
...src/main/java/com/topjohnwu/magisk/core/utils/RootInit.kt
+6
-4
fragment_install_md2.xml
app/src/main/res/layout/fragment_install_md2.xml
+1
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/core/Info.kt
View file @
0ef92a48
...
@@ -33,6 +33,7 @@ object Info {
...
@@ -33,6 +33,7 @@ object Info {
@JvmStatic
var
ramdisk
=
false
@JvmStatic
var
ramdisk
=
false
@JvmStatic
var
hasGMS
=
true
@JvmStatic
var
hasGMS
=
true
@JvmStatic
var
crypto
=
""
@JvmStatic
var
crypto
=
""
@JvmStatic
var
isPixel
=
false
val
isConnected
by
lazy
{
val
isConnected
by
lazy
{
ObservableBoolean
(
false
).
also
{
field
->
ObservableBoolean
(
false
).
also
{
field
->
...
...
app/src/main/java/com/topjohnwu/magisk/core/utils/RootInit.kt
View file @
0ef92a48
...
@@ -38,14 +38,16 @@ class RootInit : Shell.Initializer() {
...
@@ -38,14 +38,16 @@ class RootInit : Shell.Initializer() {
add
(
"mm_init"
)
add
(
"mm_init"
)
}.
exec
()
}.
exec
()
fun
getvar
(
name
:
String
)
=
ShellUtils
.
fastCmd
(
shell
,
"echo \$$name"
)
fun
fastCmd
(
cmd
:
String
)
=
ShellUtils
.
fastCmd
(
shell
,
cmd
)
fun
getBool
(
name
:
String
)
=
getvar
(
name
).
toBoolean
()
fun
getVar
(
name
:
String
)
=
fastCmd
(
"echo \$$name"
)
fun
getBool
(
name
:
String
)
=
getVar
(
name
).
toBoolean
()
Const
.
MAGISKTMP
=
get
v
ar
(
"MAGISKTMP"
)
Const
.
MAGISKTMP
=
get
V
ar
(
"MAGISKTMP"
)
Info
.
isSAR
=
getBool
(
"SYSTEM_ROOT"
)
Info
.
isSAR
=
getBool
(
"SYSTEM_ROOT"
)
Info
.
ramdisk
=
getBool
(
"RAMDISKEXIST"
)
Info
.
ramdisk
=
getBool
(
"RAMDISKEXIST"
)
Info
.
isAB
=
getBool
(
"ISAB"
)
Info
.
isAB
=
getBool
(
"ISAB"
)
Info
.
crypto
=
getvar
(
"CRYPTOTYPE"
)
Info
.
crypto
=
getVar
(
"CRYPTOTYPE"
)
Info
.
isPixel
=
fastCmd
(
"getprop ro.product.brand"
)
==
"google"
// Default presets
// Default presets
Config
.
recovery
=
getBool
(
"RECOVERYMODE"
)
Config
.
recovery
=
getBool
(
"RECOVERYMODE"
)
...
...
app/src/main/res/layout/fragment_install_md2.xml
View file @
0ef92a48
...
@@ -213,7 +213,7 @@
...
@@ -213,7 +213,7 @@
<RadioButton
<RadioButton
android:id=
"@+id/method_inactive_slot"
android:id=
"@+id/method_inactive_slot"
style=
"@style/WidgetFoundation.RadioButton"
style=
"@style/WidgetFoundation.RadioButton"
gone=
"@{!viewModel.isRooted || !Info.isAB}"
gone=
"@{!viewModel.isRooted ||
Info.isPixel ||
!Info.isAB}"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/install_inactive_slot"
/>
android:text=
"@string/install_inactive_slot"
/>
...
...
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