mirror of
https://github.com/ReVanced/revanced-library.git
synced 2026-01-18 08:53:57 +00:00
Compare commits
13 Commits
v1.1.2-dev
...
v1.1.4-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79640bcb8c | ||
|
|
aea1d69157 | ||
|
|
7a6977aff2 | ||
|
|
c221ab1482 | ||
|
|
fda3eca74f | ||
|
|
d2e367e901 | ||
|
|
3e460805bc | ||
|
|
6019320d9e | ||
|
|
0dc83c3e0a | ||
|
|
dc0c9f6cc9 | ||
|
|
33f48f1f3f | ||
|
|
9de5348351 | ||
|
|
adfb41c737 |
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,3 +1,25 @@
|
|||||||
|
## [1.1.4-dev.2](https://github.com/ReVanced/revanced-library/compare/v1.1.4-dev.1...v1.1.4-dev.2) (2023-10-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Ask for root permissions before trying to use them ([aea1d69](https://github.com/ReVanced/revanced-library/commit/aea1d6915766d9757075ee459955aa335d906bab))
|
||||||
|
|
||||||
|
## [1.1.4-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.3...v1.1.4-dev.1) (2023-10-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Execute ADB commands sequentially to fix mounting issues ([#12](https://github.com/ReVanced/revanced-library/issues/12)) ([fda3eca](https://github.com/ReVanced/revanced-library/commit/fda3eca74f30b968d8ee816d63a3dcf493e026de))
|
||||||
|
|
||||||
|
## [1.1.3](https://github.com/ReVanced/revanced-library/compare/v1.1.2...v1.1.3) (2023-10-09)
|
||||||
|
|
||||||
|
## [1.1.3-dev.2](https://github.com/ReVanced/revanced-library/compare/v1.1.3-dev.1...v1.1.3-dev.2) (2023-10-09)
|
||||||
|
|
||||||
|
## [1.1.3-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.2...v1.1.3-dev.1) (2023-10-09)
|
||||||
|
|
||||||
|
## [1.1.2](https://github.com/ReVanced/revanced-library/compare/v1.1.1...v1.1.2) (2023-10-05)
|
||||||
|
|
||||||
## [1.1.2-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.1...v1.1.2-dev.1) (2023-10-05)
|
## [1.1.2-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.1...v1.1.2-dev.1) (2023-10-05)
|
||||||
|
|
||||||
## [1.1.1](https://github.com/ReVanced/revanced-library/compare/v1.1.0...v1.1.1) (2023-10-04)
|
## [1.1.1](https://github.com/ReVanced/revanced-library/compare/v1.1.0...v1.1.1) (2023-10-04)
|
||||||
|
|||||||
@@ -34,17 +34,6 @@ java {
|
|||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
maven {
|
|
||||||
name = "GitHubPackages"
|
|
||||||
url = uri("https://maven.pkg.github.com/revanced/revanced-library")
|
|
||||||
credentials {
|
|
||||||
username = System.getenv("GITHUB_ACTOR")
|
|
||||||
password = System.getenv("GITHUB_TOKEN")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
publications {
|
publications {
|
||||||
create<MavenPublication>("gpr") {
|
create<MavenPublication>("gpr") {
|
||||||
from(components["java"])
|
from(components["java"])
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 1.1.2-dev.1
|
version = 1.1.4-dev.2
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
[versions]
|
[versions]
|
||||||
apksig = "8.1.1"
|
apksig = "8.1.2"
|
||||||
bcpkix-jdk18on = "1.76"
|
bcpkix-jdk18on = "1.76"
|
||||||
jackson-module-kotlin = "2.14.3"
|
jackson-module-kotlin = "2.14.3"
|
||||||
jadb = "2531a28109"
|
jadb = "1.2.1"
|
||||||
kotlin-reflect = "1.9.0"
|
kotlin-reflect = "1.9.0"
|
||||||
kotlin-test = "1.8.20-RC"
|
kotlin-test = "1.8.20-RC"
|
||||||
revanced-patcher = "16.0.1"
|
revanced-patcher = "17.0.0"
|
||||||
binary-compatibility-validator = "0.13.2"
|
binary-compatibility-validator = "0.13.2"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
apksig = { module = "com.android.tools.build:apksig", version.ref = "apksig" }
|
apksig = { module = "com.android.tools.build:apksig", version.ref = "apksig" }
|
||||||
bcpkix-jdk18on = { module = "org.bouncycastle:bcpkix-jdk18on", version.ref = "bcpkix-jdk18on" }
|
bcpkix-jdk18on = { module = "org.bouncycastle:bcpkix-jdk18on", version.ref = "bcpkix-jdk18on" }
|
||||||
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson-module-kotlin" }
|
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson-module-kotlin" }
|
||||||
jadb = { module = "com.github.revanced:jadb", version.ref = "jadb" }
|
jadb = { module = "app.revanced:jadb", version.ref = "jadb" }
|
||||||
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin-reflect" }
|
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin-reflect" }
|
||||||
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin-test" }
|
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin-test" }
|
||||||
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
|
revanced-patcher = { module = "app.revanced.revanced-patcher:revanced-patcher", version.ref = "revanced-patcher" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" }
|
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" }
|
||||||
|
|||||||
@@ -1,22 +1,9 @@
|
|||||||
val githubUsername: String = providers.gradleProperty("gpr.user").orNull ?: System.getenv("GITHUB_ACTOR")
|
|
||||||
val githubPassword: String = providers.gradleProperty("gpr.key").orNull ?: System.getenv("GITHUB_TOKEN")
|
|
||||||
|
|
||||||
dependencyResolutionManagement {
|
dependencyResolutionManagement {
|
||||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
google()
|
|
||||||
maven { url = uri("https://jitpack.io") }
|
maven { url = uri("https://jitpack.io") }
|
||||||
listOf("revanced-patcher", "jadb").forEach { repo ->
|
google()
|
||||||
maven {
|
|
||||||
url = uri("https://maven.pkg.github.com/revanced/$repo")
|
|
||||||
credentials {
|
|
||||||
username = githubUsername
|
|
||||||
password = githubPassword
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,14 +84,14 @@ sealed class AdbManager private constructor(deviceSerial: String? = null) {
|
|||||||
|
|
||||||
device.push(apk.file, TMP_PATH)
|
device.push(apk.file, TMP_PATH)
|
||||||
|
|
||||||
device.run("$CREATE_DIR $INSTALLATION_PATH")
|
device.run("$CREATE_DIR $INSTALLATION_PATH").waitFor()
|
||||||
device.run(INSTALL_PATCHED_APK, packageName)
|
device.run(INSTALL_PATCHED_APK, packageName).waitFor()
|
||||||
|
|
||||||
device.createFile(TMP_PATH, MOUNT_SCRIPT.applyReplacement(packageName))
|
device.createFile(TMP_PATH, MOUNT_SCRIPT.applyReplacement(packageName))
|
||||||
|
|
||||||
device.run(INSTALL_MOUNT, packageName)
|
device.run(INSTALL_MOUNT, packageName).waitFor()
|
||||||
device.run(UMOUNT, packageName) // Sanity check.
|
device.run(UMOUNT, packageName).waitFor() // Sanity check.
|
||||||
device.run(MOUNT_PATH, packageName)
|
device.run(MOUNT_PATH, packageName).waitFor()
|
||||||
device.run(RESTART, packageName)
|
device.run(RESTART, packageName)
|
||||||
device.run(DELETE, TMP_PATH)
|
device.run(DELETE, TMP_PATH)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package app.revanced.library.adb
|
|||||||
|
|
||||||
import se.vidstige.jadb.JadbDevice
|
import se.vidstige.jadb.JadbDevice
|
||||||
import se.vidstige.jadb.RemoteFile
|
import se.vidstige.jadb.RemoteFile
|
||||||
import se.vidstige.jadb.ShellProcess
|
|
||||||
import se.vidstige.jadb.ShellProcessBuilder
|
import se.vidstige.jadb.ShellProcessBuilder
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
@@ -16,19 +15,14 @@ internal fun JadbDevice.buildCommand(command: String, su: Boolean = true): Shell
|
|||||||
return shellProcessBuilder(cmd, *args.toTypedArray())
|
return shellProcessBuilder(cmd, *args.toTypedArray())
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun JadbDevice.run(command: String, su: Boolean = true): ShellProcess {
|
internal fun JadbDevice.run(command: String, su: Boolean = true) =
|
||||||
return this.buildCommand(command, su).start()!!
|
this.buildCommand(command, su).start()
|
||||||
}
|
|
||||||
|
|
||||||
internal fun JadbDevice.hasSu() =
|
internal fun JadbDevice.hasSu() =
|
||||||
this.startCommand("su -h", false).waitFor() == 0
|
this.run("whoami", true).waitFor() == 0
|
||||||
|
|
||||||
internal fun JadbDevice.push(file: File, targetFilePath: String) =
|
internal fun JadbDevice.push(file: File, targetFilePath: String) =
|
||||||
push(file, RemoteFile(targetFilePath))
|
push(file, RemoteFile(targetFilePath))
|
||||||
|
|
||||||
internal fun JadbDevice.createFile(targetFile: String, content: String) =
|
internal fun JadbDevice.createFile(targetFile: String, content: String) =
|
||||||
push(content.byteInputStream(), System.currentTimeMillis(), 644, RemoteFile(targetFile))
|
push(content.byteInputStream(), System.currentTimeMillis(), 644, RemoteFile(targetFile))
|
||||||
|
|
||||||
|
|
||||||
private fun JadbDevice.startCommand(command: String, su: Boolean) =
|
|
||||||
shellProcessBuilder(if (su) "su -c '$command'" else command).start()
|
|
||||||
Reference in New Issue
Block a user