From 709b5a0fec5987ec60823bbc36408a559aa75c98 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 10 Feb 2023 05:16:00 +0100 Subject: [PATCH 1/4] chore: fix typo Signed-off-by: oSumAtrIX --- src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt b/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt index fc444fc..607b24d 100644 --- a/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt +++ b/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt @@ -101,7 +101,7 @@ fun MutableMethod.removeInstruction(index: Int) = this.implementation!!.removeIn fun MutableMethod.label(index: Int) = this.implementation!!.newLabelForIndex(index) /** - * Get the instruction at given index in the method's implementation. + * Get the instruction at the given index in the method's implementation. * @param index The index to get the instruction at. * @return The instruction. */ From 1029d56a5203dc846c50fefe1c8b2bfbaad50c45 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 10 Feb 2023 05:17:09 +0100 Subject: [PATCH 2/4] refactor: remove dead code Signed-off-by: oSumAtrIX --- .../revanced/patcher/extensions/Extensions.kt | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt b/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt index 607b24d..6ccf06c 100644 --- a/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt +++ b/src/main/kotlin/app/revanced/patcher/extensions/Extensions.kt @@ -227,21 +227,4 @@ internal fun parametersEqual( internal val nullOutputStream = object : OutputStream() { override fun write(b: Int) {} -} - -/** - * Should be used to parse a list of parameters represented by their first letter, - * or in the case of arrays prefixed with an unspecified amount of '[' character. - */ -internal fun String.parseParameters(): List { - val parameters = mutableListOf() - var parameter = "" - for (char in this.toCharArray()) { - parameter += char - if (char == '[') continue - - parameters.add(parameter) - parameter = "" - } - return parameters } \ No newline at end of file From 058d292ad5e297f4c652ff543c13e77a39f7fb1b Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Fri, 10 Feb 2023 05:18:38 +0100 Subject: [PATCH 3/4] fix: check `CONST_STRING_JUMP` instructions for matching string Signed-off-by: oSumAtrIX --- .../patcher/fingerprint/method/impl/MethodFingerprint.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt b/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt index a74800c..f3803c0 100644 --- a/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt +++ b/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt @@ -106,7 +106,10 @@ abstract class MethodFingerprint( val stringsList = methodFingerprint.strings.toMutableList() implementation.instructions.forEachIndexed { instructionIndex, instruction -> - if (instruction.opcode.ordinal != Opcode.CONST_STRING.ordinal) return@forEachIndexed + if ( + instruction.opcode != Opcode.CONST_STRING && + instruction.opcode != Opcode.CONST_STRING_JUMBO + ) return@forEachIndexed val string = ((instruction as ReferenceInstruction).reference as StringReference).string val index = stringsList.indexOfFirst(string::contains) @@ -244,7 +247,7 @@ data class MethodFingerprintResult( * The result of scanning strings on the [MethodFingerprint]. * @param matches The list of strings that were matched. */ - data class StringsScanResult(val matches: List){ + data class StringsScanResult(val matches: List) { /** * Represents a match for a string at an index. * @param string The string that was matched. From 0502f84c204832a5e02a532c51e855895cee4688 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 10 Feb 2023 04:20:46 +0000 Subject: [PATCH 4/4] chore(release): 6.4.3-dev.1 [skip ci] ## [6.4.3-dev.1](https://github.com/revanced/revanced-patcher/compare/v6.4.2...v6.4.3-dev.1) (2023-02-10) ### Bug Fixes * check `CONST_STRING_JUMP` instructions for matching string ([058d292](https://github.com/revanced/revanced-patcher/commit/058d292ad5e297f4c652ff543c13e77a39f7fb1b)) --- CHANGELOG.md | 7 +++++++ gradle.properties | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d50fd2..fa5aa32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [6.4.3-dev.1](https://github.com/revanced/revanced-patcher/compare/v6.4.2...v6.4.3-dev.1) (2023-02-10) + + +### Bug Fixes + +* check `CONST_STRING_JUMP` instructions for matching string ([058d292](https://github.com/revanced/revanced-patcher/commit/058d292ad5e297f4c652ff543c13e77a39f7fb1b)) + ## [6.4.2](https://github.com/revanced/revanced-patcher/compare/v6.4.1...v6.4.2) (2023-01-17) diff --git a/gradle.properties b/gradle.properties index 37d1cbf..315be31 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ kotlin.code.style = official -version = 6.4.2 +version = 6.4.3-dev.1