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
81a0cddb
Commit
81a0cddb
authored
Feb 04, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add DirectBoot support to receivers and SuRequestActivity
Close #1032, courtesy of @vvb2060
parent
f620ac76
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
12 deletions
+23
-12
App.java
app-core/src/main/java/com/topjohnwu/magisk/App.java
+7
-2
MagiskInstaller.java
...main/java/com/topjohnwu/magisk/tasks/MagiskInstaller.java
+0
-1
AndroidManifest.xml
app/src/full/AndroidManifest.xml
+8
-5
SplashActivity.java
app/src/full/java/com/topjohnwu/magisk/SplashActivity.java
+4
-0
SuRequestActivity.java
...src/full/java/com/topjohnwu/magisk/SuRequestActivity.java
+2
-1
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+2
-3
No files found.
app-core/src/main/java/com/topjohnwu/magisk/App.java
View file @
81a0cddb
...
...
@@ -5,6 +5,7 @@ import android.content.Context;
import
android.content.SharedPreferences
;
import
android.content.res.Configuration
;
import
android.os.AsyncTask
;
import
android.os.Build
;
import
android.preference.PreferenceManager
;
import
com.topjohnwu.magisk.core.BuildConfig
;
...
...
@@ -40,9 +41,13 @@ public class App extends Application {
super
.
attachBaseContext
(
base
);
self
=
this
;
prefs
=
PreferenceManager
.
getDefaultSharedPreferences
(
this
);
Context
de
=
this
;
if
(
Build
.
VERSION
.
SDK_INT
>=
24
)
{
de
=
createDeviceProtectedStorageContext
();
de
.
moveSharedPreferencesFrom
(
this
,
PreferenceManager
.
getDefaultSharedPreferencesName
(
base
));
}
prefs
=
PreferenceManager
.
getDefaultSharedPreferences
(
de
);
mDB
=
new
MagiskDB
(
this
);
repoDB
=
new
RepoDatabaseHelper
(
this
);
Networking
.
init
(
this
);
LocaleManager
.
setLocale
(
this
);
...
...
app-core/src/main/java/com/topjohnwu/magisk/tasks/MagiskInstaller.java
View file @
81a0cddb
...
...
@@ -8,7 +8,6 @@ import com.topjohnwu.magisk.App;
import
com.topjohnwu.magisk.Config
;
import
com.topjohnwu.magisk.Const
;
import
com.topjohnwu.magisk.container.TarEntry
;
import
com.topjohnwu.magisk.core.R
;
import
com.topjohnwu.magisk.utils.Utils
;
import
com.topjohnwu.net.DownloadProgressListener
;
import
com.topjohnwu.net.Networking
;
...
...
app/src/full/AndroidManifest.xml
View file @
81a0cddb
...
...
@@ -5,13 +5,12 @@
<uses-permission
android:name=
"android.permission.VIBRATE"
/>
<uses-permission
android:name=
"android.permission.FOREGROUND_SERVICE"
/>
<uses-permission
android:name=
"android.permission.FOREGROUND_SERVICE"
/>
<application
android:name=
"a.e"
android:theme=
"@style/AppTheme"
android:usesCleartextTraffic=
"true"
tools:ignore=
"GoogleAppIndexingWarning"
>
tools:ignore=
"
UnusedAttribute,
GoogleAppIndexingWarning"
>
<!-- Activities -->
...
...
@@ -39,14 +38,17 @@
<activity
android:name=
"a.m"
android:directBootAware=
"true"
android:excludeFromRecents=
"true"
android:launchMode=
"singleTask"
android:taskAffinity=
"
internal.superuser
"
android:taskAffinity=
"
a.m
"
android:theme=
"@style/SuRequest"
/>
<!-- Receiver -->
<receiver
android:name=
"a.h"
>
<receiver
android:name=
"a.h"
android:directBootAware=
"true"
>
<intent-filter>
<action
android:name=
"android.intent.action.BOOT_COMPLETED"
/>
<action
android:name=
"android.intent.action.LOCALE_CHANGED"
/>
...
...
@@ -54,13 +56,14 @@
<intent-filter>
<action
android:name=
"android.intent.action.PACKAGE_REPLACED"
/>
<action
android:name=
"android.intent.action.PACKAGE_FULLY_REMOVED"
/>
<data
android:scheme=
"package"
/>
</intent-filter>
</receiver>
<!-- Service -->
<service
android:name=
"a.j"
/>
<service
android:name=
"a.j"
/>
<!-- Hardcode GMS version -->
<meta-data
...
...
app/src/full/java/com/topjohnwu/magisk/SplashActivity.java
View file @
81a0cddb
...
...
@@ -6,6 +6,7 @@ import android.os.Bundle;
import
android.text.TextUtils
;
import
com.topjohnwu.magisk.components.BaseActivity
;
import
com.topjohnwu.magisk.database.RepoDatabaseHelper
;
import
com.topjohnwu.magisk.tasks.UpdateRepos
;
import
com.topjohnwu.magisk.uicomponents.Notifications
;
import
com.topjohnwu.magisk.uicomponents.Shortcuts
;
...
...
@@ -67,6 +68,9 @@ public class SplashActivity extends BaseActivity {
// Setup shortcuts
Shortcuts
.
setup
(
this
);
// Create repo database
app
.
repoDB
=
new
RepoDatabaseHelper
(
this
);
// Magisk working as expected
if
(
Shell
.
rootAccess
()
&&
Config
.
magiskVersionCode
>
0
)
{
// Load modules
...
...
app/src/full/java/com/topjohnwu/magisk/SuRequestActivity.java
View file @
81a0cddb
...
...
@@ -21,6 +21,7 @@ import com.topjohnwu.magisk.components.BaseActivity;
import
com.topjohnwu.magisk.container.Policy
;
import
com.topjohnwu.magisk.utils.FingerprintHelper
;
import
com.topjohnwu.magisk.utils.SuConnector
;
import
com.topjohnwu.magisk.utils.Utils
;
import
java.io.IOException
;
...
...
@@ -75,7 +76,7 @@ public class SuRequestActivity extends BaseActivity {
PackageManager
pm
=
getPackageManager
();
app
.
mDB
.
clearOutdated
();
timeoutPrefs
=
getSharedPreferences
(
"su_timeout"
,
0
);
timeoutPrefs
=
Utils
.
getDEContext
().
getSharedPreferences
(
"su_timeout"
,
0
);
// Get policy
Intent
intent
=
getIntent
();
...
...
app/src/main/AndroidManifest.xml
View file @
81a0cddb
...
...
@@ -8,10 +8,9 @@
<uses-permission
android:name=
"android.permission.REQUEST_INSTALL_PACKAGES"
/>
<application
android:installLocation=
"internalOnly"
android:allowBackup=
"true"
android:directBootAware=
"true"
android:icon=
"@drawable/ic_launcher"
android:installLocation=
"internalOnly"
android:label=
"@string/app_name"
android:supportsRtl=
"true"
tools:ignore=
"GoogleAppIndexingWarning,UnusedAttribute"
>
...
...
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