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
52137fd6
Commit
52137fd6
authored
Dec 29, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless service
parent
3ccac8c3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
46 deletions
+15
-46
AndroidManifest.xml
app/src/full/AndroidManifest.xml
+0
-5
j.java
app/src/full/java/a/j.java
+1
-3
ClassMap.java
app/src/full/java/com/topjohnwu/magisk/ClassMap.java
+0
-2
GeneralReceiver.java
.../java/com/topjohnwu/magisk/receivers/GeneralReceiver.java
+14
-3
OnBootService.java
...ull/java/com/topjohnwu/magisk/services/OnBootService.java
+0
-33
No files found.
app/src/full/AndroidManifest.xml
View file @
52137fd6
...
@@ -71,11 +71,6 @@
...
@@ -71,11 +71,6 @@
<!-- Service -->
<!-- Service -->
<service
android:name=
"a.j"
android:exported=
"true"
android:permission=
"android.permission.BIND_JOB_SERVICE"
/>
<!-- Hardcode GMS version -->
<!-- Hardcode GMS version -->
<meta-data
<meta-data
android:name=
"com.google.android.gms.version"
android:name=
"com.google.android.gms.version"
...
...
app/src/full/java/a/j.java
View file @
52137fd6
package
a
;
package
a
;
import
com.topjohnwu.magisk.services.OnBootService
;
public
class
j
{
public
class
j
extends
OnBootService
{
/* stub */
/* stub */
}
}
app/src/full/java/com/topjohnwu/magisk/ClassMap.java
View file @
52137fd6
...
@@ -4,7 +4,6 @@ import com.topjohnwu.core.App;
...
@@ -4,7 +4,6 @@ import com.topjohnwu.core.App;
import
com.topjohnwu.magisk.components.AboutCardRow
;
import
com.topjohnwu.magisk.components.AboutCardRow
;
import
com.topjohnwu.magisk.receivers.GeneralReceiver
;
import
com.topjohnwu.magisk.receivers.GeneralReceiver
;
import
com.topjohnwu.magisk.receivers.ShortcutReceiver
;
import
com.topjohnwu.magisk.receivers.ShortcutReceiver
;
import
com.topjohnwu.magisk.services.OnBootService
;
import
com.topjohnwu.magisk.services.UpdateCheckService
;
import
com.topjohnwu.magisk.services.UpdateCheckService
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -23,7 +22,6 @@ public class ClassMap {
...
@@ -23,7 +22,6 @@ public class ClassMap {
classMap
.
put
(
UpdateCheckService
.
class
,
a
.
g
.
class
);
classMap
.
put
(
UpdateCheckService
.
class
,
a
.
g
.
class
);
classMap
.
put
(
GeneralReceiver
.
class
,
a
.
h
.
class
);
classMap
.
put
(
GeneralReceiver
.
class
,
a
.
h
.
class
);
classMap
.
put
(
ShortcutReceiver
.
class
,
a
.
i
.
class
);
classMap
.
put
(
ShortcutReceiver
.
class
,
a
.
i
.
class
);
classMap
.
put
(
OnBootService
.
class
,
a
.
j
.
class
);
classMap
.
put
(
AboutCardRow
.
class
,
a
.
l
.
class
);
classMap
.
put
(
AboutCardRow
.
class
,
a
.
l
.
class
);
classMap
.
put
(
SuRequestActivity
.
class
,
a
.
m
.
class
);
classMap
.
put
(
SuRequestActivity
.
class
,
a
.
m
.
class
);
}
}
...
...
app/src/full/java/com/topjohnwu/magisk/receivers/GeneralReceiver.java
View file @
52137fd6
...
@@ -3,16 +3,18 @@ package com.topjohnwu.magisk.receivers;
...
@@ -3,16 +3,18 @@ package com.topjohnwu.magisk.receivers;
import
android.content.BroadcastReceiver
;
import
android.content.BroadcastReceiver
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.os.AsyncTask
;
import
com.topjohnwu.core.App
;
import
com.topjohnwu.core.App
;
import
com.topjohnwu.core.Const
;
import
com.topjohnwu.core.Const
;
import
com.topjohnwu.core.Data
;
import
com.topjohnwu.core.Data
;
import
com.topjohnwu.magisk.ClassMap
;
import
com.topjohnwu.magisk.ClassMap
;
import
com.topjohnwu.magisk.SuRequestActivity
;
import
com.topjohnwu.magisk.SuRequestActivity
;
import
com.topjohnwu.magisk.
services.OnBootService
;
import
com.topjohnwu.magisk.
components.Notifications
;
import
com.topjohnwu.magisk.utils.DownloadApp
;
import
com.topjohnwu.magisk.utils.DownloadApp
;
import
com.topjohnwu.magisk.utils.SuConnector
;
import
com.topjohnwu.magisk.utils.SuConnector
;
import
com.topjohnwu.superuser.Shell
;
import
com.topjohnwu.superuser.Shell
;
import
com.topjohnwu.superuser.ShellUtils
;
public
class
GeneralReceiver
extends
BroadcastReceiver
{
public
class
GeneralReceiver
extends
BroadcastReceiver
{
...
@@ -48,8 +50,17 @@ public class GeneralReceiver extends BroadcastReceiver {
...
@@ -48,8 +50,17 @@ public class GeneralReceiver extends BroadcastReceiver {
break
;
break
;
case
"boot"
:
case
"boot"
:
default
:
default
:
/* The actual on-boot trigger */
AsyncTask
.
THREAD_POOL_EXECUTOR
.
execute
(()
->
{
OnBootService
.
enqueueWork
(
app
);
/* Devices with DTBO might want to patch dtbo.img.
* However, that is not possible if Magisk is installed by
* patching boot image with Magisk Manager and flashed via
* fastboot, since at that time we do not have root.
* Check for dtbo status every boot time, and prompt user
* to reboot if dtbo wasn't patched and patched by Magisk Manager.
* */
if
(
Shell
.
rootAccess
()
&&
ShellUtils
.
fastCmdResult
(
"mm_patch_dtbo"
))
Notifications
.
dtboPatched
();
});
break
;
break
;
}
}
break
;
break
;
...
...
app/src/full/java/com/topjohnwu/magisk/services/OnBootService.java
deleted
100644 → 0
View file @
3ccac8c3
package
com
.
topjohnwu
.
magisk
.
services
;
import
android.content.Context
;
import
android.content.Intent
;
import
com.topjohnwu.core.Const
;
import
com.topjohnwu.magisk.ClassMap
;
import
com.topjohnwu.magisk.components.Notifications
;
import
com.topjohnwu.superuser.Shell
;
import
com.topjohnwu.superuser.ShellUtils
;
import
androidx.annotation.NonNull
;
import
androidx.core.app.JobIntentService
;
public
class
OnBootService
extends
JobIntentService
{
public
static
void
enqueueWork
(
Context
context
)
{
enqueueWork
(
context
,
ClassMap
.
get
(
OnBootService
.
class
),
Const
.
ID
.
ONBOOT_SERVICE_ID
,
new
Intent
());
}
@Override
protected
void
onHandleWork
(
@NonNull
Intent
intent
)
{
/* Devices with DTBO might want to patch dtbo.img.
* However, that is not possible if Magisk is installed by
* patching boot image with Magisk Manager and flashed via
* fastboot, since at that time we do not have root.
* Check for dtbo status every boot time, and prompt user
* to reboot if dtbo wasn't patched and patched by Magisk Manager.
* */
if
(
Shell
.
rootAccess
()
&&
ShellUtils
.
fastCmdResult
(
"mm_patch_dtbo"
))
Notifications
.
dtboPatched
();
}
}
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