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
19 Commits
v18.0.0-de
...
v19.0.0-de
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f05a404e48 | ||
![]() |
a46e948b5a | ||
![]() |
dc09ea639f | ||
![]() |
49ed096e85 | ||
![]() |
167bd83f4e | ||
![]() |
aed1eac315 | ||
![]() |
54a2f8f16f | ||
![]() |
2ca543ffb9 | ||
![]() |
58e7f815a5 | ||
![]() |
15b38fc841 | ||
![]() |
e2ca50729d | ||
![]() |
6192089b71 | ||
![]() |
a4212f6bf9 | ||
![]() |
124a2e9d3e | ||
![]() |
f77624b3b9 | ||
![]() |
a76ac04214 | ||
![]() |
0447fa9c28 | ||
![]() |
54ac1394a9 | ||
![]() |
0b04c73ac5 |
103
CHANGELOG.md
103
CHANGELOG.md
@@ -1,3 +1,106 @@
|
|||||||
|
# [19.0.0-dev.1](https://github.com/ReVanced/revanced-patcher/compare/v18.0.0...v19.0.0-dev.1) (2023-10-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add `PatchOption#valueType` to handle type erasure ([a46e948](https://github.com/ReVanced/revanced-patcher/commit/a46e948b5a0cf9bc8d31f557e371cd7d7c2f5b1c))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* This changes the signature of the `PatchOption` constructor.
|
||||||
|
|
||||||
|
# [18.0.0](https://github.com/ReVanced/revanced-patcher/compare/v17.0.0...v18.0.0) (2023-10-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Do not set patch fields if they are empty ([a76ac04](https://github.com/ReVanced/revanced-patcher/commit/a76ac04214a2ab91e3b2f9dddb13ed52816fe723))
|
||||||
|
* Only allow setting `MethodFingerprint#result` privately ([aed1eac](https://github.com/ReVanced/revanced-patcher/commit/aed1eac3157317acf87f522750cf2f41509606c3))
|
||||||
|
|
||||||
|
|
||||||
|
### Code Refactoring
|
||||||
|
|
||||||
|
* Change `PatchOption` from abstract to open class ([09cd6aa](https://github.com/ReVanced/revanced-patcher/commit/09cd6aa568988dd5241bfa6a2e12b7926a7b0683))
|
||||||
|
* Change data classes to actual classes ([6192089](https://github.com/ReVanced/revanced-patcher/commit/6192089b71bdca15765369f3e607ddd1f8266205))
|
||||||
|
* Convert extension functions to member functions ([e2ca507](https://github.com/ReVanced/revanced-patcher/commit/e2ca50729da7085799c0ff6fc4f7afaf82579738))
|
||||||
|
* Move files to simplify package structure ([124a2e9](https://github.com/ReVanced/revanced-patcher/commit/124a2e9d3efb88f0f038ae306d941e918ad3ad3c))
|
||||||
|
* Remove deprecated classes and members ([a4212f6](https://github.com/ReVanced/revanced-patcher/commit/a4212f6bf952971541c4550e20f6bf57a382e19a))
|
||||||
|
|
||||||
|
|
||||||
|
* refactor!: Remove `Fingerprint` interface ([54a2f8f](https://github.com/ReVanced/revanced-patcher/commit/54a2f8f16fddf2b2ed47eb23717ba3734c4a6c5d))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add function to reset options to their default value ([ebbaafb](https://github.com/ReVanced/revanced-patcher/commit/ebbaafb78e88f34faeafe9ff8532afe29231bd79))
|
||||||
|
* Add function to reset options to their default value ([e6de90d](https://github.com/ReVanced/revanced-patcher/commit/e6de90d300bc9c82ca1696cb898db04c65a1cd5b))
|
||||||
|
* Add getter for default option value ([c7922e9](https://github.com/ReVanced/revanced-patcher/commit/c7922e90d0c6ae83f513611c706ebea33c1a2b63))
|
||||||
|
* Make `PatchOption#values` nullable ([56ce9ec](https://github.com/ReVanced/revanced-patcher/commit/56ce9ec2f98ff351c3d42df71b49e5c88f07e665))
|
||||||
|
* Name patch option value validator property correctly ([caa634f](https://github.com/ReVanced/revanced-patcher/commit/caa634fac6d7a717f54e3b015827c8858fd637b9))
|
||||||
|
* Remove patch annotation processor ([4456031](https://github.com/ReVanced/revanced-patcher/commit/445603145979a6f67823a79f9d6cd140299cff37))
|
||||||
|
* Use a map for `PatchOption#values` ([54ac139](https://github.com/ReVanced/revanced-patcher/commit/54ac1394a914d3eed7865ec697e8016834134911))
|
||||||
|
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* Run the garbage collector after writing dex files ([d9fb241](https://github.com/ReVanced/revanced-patcher/commit/d9fb241d57b0c4340130c0e5900250e66730ea56))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* The `MethodFingerprint#result` member can now only be set inside `MethodFingerprint`.
|
||||||
|
* The `Fingerprint` interface is no longer present.
|
||||||
|
* Some extension functions are now member functions.
|
||||||
|
* This gets rid of data class members.
|
||||||
|
* Some deprecated classes and members are not present anymore.
|
||||||
|
* Classes and members have changed packages.
|
||||||
|
* This gets rid of the existing basic implementations of the `PatchOptions` type and moves extension functions.
|
||||||
|
* This changes the getter name of the property.
|
||||||
|
* Various patch constructor signatures have changed.
|
||||||
|
|
||||||
|
# [18.0.0-dev.6](https://github.com/ReVanced/revanced-patcher/compare/v18.0.0-dev.5...v18.0.0-dev.6) (2023-10-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Only allow setting `MethodFingerprint#result` privately ([aed1eac](https://github.com/ReVanced/revanced-patcher/commit/aed1eac3157317acf87f522750cf2f41509606c3))
|
||||||
|
|
||||||
|
|
||||||
|
### Code Refactoring
|
||||||
|
|
||||||
|
* Change data classes to actual classes ([6192089](https://github.com/ReVanced/revanced-patcher/commit/6192089b71bdca15765369f3e607ddd1f8266205))
|
||||||
|
* Convert extension functions to member functions ([e2ca507](https://github.com/ReVanced/revanced-patcher/commit/e2ca50729da7085799c0ff6fc4f7afaf82579738))
|
||||||
|
* Move files to simplify package structure ([124a2e9](https://github.com/ReVanced/revanced-patcher/commit/124a2e9d3efb88f0f038ae306d941e918ad3ad3c))
|
||||||
|
* Remove deprecated classes and members ([a4212f6](https://github.com/ReVanced/revanced-patcher/commit/a4212f6bf952971541c4550e20f6bf57a382e19a))
|
||||||
|
|
||||||
|
|
||||||
|
* refactor!: Remove `Fingerprint` interface ([54a2f8f](https://github.com/ReVanced/revanced-patcher/commit/54a2f8f16fddf2b2ed47eb23717ba3734c4a6c5d))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* The `MethodFingerprint#result` member can now only be set inside `MethodFingerprint`.
|
||||||
|
* The `Fingerprint` interface is no longer present.
|
||||||
|
* Some extension functions are now member functions.
|
||||||
|
* This gets rid of data class members.
|
||||||
|
* Some deprecated classes and members are not present anymore.
|
||||||
|
* Classes and members have changed packages.
|
||||||
|
|
||||||
|
# [18.0.0-dev.5](https://github.com/ReVanced/revanced-patcher/compare/v18.0.0-dev.4...v18.0.0-dev.5) (2023-10-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Do not set patch fields if they are empty ([a76ac04](https://github.com/ReVanced/revanced-patcher/commit/a76ac04214a2ab91e3b2f9dddb13ed52816fe723))
|
||||||
|
|
||||||
|
# [18.0.0-dev.4](https://github.com/ReVanced/revanced-patcher/compare/v18.0.0-dev.3...v18.0.0-dev.4) (2023-10-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Use a map for `PatchOption#values` ([54ac139](https://github.com/ReVanced/revanced-patcher/commit/54ac1394a914d3eed7865ec697e8016834134911))
|
||||||
|
|
||||||
# [18.0.0-dev.3](https://github.com/ReVanced/revanced-patcher/compare/v18.0.0-dev.2...v18.0.0-dev.3) (2023-10-22)
|
# [18.0.0-dev.3](https://github.com/ReVanced/revanced-patcher/compare/v18.0.0-dev.2...v18.0.0-dev.3) (2023-10-22)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -65,8 +65,6 @@ public final class app/revanced/patcher/PatcherException$CircularDependencyExcep
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patcher/PatcherOptions {
|
public final class app/revanced/patcher/PatcherOptions {
|
||||||
public fun <init> (Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;)V
|
|
||||||
public synthetic fun <init> (Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
||||||
public fun <init> (Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Z)V
|
public fun <init> (Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Z)V
|
||||||
public synthetic fun <init> (Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun copy (Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Z)Lapp/revanced/patcher/PatcherOptions;
|
public final fun copy (Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Z)Lapp/revanced/patcher/PatcherOptions;
|
||||||
@@ -169,139 +167,68 @@ public final class app/revanced/patcher/extensions/InstructionExtensions {
|
|||||||
|
|
||||||
public final class app/revanced/patcher/extensions/MethodFingerprintExtensions {
|
public final class app/revanced/patcher/extensions/MethodFingerprintExtensions {
|
||||||
public static final field INSTANCE Lapp/revanced/patcher/extensions/MethodFingerprintExtensions;
|
public static final field INSTANCE Lapp/revanced/patcher/extensions/MethodFingerprintExtensions;
|
||||||
public final fun getFuzzyPatternScanMethod (Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprint;)Lapp/revanced/patcher/fingerprint/method/annotation/FuzzyPatternScanMethod;
|
public final fun getFuzzyPatternScanMethod (Lapp/revanced/patcher/fingerprint/MethodFingerprint;)Lapp/revanced/patcher/fingerprint/annotation/FuzzyPatternScanMethod;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract interface class app/revanced/patcher/fingerprint/Fingerprint {
|
public abstract class app/revanced/patcher/fingerprint/MethodFingerprint {
|
||||||
}
|
public static final field Companion Lapp/revanced/patcher/fingerprint/MethodFingerprint$Companion;
|
||||||
|
|
||||||
public abstract interface annotation class app/revanced/patcher/fingerprint/method/annotation/FuzzyPatternScanMethod : java/lang/annotation/Annotation {
|
|
||||||
public abstract fun threshold ()I
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract class app/revanced/patcher/fingerprint/method/impl/MethodFingerprint : app/revanced/patcher/fingerprint/Fingerprint {
|
|
||||||
public static final field Companion Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprint$Companion;
|
|
||||||
public fun <init> ()V
|
public fun <init> ()V
|
||||||
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function2;)V
|
public fun <init> (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function2;)V
|
||||||
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function2;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function2;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun getResult ()Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult;
|
public final fun getResult ()Lapp/revanced/patcher/fingerprint/MethodFingerprintResult;
|
||||||
public final fun setResult (Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult;)V
|
public final fun resolve (Lapp/revanced/patcher/data/BytecodeContext;Lcom/android/tools/smali/dexlib2/iface/ClassDef;)Z
|
||||||
|
public final fun resolve (Lapp/revanced/patcher/data/BytecodeContext;Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/ClassDef;)Z
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patcher/fingerprint/method/impl/MethodFingerprint$Companion {
|
public final class app/revanced/patcher/fingerprint/MethodFingerprint$Companion {
|
||||||
public final fun resolve (Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprint;Lapp/revanced/patcher/data/BytecodeContext;Lcom/android/tools/smali/dexlib2/iface/ClassDef;)Z
|
|
||||||
public final fun resolve (Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprint;Lapp/revanced/patcher/data/BytecodeContext;Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/ClassDef;)Z
|
|
||||||
public final fun resolve (Ljava/lang/Iterable;Lapp/revanced/patcher/data/BytecodeContext;Ljava/lang/Iterable;)V
|
public final fun resolve (Ljava/lang/Iterable;Lapp/revanced/patcher/data/BytecodeContext;Ljava/lang/Iterable;)V
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult {
|
public final class app/revanced/patcher/fingerprint/MethodFingerprintResult {
|
||||||
public fun <init> (Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/ClassDef;Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult;Lapp/revanced/patcher/data/BytecodeContext;)V
|
public fun <init> (Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/ClassDef;Lapp/revanced/patcher/fingerprint/MethodFingerprintResult$MethodFingerprintScanResult;Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||||
public final fun component1 ()Lcom/android/tools/smali/dexlib2/iface/Method;
|
|
||||||
public final fun component2 ()Lcom/android/tools/smali/dexlib2/iface/ClassDef;
|
|
||||||
public final fun component3 ()Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult;
|
|
||||||
public final fun copy (Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/ClassDef;Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult;Lapp/revanced/patcher/data/BytecodeContext;)Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult;
|
|
||||||
public static synthetic fun copy$default (Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult;Lcom/android/tools/smali/dexlib2/iface/Method;Lcom/android/tools/smali/dexlib2/iface/ClassDef;Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult;Lapp/revanced/patcher/data/BytecodeContext;ILjava/lang/Object;)Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult;
|
|
||||||
public fun equals (Ljava/lang/Object;)Z
|
|
||||||
public final fun getClassDef ()Lcom/android/tools/smali/dexlib2/iface/ClassDef;
|
public final fun getClassDef ()Lcom/android/tools/smali/dexlib2/iface/ClassDef;
|
||||||
public final fun getMethod ()Lcom/android/tools/smali/dexlib2/iface/Method;
|
public final fun getMethod ()Lcom/android/tools/smali/dexlib2/iface/Method;
|
||||||
public final fun getMutableClass ()Lapp/revanced/patcher/util/proxy/mutableTypes/MutableClass;
|
public final fun getMutableClass ()Lapp/revanced/patcher/util/proxy/mutableTypes/MutableClass;
|
||||||
public final fun getMutableMethod ()Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;
|
public final fun getMutableMethod ()Lapp/revanced/patcher/util/proxy/mutableTypes/MutableMethod;
|
||||||
public final fun getScanResult ()Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult;
|
public final fun getScanResult ()Lapp/revanced/patcher/fingerprint/MethodFingerprintResult$MethodFingerprintScanResult;
|
||||||
public fun hashCode ()I
|
|
||||||
public fun toString ()Ljava/lang/String;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult {
|
public final class app/revanced/patcher/fingerprint/MethodFingerprintResult$MethodFingerprintScanResult {
|
||||||
public fun <init> (Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult;Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult;)V
|
public fun <init> (Lapp/revanced/patcher/fingerprint/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult;Lapp/revanced/patcher/fingerprint/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult;)V
|
||||||
public final fun component1 ()Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult;
|
public final fun getPatternScanResult ()Lapp/revanced/patcher/fingerprint/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult;
|
||||||
public final fun component2 ()Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult;
|
public final fun getStringsScanResult ()Lapp/revanced/patcher/fingerprint/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult;
|
||||||
public final fun copy (Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult;Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult;)Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult;
|
|
||||||
public static synthetic fun copy$default (Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult;Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult;Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult;ILjava/lang/Object;)Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult;
|
|
||||||
public fun equals (Ljava/lang/Object;)Z
|
|
||||||
public final fun getPatternScanResult ()Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult;
|
|
||||||
public final fun getStringsScanResult ()Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult;
|
|
||||||
public fun hashCode ()I
|
|
||||||
public fun toString ()Ljava/lang/String;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult {
|
public final class app/revanced/patcher/fingerprint/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult {
|
||||||
public fun <init> (IILjava/util/List;)V
|
public fun <init> (IILjava/util/List;)V
|
||||||
public synthetic fun <init> (IILjava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (IILjava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun component1 ()I
|
|
||||||
public final fun component2 ()I
|
|
||||||
public final fun component3 ()Ljava/util/List;
|
|
||||||
public final fun copy (IILjava/util/List;)Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult;
|
|
||||||
public static synthetic fun copy$default (Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult;IILjava/util/List;ILjava/lang/Object;)Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult;
|
|
||||||
public fun equals (Ljava/lang/Object;)Z
|
|
||||||
public final fun getEndIndex ()I
|
public final fun getEndIndex ()I
|
||||||
public final fun getStartIndex ()I
|
public final fun getStartIndex ()I
|
||||||
public final fun getWarnings ()Ljava/util/List;
|
public final fun getWarnings ()Ljava/util/List;
|
||||||
public fun hashCode ()I
|
|
||||||
public final fun setWarnings (Ljava/util/List;)V
|
public final fun setWarnings (Ljava/util/List;)V
|
||||||
public fun toString ()Ljava/lang/String;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult$Warning {
|
public final class app/revanced/patcher/fingerprint/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult$Warning {
|
||||||
public fun <init> (Lcom/android/tools/smali/dexlib2/Opcode;Lcom/android/tools/smali/dexlib2/Opcode;II)V
|
public fun <init> (Lcom/android/tools/smali/dexlib2/Opcode;Lcom/android/tools/smali/dexlib2/Opcode;II)V
|
||||||
public final fun component1 ()Lcom/android/tools/smali/dexlib2/Opcode;
|
|
||||||
public final fun component2 ()Lcom/android/tools/smali/dexlib2/Opcode;
|
|
||||||
public final fun component3 ()I
|
|
||||||
public final fun component4 ()I
|
|
||||||
public final fun copy (Lcom/android/tools/smali/dexlib2/Opcode;Lcom/android/tools/smali/dexlib2/Opcode;II)Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult$Warning;
|
|
||||||
public static synthetic fun copy$default (Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult$Warning;Lcom/android/tools/smali/dexlib2/Opcode;Lcom/android/tools/smali/dexlib2/Opcode;IIILjava/lang/Object;)Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$PatternScanResult$Warning;
|
|
||||||
public fun equals (Ljava/lang/Object;)Z
|
|
||||||
public final fun getCorrectOpcode ()Lcom/android/tools/smali/dexlib2/Opcode;
|
public final fun getCorrectOpcode ()Lcom/android/tools/smali/dexlib2/Opcode;
|
||||||
public final fun getInstructionIndex ()I
|
public final fun getInstructionIndex ()I
|
||||||
public final fun getPatternIndex ()I
|
public final fun getPatternIndex ()I
|
||||||
public final fun getWrongOpcode ()Lcom/android/tools/smali/dexlib2/Opcode;
|
public final fun getWrongOpcode ()Lcom/android/tools/smali/dexlib2/Opcode;
|
||||||
public fun hashCode ()I
|
|
||||||
public fun toString ()Ljava/lang/String;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult {
|
public final class app/revanced/patcher/fingerprint/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult {
|
||||||
public fun <init> (Ljava/util/List;)V
|
public fun <init> (Ljava/util/List;)V
|
||||||
public final fun component1 ()Ljava/util/List;
|
|
||||||
public final fun copy (Ljava/util/List;)Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult;
|
|
||||||
public static synthetic fun copy$default (Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult;Ljava/util/List;ILjava/lang/Object;)Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult;
|
|
||||||
public fun equals (Ljava/lang/Object;)Z
|
|
||||||
public final fun getMatches ()Ljava/util/List;
|
public final fun getMatches ()Ljava/util/List;
|
||||||
public fun hashCode ()I
|
|
||||||
public fun toString ()Ljava/lang/String;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult$StringMatch {
|
public final class app/revanced/patcher/fingerprint/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult$StringMatch {
|
||||||
public fun <init> (Ljava/lang/String;I)V
|
public fun <init> (Ljava/lang/String;I)V
|
||||||
public final fun component1 ()Ljava/lang/String;
|
|
||||||
public final fun component2 ()I
|
|
||||||
public final fun copy (Ljava/lang/String;I)Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult$StringMatch;
|
|
||||||
public static synthetic fun copy$default (Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult$StringMatch;Ljava/lang/String;IILjava/lang/Object;)Lapp/revanced/patcher/fingerprint/method/impl/MethodFingerprintResult$MethodFingerprintScanResult$StringsScanResult$StringMatch;
|
|
||||||
public fun equals (Ljava/lang/Object;)Z
|
|
||||||
public final fun getIndex ()I
|
public final fun getIndex ()I
|
||||||
public final fun getString ()Ljava/lang/String;
|
public final fun getString ()Ljava/lang/String;
|
||||||
public fun hashCode ()I
|
|
||||||
public fun toString ()Ljava/lang/String;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract interface class app/revanced/patcher/logging/Logger {
|
public abstract interface annotation class app/revanced/patcher/fingerprint/annotation/FuzzyPatternScanMethod : java/lang/annotation/Annotation {
|
||||||
public abstract fun error (Ljava/lang/String;)V
|
public abstract fun threshold ()I
|
||||||
public abstract fun info (Ljava/lang/String;)V
|
|
||||||
public abstract fun trace (Ljava/lang/String;)V
|
|
||||||
public abstract fun warn (Ljava/lang/String;)V
|
|
||||||
}
|
|
||||||
|
|
||||||
public final class app/revanced/patcher/logging/Logger$DefaultImpls {
|
|
||||||
public static fun error (Lapp/revanced/patcher/logging/Logger;Ljava/lang/String;)V
|
|
||||||
public static fun info (Lapp/revanced/patcher/logging/Logger;Ljava/lang/String;)V
|
|
||||||
public static fun trace (Lapp/revanced/patcher/logging/Logger;Ljava/lang/String;)V
|
|
||||||
public static fun warn (Lapp/revanced/patcher/logging/Logger;Ljava/lang/String;)V
|
|
||||||
}
|
|
||||||
|
|
||||||
public final class app/revanced/patcher/logging/impl/NopLogger : app/revanced/patcher/logging/Logger {
|
|
||||||
public static final field INSTANCE Lapp/revanced/patcher/logging/impl/NopLogger;
|
|
||||||
public fun error (Ljava/lang/String;)V
|
|
||||||
public fun info (Ljava/lang/String;)V
|
|
||||||
public fun trace (Ljava/lang/String;)V
|
|
||||||
public fun warn (Ljava/lang/String;)V
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class app/revanced/patcher/patch/BytecodePatch : app/revanced/patcher/patch/Patch {
|
public abstract class app/revanced/patcher/patch/BytecodePatch : app/revanced/patcher/patch/Patch {
|
||||||
@@ -362,7 +289,7 @@ public abstract interface annotation class app/revanced/patcher/patch/annotation
|
|||||||
|
|
||||||
public class app/revanced/patcher/patch/options/PatchOption {
|
public class app/revanced/patcher/patch/options/PatchOption {
|
||||||
public static final field PatchExtensions Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;
|
public static final field PatchExtensions Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;
|
||||||
public fun <init> (Ljava/lang/String;Ljava/lang/Object;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)V
|
public fun <init> (Ljava/lang/String;Ljava/lang/Object;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;Lkotlin/jvm/functions/Function2;)V
|
||||||
public final fun getDefault ()Ljava/lang/Object;
|
public final fun getDefault ()Ljava/lang/Object;
|
||||||
public final fun getDescription ()Ljava/lang/String;
|
public final fun getDescription ()Ljava/lang/String;
|
||||||
public final fun getKey ()Ljava/lang/String;
|
public final fun getKey ()Ljava/lang/String;
|
||||||
@@ -371,7 +298,8 @@ public class app/revanced/patcher/patch/options/PatchOption {
|
|||||||
public final fun getValidator ()Lkotlin/jvm/functions/Function2;
|
public final fun getValidator ()Lkotlin/jvm/functions/Function2;
|
||||||
public final fun getValue ()Ljava/lang/Object;
|
public final fun getValue ()Ljava/lang/Object;
|
||||||
public final fun getValue (Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
public final fun getValue (Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
||||||
public final fun getValues ()Ljava/util/Set;
|
public final fun getValueType ()Ljava/lang/String;
|
||||||
|
public final fun getValues ()Ljava/util/Map;
|
||||||
public fun reset ()V
|
public fun reset ()V
|
||||||
public final fun setValue (Ljava/lang/Object;)V
|
public final fun setValue (Ljava/lang/Object;)V
|
||||||
public final fun setValue (Ljava/lang/Object;Lkotlin/reflect/KProperty;Ljava/lang/Object;)V
|
public final fun setValue (Ljava/lang/Object;Lkotlin/reflect/KProperty;Ljava/lang/Object;)V
|
||||||
@@ -379,26 +307,26 @@ public class app/revanced/patcher/patch/options/PatchOption {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patcher/patch/options/PatchOption$PatchExtensions {
|
public final class app/revanced/patcher/patch/options/PatchOption$PatchExtensions {
|
||||||
public final fun booleanArrayPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Boolean;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public final fun booleanArrayPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Boolean;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public static synthetic fun booleanArrayPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Boolean;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public static synthetic fun booleanArrayPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Boolean;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public final fun booleanPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Boolean;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public final fun booleanPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Boolean;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public static synthetic fun booleanPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Boolean;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public static synthetic fun booleanPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Boolean;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public final fun floatArrayPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Float;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public final fun floatArrayPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Float;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public static synthetic fun floatArrayPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Float;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public static synthetic fun floatArrayPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Float;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public final fun floatPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Float;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public final fun floatPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Float;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public static synthetic fun floatPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Float;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public static synthetic fun floatPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Float;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public final fun intArrayPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Integer;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public final fun intArrayPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Integer;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public static synthetic fun intArrayPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Integer;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public static synthetic fun intArrayPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Integer;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public final fun intPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public final fun intPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public static synthetic fun intPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public static synthetic fun intPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public final fun longArrayPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Long;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public final fun longArrayPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Long;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public static synthetic fun longArrayPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Long;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public static synthetic fun longArrayPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/Long;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public final fun longPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Long;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public final fun longPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Long;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public static synthetic fun longPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Long;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public static synthetic fun longPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/Long;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public final fun stringArrayPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/String;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public final fun stringArrayPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public static synthetic fun stringArrayPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/String;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public static synthetic fun stringArrayPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;[Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public final fun stringPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public final fun stringPatchOption (Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
public static synthetic fun stringPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
public static synthetic fun stringPatchOption$default (Lapp/revanced/patcher/patch/options/PatchOption$PatchExtensions;Lapp/revanced/patcher/patch/Patch;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lapp/revanced/patcher/patch/options/PatchOption;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract class app/revanced/patcher/patch/options/PatchOptionException : java/lang/Exception {
|
public abstract class app/revanced/patcher/patch/options/PatchOptionException : java/lang/Exception {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.9.0"
|
kotlin("jvm") version "1.9.10"
|
||||||
alias(libs.plugins.binary.compatibility.validator)
|
alias(libs.plugins.binary.compatibility.validator)
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
signing
|
signing
|
||||||
|
@@ -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 = 18.0.0-dev.3
|
version = 19.0.0-dev.1
|
||||||
|
@@ -2,8 +2,9 @@ package app.revanced.patcher
|
|||||||
|
|
||||||
import app.revanced.patcher.PatchBundleLoader.Utils.getInstance
|
import app.revanced.patcher.PatchBundleLoader.Utils.getInstance
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.LookupMap.Maps.clearLookupMaps
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolveUsingLookupMap
|
import app.revanced.patcher.fingerprint.LookupMap.Maps.initializeLookupMaps
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint.Companion.resolveUsingLookupMap
|
||||||
import app.revanced.patcher.patch.*
|
import app.revanced.patcher.patch.*
|
||||||
import kotlinx.coroutines.flow.flow
|
import kotlinx.coroutines.flow.flow
|
||||||
import java.io.Closeable
|
import java.io.Closeable
|
||||||
@@ -187,7 +188,7 @@ class Patcher(
|
|||||||
|
|
||||||
if (context.bytecodeContext.integrations.merge) context.bytecodeContext.integrations.flush()
|
if (context.bytecodeContext.integrations.merge) context.bytecodeContext.integrations.flush()
|
||||||
|
|
||||||
MethodFingerprint.initializeFingerprintResolutionLookupMaps(context.bytecodeContext)
|
initializeLookupMaps(context.bytecodeContext)
|
||||||
|
|
||||||
// Prevent from decoding the app manifest twice if it is not needed.
|
// Prevent from decoding the app manifest twice if it is not needed.
|
||||||
if (options.resourceDecodingMode == ResourceContext.ResourceDecodingMode.FULL)
|
if (options.resourceDecodingMode == ResourceContext.ResourceDecodingMode.FULL)
|
||||||
@@ -249,7 +250,7 @@ class Patcher(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun close() = MethodFingerprint.clearFingerprintResolutionLookupMaps()
|
override fun close() = clearLookupMaps()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compile and save the patched APK file.
|
* Compile and save the patched APK file.
|
||||||
|
@@ -38,27 +38,6 @@ data class PatcherOptions(
|
|||||||
frameworkDirectory = frameworkFileDirectory
|
frameworkDirectory = frameworkFileDirectory
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Options for ReVanced [Patcher].
|
|
||||||
* @param inputFile The input file to patch.
|
|
||||||
* @param resourceCachePath The path to the directory to use for caching resources.
|
|
||||||
* @param aaptBinaryPath The path to a custom aapt binary.
|
|
||||||
* @param frameworkFileDirectory The path to the directory to cache the framework file in.
|
|
||||||
*/
|
|
||||||
@Deprecated("Use the constructor with the multithreadingDexFileWriter parameter instead")
|
|
||||||
constructor(
|
|
||||||
inputFile: File,
|
|
||||||
resourceCachePath: File = File("revanced-resource-cache"),
|
|
||||||
aaptBinaryPath: String? = null,
|
|
||||||
frameworkFileDirectory: String? = null,
|
|
||||||
) : this(
|
|
||||||
inputFile,
|
|
||||||
resourceCachePath,
|
|
||||||
aaptBinaryPath,
|
|
||||||
frameworkFileDirectory,
|
|
||||||
false,
|
|
||||||
)
|
|
||||||
|
|
||||||
fun recreateResourceCacheDirectory() = resourceCachePath.also {
|
fun recreateResourceCacheDirectory() = resourceCachePath.also {
|
||||||
if (it.exists()) {
|
if (it.exists()) {
|
||||||
logger.info("Deleting existing resource cache directory")
|
logger.info("Deleting existing resource cache directory")
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
package app.revanced.patcher.extensions
|
package app.revanced.patcher.extensions
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.AnnotationExtensions.findAnnotationRecursively
|
import app.revanced.patcher.extensions.AnnotationExtensions.findAnnotationRecursively
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
object MethodFingerprintExtensions {
|
object MethodFingerprintExtensions {
|
||||||
// TODO: Make this a property.
|
// TODO: Make this a property.
|
||||||
|
@@ -1,9 +0,0 @@
|
|||||||
package app.revanced.patcher.fingerprint
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A ReVanced fingerprint.
|
|
||||||
* Can be a [MethodFingerprint].
|
|
||||||
*/
|
|
||||||
interface Fingerprint
|
|
125
src/main/kotlin/app/revanced/patcher/fingerprint/LookupMap.kt
Normal file
125
src/main/kotlin/app/revanced/patcher/fingerprint/LookupMap.kt
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
package app.revanced.patcher.fingerprint
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
|
import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
internal typealias MethodClassPair = Pair<Method, ClassDef>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lookup map for methods.
|
||||||
|
*/
|
||||||
|
internal class LookupMap : MutableMap<String, LookupMap.MethodClassList> by mutableMapOf() {
|
||||||
|
/**
|
||||||
|
* Adds a [MethodClassPair] to the list associated with the given key.
|
||||||
|
* If the key does not exist, a new list is created and the [MethodClassPair] is added to it.
|
||||||
|
*/
|
||||||
|
fun add(
|
||||||
|
key: String,
|
||||||
|
methodClassPair: MethodClassPair
|
||||||
|
) {
|
||||||
|
getOrPut(key) { MethodClassList() }.add(methodClassPair)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of methods and the class they are a member of.
|
||||||
|
*/
|
||||||
|
internal class MethodClassList : LinkedList<MethodClassPair>()
|
||||||
|
|
||||||
|
companion object Maps {
|
||||||
|
/**
|
||||||
|
* A list of methods and the class they are a member of.
|
||||||
|
*/
|
||||||
|
internal val methods = MethodClassList()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lookup map for methods keyed to the methods access flags, return type and parameter.
|
||||||
|
*/
|
||||||
|
internal val methodSignatureLookupMap = LookupMap()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lookup map for methods associated by strings referenced in the method.
|
||||||
|
*/
|
||||||
|
internal val methodStringsLookupMap = LookupMap()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes lookup maps for [MethodFingerprint] resolution
|
||||||
|
* using attributes of methods such as the method signature or strings.
|
||||||
|
*
|
||||||
|
* @param context The [BytecodeContext] containing the classes to initialize the lookup maps with.
|
||||||
|
*/
|
||||||
|
internal fun initializeLookupMaps(context: BytecodeContext) {
|
||||||
|
if (methods.isNotEmpty()) clearLookupMaps()
|
||||||
|
|
||||||
|
context.classes.forEach { classDef ->
|
||||||
|
classDef.methods.forEach { method ->
|
||||||
|
val methodClassPair = method to classDef
|
||||||
|
|
||||||
|
// For fingerprints with no access or return type specified.
|
||||||
|
methods += methodClassPair
|
||||||
|
|
||||||
|
val accessFlagsReturnKey = method.accessFlags.toString() + method.returnType.first()
|
||||||
|
|
||||||
|
// Add <access><returnType> as the key.
|
||||||
|
methodSignatureLookupMap.add(accessFlagsReturnKey, methodClassPair)
|
||||||
|
|
||||||
|
// Add <access><returnType>[parameters] as the key.
|
||||||
|
methodSignatureLookupMap.add(
|
||||||
|
buildString {
|
||||||
|
append(accessFlagsReturnKey)
|
||||||
|
appendParameters(method.parameterTypes)
|
||||||
|
},
|
||||||
|
methodClassPair
|
||||||
|
)
|
||||||
|
|
||||||
|
// Add strings contained in the method as the key.
|
||||||
|
method.implementation?.instructions?.forEach instructions@{ instruction ->
|
||||||
|
if (instruction.opcode != Opcode.CONST_STRING && instruction.opcode != Opcode.CONST_STRING_JUMBO)
|
||||||
|
return@instructions
|
||||||
|
|
||||||
|
val string = ((instruction as ReferenceInstruction).reference as StringReference).string
|
||||||
|
|
||||||
|
methodStringsLookupMap.add(string, methodClassPair)
|
||||||
|
}
|
||||||
|
|
||||||
|
// In the future, the class type could be added to the lookup map.
|
||||||
|
// This would require MethodFingerprint to be changed to include the class type.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the internal lookup maps created in [initializeLookupMaps]
|
||||||
|
*/
|
||||||
|
internal fun clearLookupMaps() {
|
||||||
|
methods.clear()
|
||||||
|
methodSignatureLookupMap.clear()
|
||||||
|
methodStringsLookupMap.clear()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Appends a string based on the parameter reference types of this method.
|
||||||
|
*/
|
||||||
|
internal fun StringBuilder.appendParameters(parameters: Iterable<CharSequence>) {
|
||||||
|
// Maximum parameters to use in the signature key.
|
||||||
|
// Some apps have methods with an incredible number of parameters (over 100 parameters have been seen).
|
||||||
|
// To keep the signature map from becoming needlessly bloated,
|
||||||
|
// group together in the same map entry all methods with the same access/return and 5 or more parameters.
|
||||||
|
// The value of 5 was chosen based on local performance testing and is not set in stone.
|
||||||
|
val maxSignatureParameters = 5
|
||||||
|
// Must append a unique value before the parameters to distinguish this key includes the parameters.
|
||||||
|
// If this is not appended, then methods with no parameters
|
||||||
|
// will collide with different keys that specify access/return but omit the parameters.
|
||||||
|
append("p:")
|
||||||
|
parameters.forEachIndexed { index, parameter ->
|
||||||
|
if (index >= maxSignatureParameters) return
|
||||||
|
append(parameter.first())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,94 @@
|
|||||||
|
package app.revanced.patcher.fingerprint
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.util.proxy.ClassProxy
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
|
import com.android.tools.smali.dexlib2.util.MethodUtil
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the result of a [MethodFingerprintResult].
|
||||||
|
*
|
||||||
|
* @param method The matching method.
|
||||||
|
* @param classDef The [ClassDef] that contains the matching [method].
|
||||||
|
* @param scanResult The result of scanning for the [MethodFingerprint].
|
||||||
|
* @param context The [BytecodeContext] this [MethodFingerprintResult] is attached to, to create proxies.
|
||||||
|
*/
|
||||||
|
@Suppress("MemberVisibilityCanBePrivate")
|
||||||
|
class MethodFingerprintResult(
|
||||||
|
val method: Method,
|
||||||
|
val classDef: ClassDef,
|
||||||
|
val scanResult: MethodFingerprintScanResult,
|
||||||
|
internal val context: BytecodeContext
|
||||||
|
) {
|
||||||
|
/**
|
||||||
|
* Returns a mutable clone of [classDef]
|
||||||
|
*
|
||||||
|
* Please note, this method allocates a [ClassProxy].
|
||||||
|
* Use [classDef] where possible.
|
||||||
|
*/
|
||||||
|
@Suppress("MemberVisibilityCanBePrivate")
|
||||||
|
val mutableClass by lazy { context.proxy(classDef).mutableClass }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a mutable clone of [method]
|
||||||
|
*
|
||||||
|
* Please note, this method allocates a [ClassProxy].
|
||||||
|
* Use [method] where possible.
|
||||||
|
*/
|
||||||
|
val mutableMethod by lazy {
|
||||||
|
mutableClass.methods.first {
|
||||||
|
MethodUtil.methodSignaturesMatch(it, this.method)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The result of scanning on the [MethodFingerprint].
|
||||||
|
* @param patternScanResult The result of the pattern scan.
|
||||||
|
* @param stringsScanResult The result of the string scan.
|
||||||
|
*/
|
||||||
|
class MethodFingerprintScanResult(
|
||||||
|
val patternScanResult: PatternScanResult?,
|
||||||
|
val stringsScanResult: StringsScanResult?
|
||||||
|
) {
|
||||||
|
/**
|
||||||
|
* The result of scanning strings on the [MethodFingerprint].
|
||||||
|
* @param matches The list of strings that were matched.
|
||||||
|
*/
|
||||||
|
class StringsScanResult(val matches: List<StringMatch>) {
|
||||||
|
/**
|
||||||
|
* Represents a match for a string at an index.
|
||||||
|
* @param string The string that was matched.
|
||||||
|
* @param index The index of the string.
|
||||||
|
*/
|
||||||
|
class StringMatch(val string: String, val index: Int)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The result of a pattern scan.
|
||||||
|
* @param startIndex The start index of the instructions where to which this pattern matches.
|
||||||
|
* @param endIndex The end index of the instructions where to which this pattern matches.
|
||||||
|
* @param warnings A list of warnings considering this [PatternScanResult].
|
||||||
|
*/
|
||||||
|
class PatternScanResult(
|
||||||
|
val startIndex: Int,
|
||||||
|
val endIndex: Int,
|
||||||
|
var warnings: List<Warning>? = null
|
||||||
|
) {
|
||||||
|
/**
|
||||||
|
* Represents warnings of the pattern scan.
|
||||||
|
* @param correctOpcode The opcode the instruction list has.
|
||||||
|
* @param wrongOpcode The opcode the pattern list of the signature currently has.
|
||||||
|
* @param instructionIndex The index of the opcode relative to the instruction list.
|
||||||
|
* @param patternIndex The index of the opcode relative to the pattern list from the signature.
|
||||||
|
*/
|
||||||
|
class Warning(
|
||||||
|
val correctOpcode: Opcode,
|
||||||
|
val wrongOpcode: Opcode,
|
||||||
|
val instructionIndex: Int,
|
||||||
|
val patternIndex: Int,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patcher.fingerprint.method.annotation
|
package app.revanced.patcher.fingerprint.annotation
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotations to scan a pattern [MethodFingerprint] with fuzzy algorithm.
|
* Annotations to scan a pattern [MethodFingerprint] with fuzzy algorithm.
|
File diff suppressed because it is too large
Load Diff
@@ -1,9 +0,0 @@
|
|||||||
package app.revanced.patcher.logging
|
|
||||||
|
|
||||||
@Deprecated("This will be removed in a future release")
|
|
||||||
interface Logger {
|
|
||||||
fun error(msg: String) {}
|
|
||||||
fun warn(msg: String) {}
|
|
||||||
fun info(msg: String) {}
|
|
||||||
fun trace(msg: String) {}
|
|
||||||
}
|
|
@@ -1,6 +0,0 @@
|
|||||||
package app.revanced.patcher.logging.impl
|
|
||||||
|
|
||||||
import app.revanced.patcher.logging.Logger
|
|
||||||
|
|
||||||
@Deprecated("This will be removed in a future release")
|
|
||||||
object NopLogger : Logger
|
|
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patcher.patch
|
package app.revanced.patcher.patch
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A ReVanced [Patch] that works on [BytecodeContext].
|
* A ReVanced [Patch] that works on [BytecodeContext].
|
||||||
|
@@ -65,7 +65,8 @@ sealed class Patch<out T : Context<*>> {
|
|||||||
name = annotation.name.ifEmpty { null }
|
name = annotation.name.ifEmpty { null }
|
||||||
description = annotation.description.ifEmpty { null }
|
description = annotation.description.ifEmpty { null }
|
||||||
compatiblePackages = annotation.compatiblePackages
|
compatiblePackages = annotation.compatiblePackages
|
||||||
.map { CompatiblePackage(it.name, it.versions.toSet()) }.toSet()
|
.map { CompatiblePackage(it.name, it.versions.toSet().ifEmpty { null }) }
|
||||||
|
.toSet().ifEmpty { null }
|
||||||
dependencies = annotation.dependencies.toSet().ifEmpty { null }
|
dependencies = annotation.dependencies.toSet().ifEmpty { null }
|
||||||
use = annotation.use
|
use = annotation.use
|
||||||
requiresIntegrations = annotation.requiresIntegrations
|
requiresIntegrations = annotation.requiresIntegrations
|
||||||
|
@@ -8,10 +8,11 @@ import kotlin.reflect.KProperty
|
|||||||
*
|
*
|
||||||
* @param key The identifier.
|
* @param key The identifier.
|
||||||
* @param default The default value.
|
* @param default The default value.
|
||||||
* @param values The set of guaranteed valid values.
|
* @param values The set of guaranteed valid values identified by their string representation.
|
||||||
* @param title The title.
|
* @param title The title.
|
||||||
* @param description A description.
|
* @param description A description.
|
||||||
* @param required Whether the option is required.
|
* @param required Whether the option is required.
|
||||||
|
* @param valueType The type of the option value (to handle type erasure).
|
||||||
* @param validator The function to validate the option value.
|
* @param validator The function to validate the option value.
|
||||||
* @param T The value type of the option.
|
* @param T The value type of the option.
|
||||||
*/
|
*/
|
||||||
@@ -19,10 +20,11 @@ import kotlin.reflect.KProperty
|
|||||||
open class PatchOption<T>(
|
open class PatchOption<T>(
|
||||||
val key: String,
|
val key: String,
|
||||||
val default: T?,
|
val default: T?,
|
||||||
val values: Set<T>?,
|
val values: Map<String, T?>?,
|
||||||
val title: String?,
|
val title: String?,
|
||||||
val description: String?,
|
val description: String?,
|
||||||
val required: Boolean,
|
val required: Boolean,
|
||||||
|
val valueType: String,
|
||||||
val validator: PatchOption<T>.(T?) -> Boolean
|
val validator: PatchOption<T>.(T?) -> Boolean
|
||||||
) {
|
) {
|
||||||
/**
|
/**
|
||||||
@@ -105,12 +107,14 @@ open class PatchOption<T>(
|
|||||||
fun <P : Patch<*>> P.stringPatchOption(
|
fun <P : Patch<*>> P.stringPatchOption(
|
||||||
key: String,
|
key: String,
|
||||||
default: String? = null,
|
default: String? = null,
|
||||||
values: Set<String>? = null,
|
values: Map<String, String?>? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
description: String? = null,
|
description: String? = null,
|
||||||
required: Boolean = false,
|
required: Boolean = false,
|
||||||
validator: PatchOption<String>.(String?) -> Boolean = { true }
|
validator: PatchOption<String>.(String?) -> Boolean = { true }
|
||||||
) = PatchOption(key, default, values, title, description, required, validator).also { registerOption(it) }
|
) = PatchOption(
|
||||||
|
key, default, values, title, description, required, "String", validator
|
||||||
|
).also { registerOption(it) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new [PatchOption] with an integer value and add it to the current [Patch].
|
* Create a new [PatchOption] with an integer value and add it to the current [Patch].
|
||||||
@@ -130,12 +134,14 @@ open class PatchOption<T>(
|
|||||||
fun <P : Patch<*>> P.intPatchOption(
|
fun <P : Patch<*>> P.intPatchOption(
|
||||||
key: String,
|
key: String,
|
||||||
default: Int? = null,
|
default: Int? = null,
|
||||||
values: Set<Int>? = null,
|
values: Map<String, Int?>? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
description: String? = null,
|
description: String? = null,
|
||||||
required: Boolean = false,
|
required: Boolean = false,
|
||||||
validator: PatchOption<Int?>.(Int?) -> Boolean = { true }
|
validator: PatchOption<Int?>.(Int?) -> Boolean = { true }
|
||||||
) = PatchOption(key, default, values, title, description, required, validator).also { registerOption(it) }
|
) = PatchOption(
|
||||||
|
key, default, values, title, description, required, "Int", validator
|
||||||
|
).also { registerOption(it) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new [PatchOption] with a boolean value and add it to the current [Patch].
|
* Create a new [PatchOption] with a boolean value and add it to the current [Patch].
|
||||||
@@ -155,12 +161,14 @@ open class PatchOption<T>(
|
|||||||
fun <P : Patch<*>> P.booleanPatchOption(
|
fun <P : Patch<*>> P.booleanPatchOption(
|
||||||
key: String,
|
key: String,
|
||||||
default: Boolean? = null,
|
default: Boolean? = null,
|
||||||
values: Set<Boolean>? = null,
|
values: Map<String, Boolean?>? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
description: String? = null,
|
description: String? = null,
|
||||||
required: Boolean = false,
|
required: Boolean = false,
|
||||||
validator: PatchOption<Boolean?>.(Boolean?) -> Boolean = { true }
|
validator: PatchOption<Boolean?>.(Boolean?) -> Boolean = { true }
|
||||||
) = PatchOption(key, default, values, title, description, required, validator).also { registerOption(it) }
|
) = PatchOption(key, default, values, title, description, required, "Boolean", validator).also {
|
||||||
|
registerOption(it)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new [PatchOption] with a float value and add it to the current [Patch].
|
* Create a new [PatchOption] with a float value and add it to the current [Patch].
|
||||||
@@ -180,12 +188,14 @@ open class PatchOption<T>(
|
|||||||
fun <P : Patch<*>> P.floatPatchOption(
|
fun <P : Patch<*>> P.floatPatchOption(
|
||||||
key: String,
|
key: String,
|
||||||
default: Float? = null,
|
default: Float? = null,
|
||||||
values: Set<Float>? = null,
|
values: Map<String, Float?>? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
description: String? = null,
|
description: String? = null,
|
||||||
required: Boolean = false,
|
required: Boolean = false,
|
||||||
validator: PatchOption<Float?>.(Float?) -> Boolean = { true }
|
validator: PatchOption<Float?>.(Float?) -> Boolean = { true }
|
||||||
) = PatchOption(key, default, values, title, description, required, validator).also { registerOption(it) }
|
) = PatchOption(
|
||||||
|
key, default, values, title, description, required, "Float", validator
|
||||||
|
).also { registerOption(it) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new [PatchOption] with a long value and add it to the current [Patch].
|
* Create a new [PatchOption] with a long value and add it to the current [Patch].
|
||||||
@@ -205,12 +215,14 @@ open class PatchOption<T>(
|
|||||||
fun <P : Patch<*>> P.longPatchOption(
|
fun <P : Patch<*>> P.longPatchOption(
|
||||||
key: String,
|
key: String,
|
||||||
default: Long? = null,
|
default: Long? = null,
|
||||||
values: Set<Long>? = null,
|
values: Map<String, Long?>? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
description: String? = null,
|
description: String? = null,
|
||||||
required: Boolean = false,
|
required: Boolean = false,
|
||||||
validator: PatchOption<Long?>.(Long?) -> Boolean = { true }
|
validator: PatchOption<Long?>.(Long?) -> Boolean = { true }
|
||||||
) = PatchOption(key, default, values, title, description, required, validator).also { registerOption(it) }
|
) = PatchOption(
|
||||||
|
key, default, values, title, description, required, "Long", validator
|
||||||
|
).also { registerOption(it) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new [PatchOption] with a string array value and add it to the current [Patch].
|
* Create a new [PatchOption] with a string array value and add it to the current [Patch].
|
||||||
@@ -230,12 +242,14 @@ open class PatchOption<T>(
|
|||||||
fun <P : Patch<*>> P.stringArrayPatchOption(
|
fun <P : Patch<*>> P.stringArrayPatchOption(
|
||||||
key: String,
|
key: String,
|
||||||
default: Array<String>? = null,
|
default: Array<String>? = null,
|
||||||
values: Set<Array<String>>? = null,
|
values: Map<String, Array<String>?>? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
description: String? = null,
|
description: String? = null,
|
||||||
required: Boolean = false,
|
required: Boolean = false,
|
||||||
validator: PatchOption<Array<String>?>.(Array<String>?) -> Boolean = { true }
|
validator: PatchOption<Array<String>?>.(Array<String>?) -> Boolean = { true }
|
||||||
) = PatchOption(key, default, values, title, description, required, validator).also { registerOption(it) }
|
) = PatchOption(
|
||||||
|
key, default, values, title, description, required, "StringArray", validator
|
||||||
|
).also { registerOption(it) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new [PatchOption] with an integer array value and add it to the current [Patch].
|
* Create a new [PatchOption] with an integer array value and add it to the current [Patch].
|
||||||
@@ -255,12 +269,14 @@ open class PatchOption<T>(
|
|||||||
fun <P : Patch<*>> P.intArrayPatchOption(
|
fun <P : Patch<*>> P.intArrayPatchOption(
|
||||||
key: String,
|
key: String,
|
||||||
default: Array<Int>? = null,
|
default: Array<Int>? = null,
|
||||||
values: Set<Array<Int>>? = null,
|
values: Map<String, Array<Int>?>? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
description: String? = null,
|
description: String? = null,
|
||||||
required: Boolean = false,
|
required: Boolean = false,
|
||||||
validator: PatchOption<Array<Int>?>.(Array<Int>?) -> Boolean = { true }
|
validator: PatchOption<Array<Int>?>.(Array<Int>?) -> Boolean = { true }
|
||||||
) = PatchOption(key, default, values, title, description, required, validator).also { registerOption(it) }
|
) = PatchOption(
|
||||||
|
key, default, values, title, description, required, "IntArray", validator
|
||||||
|
).also { registerOption(it) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new [PatchOption] with a boolean array value and add it to the current [Patch].
|
* Create a new [PatchOption] with a boolean array value and add it to the current [Patch].
|
||||||
@@ -280,12 +296,14 @@ open class PatchOption<T>(
|
|||||||
fun <P : Patch<*>> P.booleanArrayPatchOption(
|
fun <P : Patch<*>> P.booleanArrayPatchOption(
|
||||||
key: String,
|
key: String,
|
||||||
default: Array<Boolean>? = null,
|
default: Array<Boolean>? = null,
|
||||||
values: Set<Array<Boolean>>? = null,
|
values: Map<String, Array<Boolean>?>? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
description: String? = null,
|
description: String? = null,
|
||||||
required: Boolean = false,
|
required: Boolean = false,
|
||||||
validator: PatchOption<Array<Boolean>?>.(Array<Boolean>?) -> Boolean = { true }
|
validator: PatchOption<Array<Boolean>?>.(Array<Boolean>?) -> Boolean = { true }
|
||||||
) = PatchOption(key, default, values, title, description, required, validator).also { registerOption(it) }
|
) = PatchOption(
|
||||||
|
key, default, values, title, description, required, "BooleanArray", validator
|
||||||
|
).also { registerOption(it) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new [PatchOption] with a float array value and add it to the current [Patch].
|
* Create a new [PatchOption] with a float array value and add it to the current [Patch].
|
||||||
@@ -305,12 +323,14 @@ open class PatchOption<T>(
|
|||||||
fun <P : Patch<*>> P.floatArrayPatchOption(
|
fun <P : Patch<*>> P.floatArrayPatchOption(
|
||||||
key: String,
|
key: String,
|
||||||
default: Array<Float>? = null,
|
default: Array<Float>? = null,
|
||||||
values: Set<Array<Float>>? = null,
|
values: Map<String, Array<Float>?>? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
description: String? = null,
|
description: String? = null,
|
||||||
required: Boolean = false,
|
required: Boolean = false,
|
||||||
validator: PatchOption<Array<Float>?>.(Array<Float>?) -> Boolean = { true }
|
validator: PatchOption<Array<Float>?>.(Array<Float>?) -> Boolean = { true }
|
||||||
) = PatchOption(key, default, values, title, description, required, validator).also { registerOption(it) }
|
) = PatchOption(
|
||||||
|
key, default, values, title, description, required, "FloatArray", validator
|
||||||
|
).also { registerOption(it) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new [PatchOption] with a long array value and add it to the current [Patch].
|
* Create a new [PatchOption] with a long array value and add it to the current [Patch].
|
||||||
@@ -330,12 +350,14 @@ open class PatchOption<T>(
|
|||||||
fun <P : Patch<*>> P.longArrayPatchOption(
|
fun <P : Patch<*>> P.longArrayPatchOption(
|
||||||
key: String,
|
key: String,
|
||||||
default: Array<Long>? = null,
|
default: Array<Long>? = null,
|
||||||
values: Set<Array<Long>>? = null,
|
values: Map<String, Array<Long>?>? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
description: String? = null,
|
description: String? = null,
|
||||||
required: Boolean = false,
|
required: Boolean = false,
|
||||||
validator: PatchOption<Array<Long>?>.(Array<Long>?) -> Boolean = { true }
|
validator: PatchOption<Array<Long>?>.(Array<Long>?) -> Boolean = { true }
|
||||||
) = PatchOption(key, default, values, title, description, required, validator).also { registerOption(it) }
|
) = PatchOption(
|
||||||
|
key, default, values, title, description, required, "LongArray", validator
|
||||||
|
).also { registerOption(it) }
|
||||||
|
|
||||||
private fun <P : Patch<*>> P.registerOption(option: PatchOption<*>) = option.also { options.register(it) }
|
private fun <P : Patch<*>> P.registerOption(option: PatchOption<*>) = option.also { options.register(it) }
|
||||||
}
|
}
|
||||||
|
@@ -62,7 +62,7 @@ internal class PatchOptionsTest {
|
|||||||
@Test
|
@Test
|
||||||
fun `should allow setting value from values`() =
|
fun `should allow setting value from values`() =
|
||||||
with(OptionsTestPatch.options["choices"] as PatchOption<String>) {
|
with(OptionsTestPatch.options["choices"] as PatchOption<String>) {
|
||||||
value = values!!.last()
|
value = values!!.values.last()
|
||||||
assertTrue(value == "valid")
|
assertTrue(value == "valid")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,17 +85,42 @@ internal class PatchOptionsTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `option types should be known`() =
|
||||||
|
assertTrue(OptionsTestPatch.options["array"].valueType == "StringArray")
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `getting default value should work`() =
|
fun `getting default value should work`() =
|
||||||
assertDoesNotThrow { assertNull(OptionsTestPatch.resettableOption.default) }
|
assertDoesNotThrow { assertNull(OptionsTestPatch.resettableOption.default) }
|
||||||
|
|
||||||
private object OptionsTestPatch : BytecodePatch() {
|
private object OptionsTestPatch : BytecodePatch() {
|
||||||
var booleanOption by booleanPatchOption("bool", true)
|
var booleanOption by booleanPatchOption(
|
||||||
var requiredStringOption by stringPatchOption("required", "default", required = true)
|
"bool",
|
||||||
var stringArrayOption = stringArrayPatchOption("array", arrayOf("1", "2"))
|
true
|
||||||
var stringOptionWithChoices by stringPatchOption("choices", "value", values = setOf("valid"))
|
)
|
||||||
var validatedOption by stringPatchOption("validated", "default") { it == "valid" }
|
var requiredStringOption by stringPatchOption(
|
||||||
var resettableOption = stringPatchOption("resettable", null, required = true)
|
"required",
|
||||||
|
"default",
|
||||||
|
required = true
|
||||||
|
)
|
||||||
|
var stringArrayOption = stringArrayPatchOption(
|
||||||
|
"array",
|
||||||
|
arrayOf("1", "2")
|
||||||
|
)
|
||||||
|
var stringOptionWithChoices by stringPatchOption(
|
||||||
|
"choices",
|
||||||
|
"value",
|
||||||
|
values = mapOf("Valid option value" to "valid")
|
||||||
|
)
|
||||||
|
var validatedOption by stringPatchOption(
|
||||||
|
|
||||||
|
"validated",
|
||||||
|
"default"
|
||||||
|
) { it == "valid" }
|
||||||
|
var resettableOption = stringPatchOption(
|
||||||
|
"resettable", null,
|
||||||
|
required = true
|
||||||
|
)
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {}
|
override fun execute(context: BytecodeContext) {}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patcher.patch.usage
|
package app.revanced.patcher.patch.usage
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user