-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add EdXposed Service to update module path
- Loading branch information
LoveSy
committed
Dec 5, 2020
1 parent
aaf1239
commit 5bc3f40
Showing
16 changed files
with
502 additions
and
23 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build | ||
/template_override/system/framework |
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,73 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
sourceCompatibility = "7" | ||
targetCompatibility = "7" | ||
|
||
android { | ||
compileSdkVersion androidCompileSdkVersion.toInteger() | ||
|
||
defaultConfig { | ||
applicationId "com.elderdrivers.riru.edxp.yahfa" | ||
minSdkVersion 26 | ||
targetSdkVersion 28 | ||
versionCode 1 | ||
versionName "1.0" | ||
multiDexEnabled false | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
ndkVersion androidCompileNdkVersion | ||
} | ||
|
||
dependencies { | ||
compileOnly project(':hiddenapi-stubs') | ||
implementation project(':edxp-common') | ||
} | ||
|
||
|
||
preBuild.doLast { | ||
def imlFile = file(project.name + ".iml") | ||
try { | ||
def parsedXml = (new groovy.util.XmlParser()).parse(imlFile) | ||
def jdkNode = parsedXml.component[1].orderEntry.find { it.'@type' == 'jdk' } | ||
parsedXml.component[1].remove(jdkNode) | ||
def sdkString = "Android API " + android.compileSdkVersion.substring("android-".length()) + " Platform" | ||
new groovy.util.Node(parsedXml.component[1], 'orderEntry', ['type': 'jdk', 'jdkName': sdkString, 'jdkType': 'Android SDK']) | ||
groovy.xml.XmlUtil.serialize(parsedXml, new FileOutputStream(imlFile)) | ||
} catch (FileNotFoundException e) { | ||
// nop, iml not found | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
|
||
tasks.withType(JavaCompile) { | ||
options.compilerArgs << "-Xbootclasspath/p:${hiddenApiStubJarFilePath}" | ||
} | ||
|
||
android.applicationVariants.all { variant -> | ||
|
||
def variantNameCapped = variant.name.capitalize() | ||
def variantNameLowered = variant.name.toLowerCase() | ||
|
||
task("copyDex${variantNameCapped}", type: Copy) { | ||
dependsOn "assemble${variantNameCapped}" | ||
dependsOn tasks.getByPath(":edxp-common:copyCommonProperties") | ||
def dexOutPath = variant.name.contains("release") ? | ||
"${buildDir}/intermediates/dex/${variantNameLowered}/minify${variantNameCapped}WithR8" : | ||
"${buildDir}/intermediates/dex/${variantNameLowered}/mergeDex${variantNameCapped}" | ||
from (dexOutPath){ | ||
rename("classes.dex", "edservice.dex") | ||
} | ||
destinationDir file(templateRootPath + "system/framework/") | ||
outputs.upToDateWhen { false } | ||
} | ||
|
||
} | ||
} |
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,34 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile | ||
|
||
-dontoptimize | ||
-dontobfuscate | ||
|
||
-keep interface com.elderdrivers.riru.common.KeepAll | ||
-keep interface com.elderdrivers.riru.common.KeepMembers | ||
|
||
-keep class * implements com.elderdrivers.riru.common.KeepAll { *; } | ||
-keepclassmembers class * implements com.elderdrivers.riru.common.KeepMembers { *; } | ||
|
||
-keepclasseswithmembers class * { | ||
native <methods>; | ||
} |
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 @@ | ||
<manifest package="com.elderdrivers.riru.edxp.service" /> |
Oops, something went wrong.