forked from ianmacd/Magisk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
21 changed files
with
253 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
app/src/full/java/com/topjohnwu/magisk/services/OnBootIntentService.java
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
app/src/full/java/com/topjohnwu/magisk/services/OnBootService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.topjohnwu.magisk.services; | ||
|
||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.support.annotation.NonNull; | ||
import android.support.v4.app.JobIntentService; | ||
|
||
import com.topjohnwu.magisk.utils.Const; | ||
import com.topjohnwu.magisk.utils.ShowUI; | ||
import com.topjohnwu.superuser.Shell; | ||
import com.topjohnwu.superuser.ShellUtils; | ||
|
||
public class OnBootService extends JobIntentService { | ||
|
||
public static void enqueueWork(Context context) { | ||
enqueueWork(context, 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. | ||
* */ | ||
Shell shell = Shell.newInstance(); | ||
if (shell.getStatus() >= Shell.ROOT_SHELL && | ||
Boolean.parseBoolean(ShellUtils.fastCmd(shell, "mm_patch_dtbo"))) | ||
ShowUI.dtboPatchedNotification(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.