mirror of
https://github.com/ReVanced/revanced-library.git
synced 2026-01-11 22:06:18 +00:00
Compare commits
13 Commits
v1.5.0-dev
...
v1.5.1-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c664a6eaed | ||
|
|
d18e436de1 | ||
|
|
9ff06a2f1b | ||
|
|
57e36ab5c1 | ||
|
|
8d934bde00 | ||
|
|
d1a7699256 | ||
|
|
e08d0ad8f3 | ||
|
|
4a14c5ccaa | ||
|
|
4bbe2fa150 | ||
|
|
938eac53b1 | ||
|
|
ab004b91f0 | ||
|
|
b637e0d7d7 | ||
|
|
9fda407441 |
22
.github/dependabot.yml
vendored
Normal file
22
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
labels: []
|
||||
directory: /
|
||||
target-branch: dev
|
||||
schedule:
|
||||
interval: monthly
|
||||
|
||||
- package-ecosystem: npm
|
||||
labels: []
|
||||
directory: /
|
||||
target-branch: dev
|
||||
schedule:
|
||||
interval: monthly
|
||||
|
||||
- package-ecosystem: gradle
|
||||
labels: []
|
||||
directory: /
|
||||
target-branch: dev
|
||||
schedule:
|
||||
interval: monthly
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Publish ReVanced Library
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -24,23 +24,21 @@ jobs:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Node modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
key: npm-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- name: Cache Gradle
|
||||
uses: burrunan/gradle-cache-action@v1
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Cleaning is necessary to avoid uploading two identical artifacts with different versions
|
||||
run: ./gradlew clean --no-daemon
|
||||
run: ./gradlew build clean
|
||||
|
||||
- name: Setup semantic-release
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Release
|
||||
29
CHANGELOG.md
29
CHANGELOG.md
@@ -1,3 +1,32 @@
|
||||
## [1.5.1-dev.2](https://github.com/ReVanced/revanced-library/compare/v1.5.1-dev.1...v1.5.1-dev.2) (2024-02-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Use the JVM name instead of the value from `KClass#toString` ([d18e436](https://github.com/ReVanced/revanced-library/commit/d18e436de1df14452ecaa7d827be5e6596ba8a2d))
|
||||
|
||||
## [1.5.1-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.5.0...v1.5.1-dev.1) (2024-02-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Map dependencies from `KClass` into `String` to fix serialization ([57e36ab](https://github.com/ReVanced/revanced-library/commit/57e36ab5c15a5fa7c50fb689ee43ad4eb9a4a515))
|
||||
|
||||
# [1.5.0](https://github.com/ReVanced/revanced-library/compare/v1.4.0...v1.5.0) (2023-12-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add JSON de- and serialization of patches ([ecff6fe](https://github.com/ReVanced/revanced-library/commit/ecff6fe0d3889d729a0badcfa28b89610bd27d48))
|
||||
* Improve mount reliability by unmounting existing mounts and killing running apps ([9fda407](https://github.com/ReVanced/revanced-library/commit/9fda40744173669c84b0c2599ae5ac5d39591798))
|
||||
|
||||
# [1.5.0-dev.2](https://github.com/ReVanced/revanced-library/compare/v1.5.0-dev.1...v1.5.0-dev.2) (2023-12-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Improve mount reliability by unmounting existing mounts and killing running apps ([9fda407](https://github.com/ReVanced/revanced-library/commit/9fda40744173669c84b0c2599ae5ac5d39591798))
|
||||
|
||||
# [1.5.0-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.4.0...v1.5.0-dev.1) (2023-12-07)
|
||||
|
||||
|
||||
|
||||
@@ -6,34 +6,53 @@
|
||||
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
||||
>
|
||||
<img
|
||||
width="256px"
|
||||
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
|
||||
>
|
||||
</picture>
|
||||
<br>
|
||||
<a href="https://revanced.app/">
|
||||
<img height="24px" src="assets/revanced-logo/revanced-logo-round.svg" />
|
||||
<picture>
|
||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="assets/revanced-logo/revanced-logo.svg" />
|
||||
<img height="24px" src="assets/revanced-logo/revanced-logo.svg" />
|
||||
</picture>
|
||||
</a>
|
||||
<a href="https://github.com/revanced">
|
||||
<a href="https://github.com/ReVanced">
|
||||
<picture>
|
||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
||||
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
||||
</picture>
|
||||
</a>
|
||||
<a href="http://revanced.app/discord">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||
<picture>
|
||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||
</picture>
|
||||
</a>
|
||||
<a href="https://reddit.com/r/revancedapp">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||
<picture>
|
||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||
</picture>
|
||||
</a>
|
||||
<a href="https://t.me/app_revanced">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||
<picture>
|
||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||
</picture>
|
||||
</a>
|
||||
<a href="https://twitter.com/revancedapp">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032018-6da37214-7474-4641-a1da-7af7db3a31cd.png" />
|
||||
<a href="https://x.com/revancedapp">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
|
||||
</picture>
|
||||
</a>
|
||||
<a href="https://www.youtube.com/@ReVanced">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||
</a>
|
||||
<picture>
|
||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||
</picture>
|
||||
</a>
|
||||
<br>
|
||||
<br>
|
||||
Continuing the legacy of Vanced
|
||||
@@ -54,7 +73,7 @@ This document describes how to contribute to ReVanced Library.
|
||||
Features can be requested by opening an issue using the
|
||||
[Feature request issue template](https://github.com/ReVanced/revanced-cli/issues/new?assignees=&labels=Feature+request&projects=&template=feature-request.yml&title=feat%3A+).
|
||||
|
||||
> **Note**
|
||||
> [!NOTE]
|
||||
> Requests can be accepted or rejected at the discretion of maintainers of ReVanced Library.
|
||||
> Good motivation has to be provided for a request to be accepted.
|
||||
|
||||
@@ -76,4 +95,4 @@ If you encounter a bug while using ReVanced Library, open an issue using the
|
||||
it will be merged into the `dev` branch and will be included in the next release of ReVanced Library
|
||||
|
||||
❤️ Thank you for considering contributing to ReVanced Library,
|
||||
ReVanced
|
||||
ReVanced
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 1.5.0-dev.1
|
||||
version = 1.5.1-dev.2
|
||||
|
||||
@@ -5,7 +5,7 @@ jackson-module-kotlin = "2.14.3"
|
||||
jadb = "1.2.1"
|
||||
kotlin-reflect = "1.9.20"
|
||||
kotlin-test = "1.9.20"
|
||||
revanced-patcher = "19.1.0"
|
||||
revanced-patcher = "19.2.0"
|
||||
binary-compatibility-validator = "0.13.2"
|
||||
|
||||
[libraries]
|
||||
|
||||
5227
package-lock.json
generated
5227
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@saithodev/semantic-release-backmerge": "^3.2.1",
|
||||
"@saithodev/semantic-release-backmerge": "^4.0.1",
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"gradle-semantic-release-plugin": "^1.8.0",
|
||||
"semantic-release": "^22.0.8"
|
||||
"gradle-semantic-release-plugin": "^1.9.1",
|
||||
"semantic-release": "^23.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package app.revanced.library
|
||||
|
||||
import app.revanced.patcher.PatchClass
|
||||
import app.revanced.patcher.PatchSet
|
||||
import app.revanced.patcher.patch.Patch
|
||||
import app.revanced.patcher.patch.options.PatchOption
|
||||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||
import java.io.InputStream
|
||||
import java.io.OutputStream
|
||||
import kotlin.reflect.jvm.jvmName
|
||||
|
||||
typealias PackageName = String
|
||||
typealias Version = String
|
||||
@@ -31,7 +31,7 @@ object PatchUtils {
|
||||
"Use getMostCommonCompatibleVersions instead.",
|
||||
ReplaceWith(
|
||||
"getMostCommonCompatibleVersions(patches, setOf(packageName))" +
|
||||
".entries.firstOrNull()?.value?.keys?.firstOrNull()",
|
||||
".entries.firstOrNull()?.value?.keys?.firstOrNull()",
|
||||
),
|
||||
)
|
||||
fun getMostCommonCompatibleVersion(
|
||||
@@ -149,7 +149,7 @@ object PatchUtils {
|
||||
val name: String?,
|
||||
val description: String?,
|
||||
val compatiblePackages: Set<Patch.CompatiblePackage>?,
|
||||
val dependencies: Set<PatchClass>?,
|
||||
val dependencies: Set<String>?,
|
||||
val use: Boolean,
|
||||
var requiresIntegrations: Boolean,
|
||||
val options: Map<String, FullJsonPatchOption<*>>,
|
||||
@@ -160,7 +160,7 @@ object PatchUtils {
|
||||
patch.name,
|
||||
patch.description,
|
||||
patch.compatiblePackages,
|
||||
patch.dependencies,
|
||||
buildSet { patch.dependencies?.forEach { add(it.jvmName) } },
|
||||
patch.use,
|
||||
patch.requiresIntegrations,
|
||||
patch.options.mapValues { FullJsonPatchOption.fromPatchOption(it.value) },
|
||||
|
||||
@@ -5,10 +5,11 @@ import app.revanced.library.adb.Constants.CREATE_DIR
|
||||
import app.revanced.library.adb.Constants.DELETE
|
||||
import app.revanced.library.adb.Constants.GET_INSTALLED_PATH
|
||||
import app.revanced.library.adb.Constants.INSTALLATION_PATH
|
||||
import app.revanced.library.adb.Constants.INSTALL_MOUNT
|
||||
import app.revanced.library.adb.Constants.INSTALL_MOUNT_SCRIPT
|
||||
import app.revanced.library.adb.Constants.INSTALL_PATCHED_APK
|
||||
import app.revanced.library.adb.Constants.MOUNT_PATH
|
||||
import app.revanced.library.adb.Constants.KILL
|
||||
import app.revanced.library.adb.Constants.MOUNT_SCRIPT
|
||||
import app.revanced.library.adb.Constants.MOUNT_SCRIPT_PATH
|
||||
import app.revanced.library.adb.Constants.PATCHED_APK_PATH
|
||||
import app.revanced.library.adb.Constants.PLACEHOLDER
|
||||
import app.revanced.library.adb.Constants.RESTART
|
||||
@@ -104,9 +105,8 @@ sealed class AdbManager private constructor(deviceSerial: String?) {
|
||||
|
||||
device.createFile(TMP_PATH, MOUNT_SCRIPT.applyReplacement(packageName))
|
||||
|
||||
device.run(INSTALL_MOUNT, packageName).waitFor()
|
||||
device.run(UMOUNT, packageName).waitFor() // Sanity check.
|
||||
device.run(MOUNT_PATH, packageName).waitFor()
|
||||
device.run(INSTALL_MOUNT_SCRIPT, packageName).waitFor()
|
||||
device.run(MOUNT_SCRIPT_PATH, packageName).waitFor()
|
||||
device.run(RESTART, packageName)
|
||||
device.run(DELETE, TMP_PATH)
|
||||
|
||||
@@ -118,9 +118,9 @@ sealed class AdbManager private constructor(deviceSerial: String?) {
|
||||
|
||||
device.run(UMOUNT, packageName)
|
||||
device.run(DELETE.applyReplacement(PATCHED_APK_PATH), packageName)
|
||||
device.run(DELETE, MOUNT_PATH.applyReplacement(packageName))
|
||||
device.run(DELETE, MOUNT_SCRIPT_PATH.applyReplacement(packageName))
|
||||
device.run(DELETE, TMP_PATH)
|
||||
device.run(RESTART, packageName)
|
||||
device.run(KILL, packageName)
|
||||
|
||||
super.uninstall(packageName)
|
||||
}
|
||||
|
||||
@@ -6,11 +6,12 @@ internal object Constants {
|
||||
internal const val TMP_PATH = "/data/local/tmp/revanced.tmp"
|
||||
internal const val INSTALLATION_PATH = "/data/adb/revanced/"
|
||||
internal const val PATCHED_APK_PATH = "$INSTALLATION_PATH$PLACEHOLDER.apk"
|
||||
internal const val MOUNT_PATH = "/data/adb/service.d/mount_revanced_$PLACEHOLDER.sh"
|
||||
internal const val MOUNT_SCRIPT_PATH = "/data/adb/service.d/mount_revanced_$PLACEHOLDER.sh"
|
||||
|
||||
internal const val DELETE = "rm -rf $PLACEHOLDER"
|
||||
internal const val CREATE_DIR = "mkdir -p"
|
||||
internal const val RESTART = "am start -S $PLACEHOLDER"
|
||||
internal const val KILL = "am force-stop $PLACEHOLDER"
|
||||
internal const val GET_INSTALLED_PATH = "pm path $PLACEHOLDER"
|
||||
|
||||
internal const val INSTALL_PATCHED_APK =
|
||||
@@ -23,7 +24,7 @@ internal object Constants {
|
||||
internal const val UMOUNT =
|
||||
"grep $PLACEHOLDER /proc/mounts | while read -r line; do echo ${'$'}line | cut -d ' ' -f 2 | sed 's/apk.*/apk/' | xargs -r umount -l; done"
|
||||
|
||||
internal const val INSTALL_MOUNT = "mv $TMP_PATH $MOUNT_PATH && chmod +x $MOUNT_PATH"
|
||||
internal const val INSTALL_MOUNT_SCRIPT = "mv $TMP_PATH $MOUNT_SCRIPT_PATH && chmod +x $MOUNT_SCRIPT_PATH"
|
||||
|
||||
internal val MOUNT_SCRIPT =
|
||||
"""
|
||||
@@ -33,11 +34,17 @@ internal object Constants {
|
||||
|
||||
until [ "$( getprop sys.boot_completed )" = 1 ]; do sleep 3; done
|
||||
until [ -d "/sdcard/Android" ]; do sleep 1; done
|
||||
|
||||
|
||||
# Unmount any existing mount as a safety measure
|
||||
$UMOUNT
|
||||
|
||||
base_path="$PATCHED_APK_PATH"
|
||||
stock_path=$( pm path $PLACEHOLDER | grep base | sed 's/package://g' )
|
||||
|
||||
chcon u:object_r:apk_data_file:s0 ${'$'}base_path
|
||||
chcon u:object_r:apk_data_file:s0 ${'$'}base_path
|
||||
mount -o bind ${'$'}MIRROR${'$'}base_path ${'$'}stock_path
|
||||
|
||||
# Kill the app to force it to restart the mounted APK in case it's already running
|
||||
$KILL
|
||||
""".trimIndent()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user