You've already forked revanced-patcher
mirror of
https://github.com/revanced/revanced-patcher
synced 2025-09-10 05:30:49 +02:00
Compare commits
25 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e698b02bf6 | ||
![]() |
ab866bb8ef | ||
![]() |
714a98422d | ||
![]() |
051afd98d0 | ||
![]() |
d38cf6a229 | ||
![]() |
03f5ee088b | ||
![]() |
5d0fd48b15 | ||
![]() |
56f6ca3891 | ||
![]() |
9e0a74fcfb | ||
![]() |
8f3ac7702a | ||
![]() |
7b65f2d02c | ||
![]() |
2a1b2df56b | ||
![]() |
dfd8a24512 | ||
![]() |
a3efd212fc | ||
![]() |
3e610f7ba9 | ||
![]() |
cff87ff077 | ||
![]() |
54aa04ca34 | ||
![]() |
0eda84eaef | ||
![]() |
b68b0bf3d7 | ||
![]() |
c692202f67 | ||
![]() |
8ce3535427 | ||
![]() |
6a5c8735fb | ||
![]() |
8f32bc9c08 | ||
![]() |
d3a580ea19 | ||
![]() |
4c8eb0e5c7 |
70
CHANGELOG.md
70
CHANGELOG.md
@@ -1,3 +1,73 @@
|
|||||||
|
## [1.2.9](https://github.com/revanced/revanced-patcher/compare/v1.2.8...v1.2.9) (2022-06-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* update apktool ([ab866bb](https://github.com/revanced/revanced-patcher/commit/ab866bb8ef4792d8f2a51edc79e687b5b636c621))
|
||||||
|
|
||||||
|
## [1.2.8](https://github.com/revanced/revanced-patcher/compare/v1.2.7...v1.2.8) (2022-06-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* update apktool ([051afd9](https://github.com/revanced/revanced-patcher/commit/051afd98d065f71556392139d77c20b4c2dc7dd1))
|
||||||
|
|
||||||
|
## [1.2.7](https://github.com/revanced/revanced-patcher/compare/v1.2.6...v1.2.7) (2022-06-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* version not working with apktool due to cache ([03f5ee0](https://github.com/revanced/revanced-patcher/commit/03f5ee088b1b96b88cb7aeb323443b6209a13950))
|
||||||
|
|
||||||
|
## [1.2.6](https://github.com/revanced/revanced-patcher/compare/v1.2.5...v1.2.6) (2022-06-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove javadoc jar (also trigger release) ([56f6ca3](https://github.com/revanced/revanced-patcher/commit/56f6ca38919b522c0d5558eabffa4aee41cc0b0b))
|
||||||
|
|
||||||
|
## [1.2.5](https://github.com/revanced/revanced-patcher/compare/v1.2.4...v1.2.5) (2022-06-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* goodbye security ([8f3ac77](https://github.com/revanced/revanced-patcher/commit/8f3ac7702a2b3ee98c55aeac6a1b9972f99664cc))
|
||||||
|
|
||||||
|
## [1.2.4](https://github.com/revanced/revanced-patcher/compare/v1.2.3...v1.2.4) (2022-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Reverts
|
||||||
|
|
||||||
|
* "fix: enforce aapt v1" ([dfd8a24](https://github.com/revanced/revanced-patcher/commit/dfd8a245124f85b1b028bbba197c70c8dca689b6))
|
||||||
|
|
||||||
|
## [1.2.3](https://github.com/revanced/revanced-patcher/compare/v1.2.2...v1.2.3) (2022-06-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* enforce aapt v1 ([cff87ff](https://github.com/revanced/revanced-patcher/commit/cff87ff0770d774d7ef79eec5a22462eadbcb9c5))
|
||||||
|
|
||||||
|
## [1.2.2](https://github.com/revanced/revanced-patcher/compare/v1.2.1...v1.2.2) (2022-06-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* enforce aapt v2 ([b68b0bf](https://github.com/revanced/revanced-patcher/commit/b68b0bf3d735f54b92ad7dad8132f77e9007063f))
|
||||||
|
|
||||||
|
## [1.2.1](https://github.com/revanced/revanced-patcher/compare/v1.2.0...v1.2.1) (2022-06-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Patcher setting BuildOptions too late ([6a5c873](https://github.com/revanced/revanced-patcher/commit/6a5c8735fb8a5d6f7e9c606734b6684c7fa99e7f))
|
||||||
|
|
||||||
|
# [1.2.0](https://github.com/revanced/revanced-patcher/compare/v1.1.0...v1.2.0) (2022-06-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* allow custom framework path to be specified ([d3a580e](https://github.com/revanced/revanced-patcher/commit/d3a580ea19d7c2d5d8c97650b1e6396ea0a7fc25))
|
||||||
|
|
||||||
# [1.1.0](https://github.com/revanced/revanced-patcher/compare/v1.0.0...v1.1.0) (2022-06-11)
|
# [1.1.0](https://github.com/revanced/revanced-patcher/compare/v1.0.0...v1.1.0) (2022-06-11)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,38 +1,35 @@
|
|||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.6.21"
|
kotlin("jvm") version "1.7.0"
|
||||||
java
|
java
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "app.revanced"
|
group = "app.revanced"
|
||||||
|
|
||||||
|
val githubUsername: String = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
|
||||||
|
val githubPassword: String = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven {
|
maven {
|
||||||
url = uri("https://maven.pkg.github.com/revanced/multidexlib2")
|
url = uri("https://maven.pkg.github.com/revanced/multidexlib2")
|
||||||
credentials {
|
credentials {
|
||||||
// DO NOT set these variables in the project's gradle.properties.
|
username = githubUsername
|
||||||
// Instead, you should set them in:
|
password = githubPassword
|
||||||
// Windows: %homepath%\.gradle\gradle.properties
|
|
||||||
// Linux: ~/.gradle/gradle.properties
|
|
||||||
username =
|
|
||||||
project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR") // DO NOT CHANGE!
|
|
||||||
password =
|
|
||||||
project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN") // DO NOT CHANGE!
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(kotlin("stdlib"))
|
implementation(kotlin("stdlib"))
|
||||||
|
implementation(kotlin("reflect"))
|
||||||
|
|
||||||
api("xpp3:xpp3:1.1.4c")
|
api("xpp3:xpp3:1.1.4c")
|
||||||
api("org.apktool:apktool-lib:2.6.2-SNAPSHOT")
|
api("org.apktool:apktool-lib:2.6.5-SNAPSHOT")
|
||||||
api("app.revanced:multidexlib2:2.5.2.r2")
|
api("app.revanced:multidexlib2:2.5.2.r2")
|
||||||
api("org.smali:smali:2.5.2")
|
api("org.smali:smali:2.5.2")
|
||||||
|
|
||||||
testImplementation(kotlin("test"))
|
testImplementation(kotlin("test"))
|
||||||
implementation(kotlin("reflect"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
@@ -46,14 +43,10 @@ tasks {
|
|||||||
|
|
||||||
java {
|
java {
|
||||||
withSourcesJar()
|
withSourcesJar()
|
||||||
withJavadocJar()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val isGitHubCI = System.getenv("GITHUB_ACTOR") != null
|
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
if (isGitHubCI) {
|
|
||||||
maven {
|
maven {
|
||||||
name = "GitHubPackages"
|
name = "GitHubPackages"
|
||||||
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
||||||
@@ -62,9 +55,6 @@ publishing {
|
|||||||
password = System.getenv("GITHUB_TOKEN")
|
password = System.getenv("GITHUB_TOKEN")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
mavenLocal()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
publications {
|
publications {
|
||||||
register<MavenPublication>("gpr") {
|
register<MavenPublication>("gpr") {
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 1.1.0
|
version = 1.2.9
|
||||||
|
@@ -51,7 +51,7 @@ class Patcher(private val options: PatcherOptions) {
|
|||||||
if (outDir.exists()) outDir.deleteRecursively()
|
if (outDir.exists()) outDir.deleteRecursively()
|
||||||
outDir.mkdirs()
|
outDir.mkdirs()
|
||||||
|
|
||||||
val androlib = Androlib()
|
val androlib = Androlib(BuildOptions().also { it.setBuildOptions(options) })
|
||||||
val resourceTable = androlib.getResTable(extInputFile, true)
|
val resourceTable = androlib.getResTable(extInputFile, true)
|
||||||
|
|
||||||
val packageMetadata = PackageMetadata()
|
val packageMetadata = PackageMetadata()
|
||||||
@@ -143,7 +143,7 @@ class Patcher(private val options: PatcherOptions) {
|
|||||||
|
|
||||||
val androlibResources = AndrolibResources().also { resources ->
|
val androlibResources = AndrolibResources().also { resources ->
|
||||||
resources.buildOptions = BuildOptions().also { buildOptions ->
|
resources.buildOptions = BuildOptions().also { buildOptions ->
|
||||||
buildOptions.aaptPath = options.aaptPath
|
buildOptions.setBuildOptions(options)
|
||||||
buildOptions.isFramework = metaInfo.isFrameworkApk
|
buildOptions.isFramework = metaInfo.isFrameworkApk
|
||||||
buildOptions.resourcesAreCompressed = metaInfo.compressionType
|
buildOptions.resourcesAreCompressed = metaInfo.compressionType
|
||||||
buildOptions.doNotCompress = metaInfo.doNotCompress
|
buildOptions.doNotCompress = metaInfo.doNotCompress
|
||||||
@@ -295,3 +295,9 @@ class Patcher(private val options: PatcherOptions) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun BuildOptions.setBuildOptions(options: PatcherOptions) {
|
||||||
|
this.aaptPath = options.aaptPath
|
||||||
|
this.useAapt2 = true
|
||||||
|
this.frameworkFolderLocation = options.frameworkFolderLocation
|
||||||
|
}
|
@@ -8,10 +8,12 @@ import java.io.File
|
|||||||
* @param resourceCacheDirectory Directory to cache resources.
|
* @param resourceCacheDirectory Directory to cache resources.
|
||||||
* @param patchResources Weather to use the resource patcher. Resources will still need to be decoded.
|
* @param patchResources Weather to use the resource patcher. Resources will still need to be decoded.
|
||||||
* @param aaptPath Optional path to a custom aapt binary.
|
* @param aaptPath Optional path to a custom aapt binary.
|
||||||
|
* @param frameworkFolderLocation Optional path to a custom framework folder.
|
||||||
*/
|
*/
|
||||||
data class PatcherOptions(
|
data class PatcherOptions(
|
||||||
internal val inputFile: File,
|
internal val inputFile: File,
|
||||||
internal val resourceCacheDirectory: String,
|
internal val resourceCacheDirectory: String,
|
||||||
internal val patchResources: Boolean = false,
|
internal val patchResources: Boolean = false,
|
||||||
internal val aaptPath: String = ""
|
internal val aaptPath: String = "",
|
||||||
|
internal val frameworkFolderLocation: String? = null
|
||||||
)
|
)
|
||||||
|
@@ -34,7 +34,6 @@ class DomFileEditor internal constructor(private val domFile: File) : Closeable
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
val factory = DocumentBuilderFactory.newInstance()
|
val factory = DocumentBuilderFactory.newInstance()
|
||||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true)
|
|
||||||
|
|
||||||
val builder = factory.newDocumentBuilder()
|
val builder = factory.newDocumentBuilder()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user