Compare commits

...

23 Commits

Author SHA1 Message Date
semantic-release-bot
0545341f9a chore(release): 1.1.5-dev.1 [skip ci]
## [1.1.5-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.4...v1.1.5-dev.1) (2023-10-23)
2023-10-23 00:03:37 +00:00
oSumAtrIX
035870e08d build: Simplify declaration of repositories 2023-10-22 23:37:19 +02:00
oSumAtrIX
b58ea35f6a build(Needs bump): Bump dependencies 2023-10-22 23:36:31 +02:00
oSumAtrIX
3f61394f0a build: Bump Kotlin Gradle plugin version 2023-10-22 16:14:45 +02:00
semantic-release-bot
9536413fa3 chore(release): 1.1.4 [skip ci]
## [1.1.4](https://github.com/ReVanced/revanced-library/compare/v1.1.3...v1.1.4) (2023-10-12)

### Bug Fixes

* Ask for root permissions before trying to use them ([aea1d69](aea1d69157))
* Execute ADB commands sequentially to fix mounting issues ([#12](https://github.com/ReVanced/revanced-library/issues/12)) ([fda3eca](fda3eca74f))
2023-10-12 19:49:25 +00:00
oSumAtrIX
7b1ca25a6c chore: Merge branch dev to main (#13) 2023-10-12 21:47:46 +02:00
semantic-release-bot
79640bcb8c chore(release): 1.1.4-dev.2 [skip ci]
## [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](aea1d69157))
2023-10-10 08:25:22 +00:00
oSumAtrIX
aea1d69157 fix: Ask for root permissions before trying to use them 2023-10-10 10:23:39 +02:00
oSumAtrIX
7a6977aff2 refactor: Remove unnecessary function 2023-10-10 10:23:00 +02:00
semantic-release-bot
c221ab1482 chore(release): 1.1.4-dev.1 [skip ci]
## [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](fda3eca74f))
2023-10-09 23:24:41 +00:00
Riccardo Nava
fda3eca74f fix: Execute ADB commands sequentially to fix mounting issues (#12) 2023-10-10 01:22:45 +02:00
semantic-release-bot
d2e367e901 chore(release): 1.1.3 [skip ci]
## [1.1.3](https://github.com/ReVanced/revanced-library/compare/v1.1.2...v1.1.3) (2023-10-09)
2023-10-09 16:57:58 +00:00
oSumAtrIX
3e460805bc chore: Merge branch dev to main (#11) 2023-10-09 18:56:03 +02:00
semantic-release-bot
6019320d9e chore(release): 1.1.3-dev.2 [skip ci]
## [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)
2023-10-09 16:53:41 +00:00
oSumAtrIX
0dc83c3e0a build(Needs bump): Use correct dependency 2023-10-09 18:51:32 +02:00
semantic-release-bot
dc0c9f6cc9 chore(release): 1.1.3-dev.1 [skip ci]
## [1.1.3-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.2...v1.1.3-dev.1) (2023-10-09)
2023-10-09 16:44:17 +00:00
oSumAtrIX
33f48f1f3f build(Needs bump): Publish artifacts on Jitpack 2023-10-09 18:42:16 +02:00
semantic-release-bot
9de5348351 chore(release): 1.1.2 [skip ci]
## [1.1.2](https://github.com/ReVanced/revanced-library/compare/v1.1.1...v1.1.2) (2023-10-05)
2023-10-05 15:56:13 +00:00
oSumAtrIX
adfb41c737 chore: Merge branch dev to main (#10) 2023-10-05 17:54:11 +02:00
semantic-release-bot
5024ea3313 chore(release): 1.1.2-dev.1 [skip ci]
## [1.1.2-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.1...v1.1.2-dev.1) (2023-10-05)
2023-10-05 15:35:24 +00:00
oSumAtrIX
c61d90462f build(Needs bump): Bump dependencies 2023-10-05 17:29:37 +02:00
semantic-release-bot
8263175a8e chore(release): 1.1.1 [skip ci]
## [1.1.1](https://github.com/ReVanced/revanced-library/compare/v1.1.0...v1.1.1) (2023-10-04)

### Performance Improvements

* Use maps to set options ([13823b7](13823b74db))
2023-10-04 02:24:57 +00:00
oSumAtrIX
17694e2d8a chore: Merge branch dev to main (#9) 2023-10-04 04:23:15 +02:00
7 changed files with 63 additions and 54 deletions

View File

@@ -1,3 +1,44 @@
## [1.1.5-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.4...v1.1.5-dev.1) (2023-10-23)
## [1.1.4](https://github.com/ReVanced/revanced-library/compare/v1.1.3...v1.1.4) (2023-10-12)
### Bug Fixes
* Ask for root permissions before trying to use them ([aea1d69](https://github.com/ReVanced/revanced-library/commit/aea1d6915766d9757075ee459955aa335d906bab))
* 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.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.1](https://github.com/ReVanced/revanced-library/compare/v1.1.0...v1.1.1) (2023-10-04)
### Performance Improvements
* Use maps to set options ([13823b7](https://github.com/ReVanced/revanced-library/commit/13823b74db1de3a104b5022b6bf0db0ef945f47b))
## [1.1.1-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.0...v1.1.1-dev.1) (2023-10-04)

View File

@@ -1,11 +1,18 @@
plugins {
kotlin("jvm") version "1.9.0"
kotlin("jvm") version "1.9.10"
alias(libs.plugins.binary.compatibility.validator)
`maven-publish`
}
group = "app.revanced"
repositories {
mavenCentral()
mavenLocal()
maven { url = uri("https://jitpack.io") }
google()
}
dependencies {
implementation(libs.revanced.patcher)
implementation(libs.kotlin.reflect)
@@ -34,17 +41,6 @@ java {
}
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 {
create<MavenPublication>("gpr") {
from(components["java"])

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 1.1.1-dev.1
version = 1.1.5-dev.1

View File

@@ -1,18 +1,18 @@
[versions]
apksig = "8.1.1"
apksig = "8.1.2"
bcpkix-jdk18on = "1.76"
jackson-module-kotlin = "2.14.3"
jadb = "2531a28109"
jadb = "1.2.1"
kotlin-reflect = "1.9.0"
kotlin-test = "1.8.20-RC"
revanced-patcher = "16.0.0"
revanced-patcher = "18.0.0"
binary-compatibility-validator = "0.13.2"
[libraries]
apksig = { module = "com.android.tools.build:apksig", version.ref = "apksig" }
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" }
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-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin-test" }
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }

View File

@@ -1,23 +1 @@
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 {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
mavenLocal()
google()
maven { url = uri("https://jitpack.io") }
listOf("revanced-patcher", "jadb").forEach { repo ->
maven {
url = uri("https://maven.pkg.github.com/revanced/$repo")
credentials {
username = githubUsername
password = githubPassword
}
}
}
}
}
rootProject.name = "revanced-library"

View File

@@ -84,14 +84,14 @@ sealed class AdbManager private constructor(deviceSerial: String? = null) {
device.push(apk.file, TMP_PATH)
device.run("$CREATE_DIR $INSTALLATION_PATH")
device.run(INSTALL_PATCHED_APK, packageName)
device.run("$CREATE_DIR $INSTALLATION_PATH").waitFor()
device.run(INSTALL_PATCHED_APK, packageName).waitFor()
device.createFile(TMP_PATH, MOUNT_SCRIPT.applyReplacement(packageName))
device.run(INSTALL_MOUNT, packageName)
device.run(UMOUNT, packageName) // Sanity check.
device.run(MOUNT_PATH, packageName)
device.run(INSTALL_MOUNT, packageName).waitFor()
device.run(UMOUNT, packageName).waitFor() // Sanity check.
device.run(MOUNT_PATH, packageName).waitFor()
device.run(RESTART, packageName)
device.run(DELETE, TMP_PATH)

View File

@@ -2,7 +2,6 @@ package app.revanced.library.adb
import se.vidstige.jadb.JadbDevice
import se.vidstige.jadb.RemoteFile
import se.vidstige.jadb.ShellProcess
import se.vidstige.jadb.ShellProcessBuilder
import java.io.File
@@ -16,19 +15,14 @@ internal fun JadbDevice.buildCommand(command: String, su: Boolean = true): Shell
return shellProcessBuilder(cmd, *args.toTypedArray())
}
internal fun JadbDevice.run(command: String, su: Boolean = true): ShellProcess {
return this.buildCommand(command, su).start()!!
}
internal fun JadbDevice.run(command: String, su: Boolean = true) =
this.buildCommand(command, su).start()
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) =
push(file, RemoteFile(targetFilePath))
internal fun JadbDevice.createFile(targetFile: String, content: String) =
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()
push(content.byteInputStream(), System.currentTimeMillis(), 644, RemoteFile(targetFile))