parent
5d927f1dd2
commit
941726d559
|
|
@ -5,7 +5,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
paths:
|
paths:
|
||||||
- manager/src/main/res/values/strings.xml
|
- manager/src/main/res/values/strings.xml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
synchronize-with-crowdin:
|
synchronize-with-crowdin:
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,11 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest ]
|
os: [ ubuntu-latest ]
|
||||||
|
env:
|
||||||
|
CCACHE_COMPILERCHECK: '%compiler% -dumpmachine; %compiler% -dumpversion'
|
||||||
|
CCACHE_NOHASHDIR: 'true'
|
||||||
|
CCACHE_HARDLINK: 'true'
|
||||||
|
CCACHE_BASEDIR: '${{ github.workspace }}'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -34,62 +39,55 @@ jobs:
|
||||||
echo ${{ secrets.KEY_STORE }} | base64 --decode > key.jks
|
echo ${{ secrets.KEY_STORE }} | base64 --decode > key.jks
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Set up JDK 11
|
- name: Checkout libxposed/api
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: libxposed/api
|
||||||
|
path: libxposed/api
|
||||||
|
|
||||||
|
- name: Checkout libxposed/service
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: libxposed/service
|
||||||
|
path: libxposed/service
|
||||||
|
|
||||||
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '17'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
cache: 'gradle'
|
|
||||||
|
|
||||||
- name: Cache gradle dependencies
|
- name: Setup Gradle
|
||||||
uses: actions/cache@v3
|
uses: gradle/gradle-build-action@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
gradle-home-cache-cleanup: true
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
!~/.gradle/caches/build-cache-*
|
|
||||||
key: gradle-deps-core-${{ hashFiles('**/build.gradle.kts') }}
|
|
||||||
restore-keys: |
|
|
||||||
gradle-deps
|
|
||||||
|
|
||||||
- name: Cache gradle build
|
- name: Set up ccache
|
||||||
uses: actions/cache@v3
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
path: |
|
max-size: 2G
|
||||||
~/.gradle/caches/build-cache-*
|
key: ${{ runner.os }}
|
||||||
~/.gradle/buildOutputCleanup/cache.properties
|
restore-keys: ${{ runner.os }}
|
||||||
key: gradle-builds-core-${{ github.sha }}
|
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||||
restore-keys: |
|
|
||||||
gradle-builds
|
|
||||||
|
|
||||||
- name: Cache native build
|
- name: Build dependencies
|
||||||
uses: actions/cache@v3
|
working-directory: libxposed
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.ccache
|
|
||||||
patch-loader/build/.lto-cache
|
|
||||||
key: native-cache-${{ github.sha }}
|
|
||||||
restore-keys: native-cache-
|
|
||||||
|
|
||||||
- name: Install dep
|
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y ccache
|
cd api
|
||||||
ccache -o max_size=1G
|
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
|
||||||
ccache -o hash_dir=false
|
./gradlew :api:publishApiPublicationToMavenLocal
|
||||||
ccache -o compiler_check='%compiler% -dumpmachine; %compiler% -dumpversion'
|
cd ..
|
||||||
ccache -zp
|
cd service
|
||||||
|
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
|
||||||
|
./gradlew :interface:publishInterfacePublicationToMavenLocal
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: |
|
run: |
|
||||||
[ $(du -s ~/.gradle/wrapper | awk '{ print $1 }') -gt 250000 ] && rm -rf ~/.gradle/wrapper/* || true
|
|
||||||
find ~/.gradle/caches -exec touch -d "2 days ago" {} + || true
|
|
||||||
echo 'org.gradle.caching=true' >> gradle.properties
|
echo 'org.gradle.caching=true' >> gradle.properties
|
||||||
echo 'org.gradle.parallel=true' >> gradle.properties
|
echo 'org.gradle.parallel=true' >> gradle.properties
|
||||||
echo 'org.gradle.vfs.watch=true' >> gradle.properties
|
|
||||||
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
|
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
|
||||||
echo 'android.native.buildOutput=verbose' >> gradle.properties
|
echo 'android.native.buildOutput=verbose' >> gradle.properties
|
||||||
./gradlew buildAll
|
./gradlew buildAll
|
||||||
ccache -s
|
|
||||||
|
|
||||||
- name: Upload Debug artifact
|
- name: Upload Debug artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
[submodule "core"]
|
[submodule "core"]
|
||||||
path = core
|
path = core
|
||||||
url = https://github.com/LSPosed/LSPosed.git
|
url = https://github.com/LSPosed/LSPosed.git
|
||||||
branch = lspatch
|
branch = master
|
||||||
[submodule "patch/libs/manifest-editor"]
|
[submodule "patch/libs/manifest-editor"]
|
||||||
path = patch/libs/manifest-editor
|
path = patch/libs/manifest-editor
|
||||||
url = https://github.com/WindySha/ManifestEditor.git
|
url = https://github.com/WindySha/ManifestEditor.git
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ dependencies {
|
||||||
implementation("com.google.code.findbugs:jsr305:3.0.2")
|
implementation("com.google.code.findbugs:jsr305:3.0.2")
|
||||||
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
|
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
|
||||||
implementation("org.bouncycastle:bcprov-jdk15on:1.70")
|
implementation("org.bouncycastle:bcprov-jdk15on:1.70")
|
||||||
api("com.google.guava:guava:31.0.1-jre")
|
api("com.google.guava:guava:32.0.1-jre")
|
||||||
api("com.android.tools.build:apksig:7.1.2")
|
api("com.android.tools.build:apksig:8.0.2")
|
||||||
compileOnlyApi("com.google.auto.value:auto-value-annotations:1.9")
|
compileOnlyApi("com.google.auto.value:auto-value-annotations:1.10.1")
|
||||||
annotationProcessor("com.google.auto.value:auto-value:1.9")
|
annotationProcessor("com.google.auto.value:auto-value:1.10.1")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ import org.eclipse.jgit.internal.storage.file.FileRepository
|
||||||
import org.eclipse.jgit.storage.file.FileRepositoryBuilder
|
import org.eclipse.jgit.storage.file.FileRepositoryBuilder
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") apply false
|
alias(libs.plugins.agp.lib) apply false
|
||||||
id("com.android.library") apply false
|
alias(libs.plugins.agp.app) apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
|
@ -17,7 +17,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("org.eclipse.jgit:org.eclipse.jgit:6.3.0.202209071007-r")
|
classpath("org.eclipse.jgit:org.eclipse.jgit:6.3.0.202209071007-r")
|
||||||
classpath(kotlin("gradle-plugin", version = "1.7.20"))
|
classpath(kotlin("gradle-plugin", version = "1.8.21"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -54,8 +54,8 @@ val androidTargetSdkVersion by extra(33)
|
||||||
val androidCompileSdkVersion by extra(33)
|
val androidCompileSdkVersion by extra(33)
|
||||||
val androidCompileNdkVersion by extra("25.1.8937393")
|
val androidCompileNdkVersion by extra("25.1.8937393")
|
||||||
val androidBuildToolsVersion by extra("33.0.1")
|
val androidBuildToolsVersion by extra("33.0.1")
|
||||||
val androidSourceCompatibility by extra(JavaVersion.VERSION_11)
|
val androidSourceCompatibility by extra(JavaVersion.VERSION_17)
|
||||||
val androidTargetCompatibility by extra(JavaVersion.VERSION_11)
|
val androidTargetCompatibility by extra(JavaVersion.VERSION_17)
|
||||||
|
|
||||||
tasks.register<Delete>("clean") {
|
tasks.register<Delete>("clean") {
|
||||||
delete(rootProject.buildDir)
|
delete(rootProject.buildDir)
|
||||||
|
|
|
||||||
2
core
2
core
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5666dca1e3b83e9b664bfcd096370b1a7da6eff1
|
Subproject commit cb32c70951e959855125a0b60f78b5dacbd3e153
|
||||||
|
|
@ -1,8 +1,3 @@
|
||||||
android.experimental.enableNewResourceShrinker=true
|
|
||||||
android.experimental.enableNewResourceShrinker.preciseShrinking=true
|
android.experimental.enableNewResourceShrinker.preciseShrinking=true
|
||||||
android.enableAppCompileTimeRClass=true
|
android.enableAppCompileTimeRClass=true
|
||||||
android.nonTransitiveRClass=true
|
|
||||||
android.enableR8.fullMode=true
|
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
|
|
||||||
agpVersion=7.4.0
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
|
@ -80,13 +80,10 @@ do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
# This is normally unused
|
||||||
|
# shellcheck disable=SC2034
|
||||||
APP_NAME="Gradle"
|
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
|
@ -143,12 +140,16 @@ fi
|
||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
|
|
@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
# Collect all arguments for the java command;
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ fun Jar.configure(variant: String) {
|
||||||
|
|
||||||
into("assets") {
|
into("assets") {
|
||||||
from("src/main/assets")
|
from("src/main/assets")
|
||||||
from("${rootProject.projectDir}/out/assets")
|
from("${rootProject.projectDir}/out/assets/$variant")
|
||||||
}
|
}
|
||||||
|
|
||||||
exclude("META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA", "META-INF/*.MF", "META-INF/*.txt", "META-INF/versions/**")
|
exclude("META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA", "META-INF/*.MF", "META-INF/*.txt", "META-INF/versions/**")
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
val defaultManagerPackageName: String by rootProject.extra
|
val defaultManagerPackageName: String by rootProject.extra
|
||||||
val apiCode: Int by rootProject.extra
|
val apiCode: Int by rootProject.extra
|
||||||
val verCode: Int by rootProject.extra
|
val verCode: Int by rootProject.extra
|
||||||
|
|
@ -6,7 +8,7 @@ val coreVerCode: Int by rootProject.extra
|
||||||
val coreVerName: String by rootProject.extra
|
val coreVerName: String by rootProject.extra
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
alias(libs.plugins.agp.app)
|
||||||
id("com.google.devtools.ksp")
|
id("com.google.devtools.ksp")
|
||||||
id("dev.rikka.tools.refine")
|
id("dev.rikka.tools.refine")
|
||||||
id("kotlin-parcelize")
|
id("kotlin-parcelize")
|
||||||
|
|
@ -29,23 +31,33 @@ android {
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
isMinifyEnabled = true
|
isMinifyEnabled = true
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
"proguard-rules.pro"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
all {
|
||||||
|
sourceSets[name].assets.srcDirs(rootProject.projectDir.resolve("out/assets/$name"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = "11"
|
jvmTarget = "17"
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain(17)
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
compose = true
|
compose = true
|
||||||
|
buildConfig = true
|
||||||
}
|
}
|
||||||
|
|
||||||
composeOptions {
|
composeOptions {
|
||||||
kotlinCompilerExtensionVersion = "1.3.2"
|
kotlinCompilerExtensionVersion = "1.4.7"
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets["main"].assets.srcDirs(rootProject.projectDir.resolve("out/assets"))
|
|
||||||
namespace = "org.lsposed.lspatch"
|
namespace = "org.lsposed.lspatch"
|
||||||
|
|
||||||
applicationVariants.all {
|
applicationVariants.all {
|
||||||
|
|
@ -59,8 +71,8 @@ android {
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
android.applicationVariants.forEach { variant ->
|
android.applicationVariants.forEach { variant ->
|
||||||
val variantLowered = variant.name.toLowerCase()
|
val variantLowered = variant.name.lowercase()
|
||||||
val variantCapped = variant.name.capitalize()
|
val variantCapped = variant.name.replaceFirstChar { it.uppercase() }
|
||||||
|
|
||||||
task<Copy>("copy${variantCapped}Assets") {
|
task<Copy>("copy${variantCapped}Assets") {
|
||||||
dependsOn(":meta-loader:copy$variantCapped")
|
dependsOn(":meta-loader:copy$variantCapped")
|
||||||
|
|
@ -68,7 +80,7 @@ afterEvaluate {
|
||||||
tasks["merge${variantCapped}Assets"].dependsOn(this)
|
tasks["merge${variantCapped}Assets"].dependsOn(this)
|
||||||
|
|
||||||
into("$buildDir/intermediates/assets/$variantLowered/merge${variantCapped}Assets")
|
into("$buildDir/intermediates/assets/$variantLowered/merge${variantCapped}Assets")
|
||||||
from("${rootProject.projectDir}/out/assets")
|
from("${rootProject.projectDir}/out/assets/${variant.name}")
|
||||||
}
|
}
|
||||||
|
|
||||||
task<Copy>("build$variantCapped") {
|
task<Copy>("build$variantCapped") {
|
||||||
|
|
@ -86,38 +98,38 @@ dependencies {
|
||||||
implementation(projects.share.android)
|
implementation(projects.share.android)
|
||||||
implementation(projects.share.java)
|
implementation(projects.share.java)
|
||||||
|
|
||||||
val roomVersion = "2.4.3"
|
val roomVersion = "2.5.2"
|
||||||
val accompanistVersion = "0.27.0"
|
val accompanistVersion = "0.27.0"
|
||||||
val composeDestinationsVersion = "1.7.25-beta"
|
val composeDestinationsVersion = "1.9.42-beta"
|
||||||
implementation(platform("androidx.compose:compose-bom:2022.10.00"))
|
implementation(platform("androidx.compose:compose-bom:2023.06.01"))
|
||||||
|
|
||||||
annotationProcessor("androidx.room:room-compiler:$roomVersion")
|
annotationProcessor("androidx.room:room-compiler:$roomVersion")
|
||||||
compileOnly("dev.rikka.hidden:stub:3.4.3")
|
compileOnly("dev.rikka.hidden:stub:4.2.0")
|
||||||
debugImplementation("androidx.compose.ui:ui-tooling")
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
||||||
debugImplementation("androidx.customview:customview:1.2.0-alpha02")
|
debugImplementation("androidx.customview:customview:1.2.0-alpha02")
|
||||||
debugImplementation("androidx.customview:customview-poolingcontainer:1.0.0")
|
debugImplementation("androidx.customview:customview-poolingcontainer:1.0.0")
|
||||||
implementation("androidx.activity:activity-compose:1.6.1")
|
implementation("androidx.activity:activity-compose:1.7.2")
|
||||||
implementation("androidx.compose.material:material-icons-extended")
|
implementation("androidx.compose.material:material-icons-extended")
|
||||||
implementation("androidx.compose.material3:material3")
|
implementation("androidx.compose.material3:material3")
|
||||||
implementation("androidx.compose.ui:ui")
|
implementation("androidx.compose.ui:ui")
|
||||||
implementation("androidx.compose.ui:ui-tooling-preview")
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
||||||
implementation("androidx.core:core-ktx:1.9.0")
|
implementation("androidx.core:core-ktx:1.10.1")
|
||||||
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1")
|
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1")
|
||||||
implementation("androidx.navigation:navigation-compose:2.5.3")
|
implementation("androidx.navigation:navigation-compose:2.6.0")
|
||||||
implementation("androidx.preference:preference:1.2.0")
|
implementation(libs.androidx.preference)
|
||||||
implementation("androidx.room:room-ktx:$roomVersion")
|
implementation("androidx.room:room-ktx:$roomVersion")
|
||||||
implementation("androidx.room:room-runtime:$roomVersion")
|
implementation("androidx.room:room-runtime:$roomVersion")
|
||||||
implementation("com.google.accompanist:accompanist-navigation-animation:$accompanistVersion")
|
implementation("com.google.accompanist:accompanist-navigation-animation:$accompanistVersion")
|
||||||
implementation("com.google.accompanist:accompanist-pager:$accompanistVersion")
|
implementation("com.google.accompanist:accompanist-pager:$accompanistVersion")
|
||||||
implementation("com.google.accompanist:accompanist-swiperefresh:$accompanistVersion")
|
implementation("com.google.accompanist:accompanist-swiperefresh:$accompanistVersion")
|
||||||
implementation("com.google.android.material:material:1.7.0")
|
implementation(libs.material)
|
||||||
implementation("com.google.code.gson:gson:2.10")
|
implementation(libs.gson)
|
||||||
implementation("dev.rikka.shizuku:api:12.2.0")
|
implementation("dev.rikka.shizuku:api:13.1.2")
|
||||||
implementation("dev.rikka.shizuku:provider:12.2.0")
|
implementation("dev.rikka.shizuku:provider:13.1.2")
|
||||||
implementation("dev.rikka.tools.refine:runtime:3.1.1")
|
implementation("dev.rikka.tools.refine:runtime:4.3.0")
|
||||||
implementation("io.github.raamcosta.compose-destinations:core:$composeDestinationsVersion")
|
implementation("io.github.raamcosta.compose-destinations:core:$composeDestinationsVersion")
|
||||||
implementation("me.zhanghai.android.appiconloader:appiconloader:1.5.0")
|
implementation(libs.appiconloader)
|
||||||
implementation("org.lsposed.hiddenapibypass:hiddenapibypass:4.3")
|
implementation(libs.hiddenapibypass)
|
||||||
ksp("androidx.room:room-compiler:$roomVersion")
|
ksp("androidx.room:room-compiler:$roomVersion")
|
||||||
ksp("io.github.raamcosta.compose-destinations:ksp:$composeDestinationsVersion")
|
ksp("io.github.raamcosta.compose-destinations:ksp:$composeDestinationsVersion")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,5 @@
|
||||||
-keepclassmembers class org.lsposed.patch.LSPatch {
|
-keepclassmembers class org.lsposed.patch.LSPatch {
|
||||||
private <fields>;
|
private <fields>;
|
||||||
}
|
}
|
||||||
|
-dontwarn com.google.auto.value.AutoValue$Builder
|
||||||
|
-dontwarn com.google.auto.value.AutoValue
|
||||||
|
|
|
||||||
|
|
@ -16,3 +16,5 @@
|
||||||
-keepclassmembers class org.lsposed.patch.LSPatch {
|
-keepclassmembers class org.lsposed.patch.LSPatch {
|
||||||
private <fields>;
|
private <fields>;
|
||||||
}
|
}
|
||||||
|
-dontwarn com.google.auto.value.AutoValue$Builder
|
||||||
|
-dontwarn com.google.auto.value.AutoValue
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ object ManagerService : ILSPApplicationService.Stub() {
|
||||||
|
|
||||||
private const val TAG = "ManagerService"
|
private const val TAG = "ManagerService"
|
||||||
|
|
||||||
override fun requestModuleBinder(name: String): IBinder {
|
override fun getLegacyModulesList(): MutableList<Module> {
|
||||||
TODO("Not yet implemented")
|
TODO("Not yet implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -32,10 +32,6 @@ object ManagerService : ILSPApplicationService.Stub() {
|
||||||
TODO("Not yet implemented")
|
TODO("Not yet implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun requestRemotePreference(packageName: String, userId: Int, callback: IBinder?): Bundle {
|
|
||||||
TODO("Not yet implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun requestInjectedManagerBinder(binder: List<IBinder>?): ParcelFileDescriptor? {
|
override fun requestInjectedManagerBinder(binder: List<IBinder>?): ParcelFileDescriptor? {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ import org.lsposed.lspatch.ui.util.LocalSnackbarHost
|
||||||
|
|
||||||
class MainActivity : ComponentActivity() {
|
class MainActivity : ComponentActivity() {
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class, ExperimentalAnimationApi::class)
|
@OptIn(ExperimentalAnimationApi::class)
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContent {
|
setContent {
|
||||||
|
|
@ -55,7 +55,7 @@ private fun BottomBar(navController: NavHostController) {
|
||||||
?: NavGraphs.root.startAppDestination
|
?: NavGraphs.root.startAppDestination
|
||||||
var topDestination by rememberSaveable { mutableStateOf(currentDestination.route) }
|
var topDestination by rememberSaveable { mutableStateOf(currentDestination.route) }
|
||||||
LaunchedEffect(currentDestination) {
|
LaunchedEffect(currentDestination) {
|
||||||
val queue = navController.backQueue
|
val queue = navController.currentBackStack.value
|
||||||
if (queue.size == 2) topDestination = queue[1].destination.route!!
|
if (queue.size == 2) topDestination = queue[1].destination.route!!
|
||||||
else if (queue.size > 2) topDestination = queue[2].destination.route!!
|
else if (queue.size > 2) topDestination = queue[2].destination.route!!
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
alias(libs.plugins.agp.app)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
multiDexEnabled = false
|
multiDexEnabled = false
|
||||||
}
|
}
|
||||||
|
|
@ -18,8 +19,8 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
androidComponents.onVariants { variant ->
|
androidComponents.onVariants { variant ->
|
||||||
val variantCapped = variant.name.capitalize()
|
val variantCapped = variant.name.replaceFirstChar { it.uppercase() }
|
||||||
val variantLowered = variant.name.toLowerCase()
|
val variantLowered = variant.name.lowercase()
|
||||||
|
|
||||||
task<Copy>("copyDex$variantCapped") {
|
task<Copy>("copyDex$variantCapped") {
|
||||||
dependsOn("assemble$variantCapped")
|
dependsOn("assemble$variantCapped")
|
||||||
|
|
@ -28,7 +29,7 @@ androidComponents.onVariants { variant ->
|
||||||
"$buildDir/intermediates/dex/$variantLowered/mergeDex$variantCapped"
|
"$buildDir/intermediates/dex/$variantLowered/mergeDex$variantCapped"
|
||||||
from(dexOutPath)
|
from(dexOutPath)
|
||||||
rename("classes.dex", "metaloader.dex")
|
rename("classes.dex", "metaloader.dex")
|
||||||
into("${rootProject.projectDir}/out/assets/lspatch")
|
into("${rootProject.projectDir}/out/assets/${variant.name}/lspatch")
|
||||||
}
|
}
|
||||||
|
|
||||||
task("copy$variantCapped") {
|
task("copy$variantCapped") {
|
||||||
|
|
@ -43,5 +44,5 @@ androidComponents.onVariants { variant ->
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(projects.hiddenapi.stubs)
|
compileOnly(projects.hiddenapi.stubs)
|
||||||
implementation(projects.share.java)
|
implementation(projects.share.java)
|
||||||
implementation("org.lsposed.hiddenapibypass:hiddenapibypass:4.3")
|
implementation(libs.hiddenapibypass)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,6 @@
|
||||||
public static byte[] dex;
|
public static byte[] dex;
|
||||||
<init>();
|
<init>();
|
||||||
}
|
}
|
||||||
|
-dontwarn androidx.annotation.NonNull
|
||||||
|
-dontwarn androidx.annotation.Nullable
|
||||||
|
-dontwarn androidx.annotation.VisibleForTesting
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
alias(libs.plugins.agp.app)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
@ -7,6 +9,10 @@ android {
|
||||||
multiDexEnabled = false
|
multiDexEnabled = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig = true
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
isMinifyEnabled = false
|
isMinifyEnabled = false
|
||||||
|
|
@ -23,13 +29,13 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
androidComponents.onVariants { variant ->
|
androidComponents.onVariants { variant ->
|
||||||
val variantCapped = variant.name.capitalize()
|
val variantCapped = variant.name.replaceFirstChar { it.uppercase() }
|
||||||
|
|
||||||
task<Copy>("copyDex$variantCapped") {
|
task<Copy>("copyDex$variantCapped") {
|
||||||
dependsOn("assemble$variantCapped")
|
dependsOn("assemble$variantCapped")
|
||||||
from("$buildDir/intermediates/dex/${variant.name}/mergeDex$variantCapped/classes.dex")
|
from("$buildDir/intermediates/dex/${variant.name}/mergeDex$variantCapped/classes.dex")
|
||||||
rename("classes.dex", "loader.dex")
|
rename("classes.dex", "loader.dex")
|
||||||
into("${rootProject.projectDir}/out/assets/lspatch")
|
into("${rootProject.projectDir}/out/assets/${variant.name}/lspatch")
|
||||||
}
|
}
|
||||||
|
|
||||||
task<Copy>("copySo$variantCapped") {
|
task<Copy>("copySo$variantCapped") {
|
||||||
|
|
@ -40,7 +46,7 @@ androidComponents.onVariants { variant ->
|
||||||
"include" to listOf("**/liblspatch.so")
|
"include" to listOf("**/liblspatch.so")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
into("${rootProject.projectDir}/out/assets/lspatch/so")
|
into("${rootProject.projectDir}/out/assets/${variant.name}/lspatch/so")
|
||||||
}
|
}
|
||||||
|
|
||||||
task("copy$variantCapped") {
|
task("copy$variantCapped") {
|
||||||
|
|
@ -61,5 +67,5 @@ dependencies {
|
||||||
implementation(projects.share.android)
|
implementation(projects.share.android)
|
||||||
implementation(projects.share.java)
|
implementation(projects.share.java)
|
||||||
|
|
||||||
implementation("com.google.code.gson:gson:2.10")
|
implementation(libs.gson)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ public class LSPApplication {
|
||||||
}
|
}
|
||||||
|
|
||||||
disableProfile(context);
|
disableProfile(context);
|
||||||
Startup.initXposed(false, ActivityThread.currentProcessName(), service);
|
Startup.initXposed(false, ActivityThread.currentProcessName(), ActivityThread.currentApplication().getPackageCodePath(), service);
|
||||||
Log.i(TAG, "Bootstrap Xposed");
|
Log.i(TAG, "Bootstrap Xposed");
|
||||||
Startup.bootstrapXposed();
|
Startup.bootstrapXposed();
|
||||||
// WARN: Since it uses `XResource`, the following class should not be initialized
|
// WARN: Since it uses `XResource`, the following class should not be initialized
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
package org.lsposed.lspatch.service;
|
package org.lsposed.lspatch.service;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.ParcelFileDescriptor;
|
import android.os.ParcelFileDescriptor;
|
||||||
|
import android.os.RemoteException;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import org.lsposed.lspatch.loader.util.FileUtils;
|
import org.lsposed.lspatch.loader.util.FileUtils;
|
||||||
|
|
@ -58,7 +58,7 @@ public class LocalApplicationService extends ILSPApplicationService.Stub {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBinder requestModuleBinder(String name) {
|
public List<Module> getLegacyModulesList() throws RemoteException {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,11 +72,6 @@ public class LocalApplicationService extends ILSPApplicationService.Stub {
|
||||||
return new File(Environment.getDataDirectory(), "data/" + packageName + "/shared_prefs/").getAbsolutePath();
|
return new File(Environment.getDataDirectory(), "data/" + packageName + "/shared_prefs/").getAbsolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Bundle requestRemotePreference(String packageName, int userId, IBinder callback) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ParcelFileDescriptor requestInjectedManagerBinder(List<IBinder> binder) {
|
public ParcelFileDescriptor requestInjectedManagerBinder(List<IBinder> binder) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.ServiceConnection;
|
import android.content.ServiceConnection;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.HandlerThread;
|
import android.os.HandlerThread;
|
||||||
|
|
@ -75,7 +74,8 @@ public class RemoteApplicationService implements ILSPApplicationService {
|
||||||
}
|
}
|
||||||
boolean success = latch.await(1, TimeUnit.SECONDS);
|
boolean success = latch.await(1, TimeUnit.SECONDS);
|
||||||
if (!success) throw new TimeoutException("Bind service timeout");
|
if (!success) throw new TimeoutException("Bind service timeout");
|
||||||
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InterruptedException | TimeoutException e) {
|
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException |
|
||||||
|
InterruptedException | TimeoutException e) {
|
||||||
Toast.makeText(context, "Manager died", Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, "Manager died", Toast.LENGTH_SHORT).show();
|
||||||
var r = new RemoteException("Failed to get manager binder");
|
var r = new RemoteException("Failed to get manager binder");
|
||||||
r.initCause(e);
|
r.initCause(e);
|
||||||
|
|
@ -84,8 +84,8 @@ public class RemoteApplicationService implements ILSPApplicationService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBinder requestModuleBinder(String name) {
|
public List<Module> getLegacyModulesList() throws RemoteException {
|
||||||
return service == null ? null : service.asBinder();
|
return service == null ? new ArrayList<>() : service.getLegacyModulesList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -98,11 +98,6 @@ public class RemoteApplicationService implements ILSPApplicationService {
|
||||||
return new File(Environment.getDataDirectory(), "data/" + packageName + "/shared_prefs/").getAbsolutePath();
|
return new File(Environment.getDataDirectory(), "data/" + packageName + "/shared_prefs/").getAbsolutePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Bundle requestRemotePreference(String packageName, int userId, IBinder callback) throws RemoteException {
|
|
||||||
return service == null ? null : service.requestRemotePreference(packageName, userId, callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBinder asBinder() {
|
public IBinder asBinder() {
|
||||||
return service == null ? null : service.asBinder();
|
return service == null ? null : service.asBinder();
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ dependencies {
|
||||||
implementation(projects.apkzlib)
|
implementation(projects.apkzlib)
|
||||||
implementation(projects.share.java)
|
implementation(projects.share.java)
|
||||||
|
|
||||||
implementation("commons-io:commons-io:2.11.0")
|
implementation("commons-io:commons-io:2.13.0")
|
||||||
implementation("com.beust:jcommander:1.82")
|
implementation("com.beust:jcommander:1.82")
|
||||||
implementation("com.google.code.gson:gson:2.10")
|
implementation("com.google.code.gson:gson:2.10.1")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,14 @@
|
||||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
val agpVersion: String by settings
|
|
||||||
repositories {
|
repositories {
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.library") version agpVersion
|
id("com.google.devtools.ksp") version "1.8.21-1.0.11"
|
||||||
id("com.android.application") version agpVersion
|
id("dev.rikka.tools.refine") version "4.3.0"
|
||||||
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
|
|
||||||
id("dev.rikka.tools.refine") version "3.1.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -20,6 +17,16 @@ dependencyResolutionManagement {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
mavenLocal {
|
||||||
|
content {
|
||||||
|
includeGroup("io.github.libxposed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
versionCatalogs {
|
||||||
|
create("libs") {
|
||||||
|
from(files("core/gradle/libs.versions.toml"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.library")
|
alias(libs.plugins.agp.lib)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue