update to renamed api

This commit is contained in:
oSumAtrIX 2026-02-04 15:50:40 +01:00
parent b57dbaf1b1
commit 9c69244323
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4
236 changed files with 617 additions and 618 deletions

View file

@ -1,13 +1,13 @@
package app.revanced.patches.amazon
import app.revanced.patcher.accessFlags
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.deepLinkingMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.deepLinkingMethod by gettingFirstMethodDeclaratively(
"https://www.",
"android.intent.action.VIEW"
) {

View file

@ -1,7 +1,7 @@
package app.revanced.patches.angulus.ads
import app.revanced.patcher.accessFlags
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
@ -14,7 +14,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
// This targets a method that returns the daily measurement count.
// This method is used to determine if the user has reached the daily limit of measurements.
internal val BytecodePatchContext.getDailyMeasurementCountMethod by gettingFirstMutableMethodDeclaratively("dailyMeasurementCount") {
internal val BytecodePatchContext.getDailyMeasurementCountMethod by gettingFirstMethodDeclaratively("dailyMeasurementCount") {
accessFlags(AccessFlags.PRIVATE)
returnType("I")
}

View file

@ -1,9 +1,9 @@
package app.revanced.patches.bandcamp.limitations
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.handlePlaybackLimitsMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.handlePlaybackLimitsMethod by gettingFirstMethodDeclaratively(
"track_id",
"play_count"
)

View file

@ -1,11 +1,11 @@
package app.revanced.patches.cieid.restrictions.root
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.checkRootMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.checkRootMethod by gettingFirstMethodDeclaratively {
name("onResume")
definingClass("Lit/ipzs/cieid/BaseActivity;")
}

View file

@ -1,24 +1,24 @@
package app.revanced.patches.com.sbs.ondemand.tv
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
val BytecodePatchContext.shouldShowAdvertisingTVMethod by gettingFirstMutableMethodDeclaratively {
val BytecodePatchContext.shouldShowAdvertisingTVMethod by gettingFirstMethodDeclaratively {
name("getShouldShowAdvertisingTV")
definingClass("Lcom/sbs/ondemand/common/InMemoryStorage;")
returnType("Z")
}
internal val BytecodePatchContext.shouldShowPauseAdMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.shouldShowPauseAdMethod by gettingFirstMethodDeclaratively {
name("shouldShowPauseAd")
definingClass("Lcom/sbs/ondemand/player/viewmodels/PauseAdController;")
returnType("Z")
}
internal val BytecodePatchContext.requestAdStreamMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.requestAdStreamMethod by gettingFirstMethodDeclaratively {
name("requestAdStream\$player_googleStoreTvRelease")
definingClass("Lcom/sbs/ondemand/player/viewmodels/AdsController;")
returnType("V")

View file

@ -4,11 +4,11 @@ import app.revanced.patcher.*
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.userStateSwitchMethod by gettingFirstMutableMethodDeclaratively("key.user.state", "NA") {
internal val BytecodePatchContext.userStateSwitchMethod by gettingFirstMethodDeclaratively("key.user.state", "NA") {
opcodes(Opcode.SPARSE_SWITCH)
}
internal val BytecodePatchContext.cb11ConstructorMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.cb11ConstructorMethod by gettingFirstMethodDeclaratively {
definingClass { endsWith("CB11Details;") }
parameterTypes(
"Ljava/lang/String;",
@ -24,7 +24,7 @@ internal val BytecodePatchContext.cb11ConstructorMethod by gettingFirstMutableMe
)
}
internal val BytecodePatchContext.getBottomBarMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getBottomBarMethod by gettingFirstMethodDeclaratively {
name("getBottombar")
definingClass { endsWith("HomeMenu;") }
}

View file

@ -1,18 +1,18 @@
package app.revanced.patches.disneyplus
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.insertionGetPointsMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.insertionGetPointsMethod by gettingFirstMethodDeclaratively {
name("getPoints")
definingClass("Lcom/dss/sdk/internal/media/Insertion;")
returnType("Ljava/util/List")
}
internal val BytecodePatchContext.insertionGetRangesMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.insertionGetRangesMethod by gettingFirstMethodDeclaratively {
name("getRanges")
definingClass("Lcom/dss/sdk/internal/media/Insertion;")
returnType("Ljava/util/List")

View file

@ -13,7 +13,7 @@ internal val ClassDef.initializeMonetizationDebugSettingsMethodMatch by ClassDef
opcodes(Opcode.IPUT_BOOLEAN)
}
internal val BytecodePatchContext.monetizationDebugSettingsToStringMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.monetizationDebugSettingsToStringMethod by gettingFirstMethodDeclaratively {
name("toString")
instructions(string("MonetizationDebugSettings(", String::contains))
}

View file

@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.ClassDef
internal val BytecodePatchContext.debugCategoryAllowOnReleaseBuildsMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.debugCategoryAllowOnReleaseBuildsMethod by gettingFirstMethodDeclaratively {
name("getAllowOnReleaseBuilds")
definingClass("Lcom/duolingo/debug/DebugCategory;")
returnType("Z")
@ -19,7 +19,7 @@ internal val ClassDef.buildConfigProviderConstructorMethodMatch by ClassDefCompo
opcodes(Opcode.CONST_4)
}
internal val BytecodePatchContext.buildConfigProviderToStringMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.buildConfigProviderToStringMethod by gettingFirstMethodDeclaratively {
name("toString")
parameterTypes()
returnType("Ljava/lang/String;")

View file

@ -12,7 +12,7 @@ internal val ClassDef.initializeEnergyConfigMethodMatch by ClassDefComposing.com
}
// Class name currently is not obfuscated, but it may be in the future.
internal val BytecodePatchContext.energyConfigToStringMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.energyConfigToStringMethod by gettingFirstMethodDeclaratively {
name("toString")
parameterTypes()
returnType("Ljava/lang/String;")

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.baseModelMapperMethod by gettingFirstMethodDeclaratively {
internal val BytecodePatchContext.baseModelMapperMethod by gettingFirstImmutableMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returnType("Lcom/facebook/graphql/modelutil/BaseModelWithTree;")
parameterTypes("Ljava/lang/Class", "I", "I")
@ -17,7 +17,7 @@ internal val BytecodePatchContext.baseModelMapperMethod by gettingFirstMethodDec
Opcode.IF_EQ,
)
}
internal val BytecodePatchContext.getSponsoredDataModelTemplateMethod by gettingFirstMethodDeclaratively {
internal val BytecodePatchContext.getSponsoredDataModelTemplateMethod by gettingFirstImmutableMethodDeclaratively {
definingClass("Lcom/facebook/graphql/model/GraphQLFBMultiAdsFeedUnit;")
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returnType("L")

View file

@ -12,7 +12,7 @@ internal val BytecodePatchContext.fetchMoreAdsMethod by runMethod(
fieldValue = $$"AdBucketDataSourceUtil$attemptFetchMoreAds$1",
)
internal fun runMethod(fieldValue: String) = gettingFirstMutableMethodDeclaratively {
internal fun runMethod(fieldValue: String) = gettingFirstMethodDeclaratively {
name("run")
returnType("V")
parameterTypes()

View file

@ -1,7 +1,7 @@
package app.revanced.patches.finanzonline.detection.bootloader
import app.revanced.patcher.accessFlags
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.opcodes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
@ -9,7 +9,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1)
internal val BytecodePatchContext.bootStateMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.bootStateMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC)
returnType("Z")
opcodes(
@ -34,7 +34,7 @@ internal val BytecodePatchContext.bootStateMethod by gettingFirstMutableMethodDe
}
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1)
internal val BytecodePatchContext.createKeyMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.createKeyMethod by gettingFirstMethodDeclaratively(
"attestation",
"SHA-256",
"random",

View file

@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1)
internal val BytecodePatchContext.rootDetectionMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.rootDetectionMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
returnType("L")
parameterTypes("L")

View file

@ -1,11 +1,11 @@
package app.revanced.patches.googlenews.misc.gms
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.magazinesActivityOnCreateMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.magazinesActivityOnCreateMethod by gettingFirstMethodDeclaratively {
name("onCreate")
definingClass { endsWith("/StartActivity;") }
}

View file

@ -1,9 +1,9 @@
package app.revanced.patches.googlephotos.misc.backup
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.isDCIMFolderBackupControlMethod by gettingFirstMutableMethodDeclaratively("/dcim", "/mars_files/") {
internal val BytecodePatchContext.isDCIMFolderBackupControlMethod by gettingFirstMethodDeclaratively("/dcim", "/mars_files/") {
returnType("Z")
}

View file

@ -1,6 +1,6 @@
package app.revanced.patches.googlephotos.misc.features
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.initializeFeaturesEnumMethod by gettingFirstMutableMethodDeclaratively("com.google.android.apps.photos.NEXUS_PRELOAD")
internal val BytecodePatchContext.initializeFeaturesEnumMethod by gettingFirstMethodDeclaratively("com.google.android.apps.photos.NEXUS_PRELOAD")

View file

@ -1,11 +1,11 @@
package app.revanced.patches.googlephotos.misc.gms
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.homeActivityOnCreateMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.homeActivityOnCreateMethod by gettingFirstMethodDeclaratively {
name("onCreate")
definingClass { endsWith("/HomeActivity;") }
}

View file

@ -1,11 +1,11 @@
package app.revanced.patches.hexeditor.ad
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.primaryAdsMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.primaryAdsMethod by gettingFirstMethodDeclaratively {
name("isAdsDisabled")
definingClass { endsWith("PreferencesHelper;") }
}

View file

@ -1,11 +1,11 @@
package app.revanced.patches.iconpackstudio.misc.pro
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.checkProMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.checkProMethod by gettingFirstMethodDeclaratively {
definingClass { endsWith("IPSPurchaseRepository;") }
returnType("Z")
}

View file

@ -4,14 +4,14 @@ import app.revanced.patcher.*
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.isDeviceBootloaderOpenMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.isDeviceBootloaderOpenMethod by gettingFirstMethodDeclaratively {
name("isDeviceBootloaderOpen")
definingClass { endsWith("/DeviceIntegrityCheckProviderImpl;") }
accessFlags(AccessFlags.PUBLIC)
returnType("Ljava/lang/Object;")
}
internal val BytecodePatchContext.isDeviceRootedMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.isDeviceRootedMethod by gettingFirstMethodDeclaratively {
name("isDeviceRooted")
definingClass { endsWith("/DeviceIntegrityCheckProviderImpl;") }
accessFlags(AccessFlags.PUBLIC)

View file

@ -4,7 +4,7 @@ import app.revanced.patcher.*
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.spoofSignatureMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.spoofSignatureMethod by gettingFirstMethodDeclaratively {
name("getPubKey")
definingClass { endsWith("/SL2Step1Task;") }
accessFlags(AccessFlags.PRIVATE)

View file

@ -1,10 +1,10 @@
package app.revanced.patches.inshorts.ad
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.inshortsAdsMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.inshortsAdsMethod by gettingFirstMethodDeclaratively(
"GoogleAdLoader", "exception in requestAd"
) {
returnType("V")

View file

@ -1,12 +1,12 @@
package app.revanced.patches.instagram.feed
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.mainFeedRequestClassMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.mainFeedRequestClassMethod by gettingFirstMethodDeclaratively(
"Request{mReason=", ", mInstanceNumber="
)
internal val BytecodePatchContext.mainFeedHeaderMapFinderMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.mainFeedHeaderMapFinderMethod by gettingFirstMethodDeclaratively(
"pagination_source", "FEED_REQUEST_SENT"
)

View file

@ -4,7 +4,7 @@ import app.revanced.patcher.classDef
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.fieldReference
import app.revanced.patcher.extensions.getInstruction
import app.revanced.patcher.firstMutableMethodDeclaratively
import app.revanced.patcher.firstMethodDeclaratively
import app.revanced.patcher.immutableClassDef
import app.revanced.patcher.name
import app.revanced.patcher.patch.bytecodePatch
@ -44,7 +44,7 @@ val limitFeedToFollowedProfilesPatch = bytecodePatch(
}
}
mainFeedRequestClassMethod.immutableClassDef.firstMutableMethodDeclaratively {
mainFeedRequestClassMethod.immutableClassDef.firstMethodDeclaratively {
name("<init>")
}.apply {
// Finds the instruction where the map is being initialized in the constructor

View file

@ -1,11 +1,11 @@
package app.revanced.patches.instagram.ghost.story
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.setMediaSeenHashmapMethod by gettingFirstMutableMethodDeclaratively("media/seen/") {
internal val BytecodePatchContext.setMediaSeenHashmapMethod by gettingFirstMethodDeclaratively("media/seen/") {
parameterTypes()
returnType("V")
}

View file

@ -4,13 +4,13 @@ import app.revanced.patcher.*
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.initializeNavigationButtonsListMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.initializeNavigationButtonsListMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
parameterTypes("Lcom/instagram/common/session/UserSession;", "Z")
returnType("Ljava/util/List;")
}
internal val BytecodePatchContext.navigationButtonsEnumMethod by gettingFirstMethodDeclaratively(
internal val BytecodePatchContext.navigationButtonsEnumMethod by gettingFirstImmutableMethodDeclaratively(
"FEED",
"fragment_feed",
"SEARCH",

View file

@ -1,7 +1,7 @@
package app.revanced.patches.instagram.hide.navigation
import app.revanced.patcher.extensions.getInstruction
import app.revanced.patcher.firstMutableMethodDeclaratively
import app.revanced.patcher.firstMethodDeclaratively
import app.revanced.patcher.immutableClassDef
import app.revanced.patcher.name
import app.revanced.patcher.patch.booleanOption
@ -75,7 +75,7 @@ val hideNavigationButtonsPatch = bytecodePatch(
// Get the field name which contains the name of the enum for the navigation button
// ("fragment_clips", "fragment_share", ...)
val enumNameField = navigationButtonsEnumMethod.immutableClassDef.firstMutableMethodDeclaratively {
val enumNameField = navigationButtonsEnumMethod.immutableClassDef.firstMethodDeclaratively {
name("<init>")
}.let { method ->
method.indexOfFirstInstructionOrThrow {

View file

@ -1,14 +1,14 @@
package app.revanced.patches.instagram.misc.removeBuildExpiredPopup
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.patch.BytecodePatchContext
internal const val MILLISECOND_IN_A_DAY_LITERAL = 0x5265c00L
internal val BytecodePatchContext.appUpdateLockoutBuilderMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.appUpdateLockoutBuilderMethod by gettingFirstMethodDeclaratively(
"android.hardware.sensor.hinge_angle",
) {
instructions(MILLISECOND_IN_A_DAY_LITERAL())

View file

@ -4,7 +4,7 @@ import app.revanced.patcher.*
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.getCustomShareDomainMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getCustomShareDomainMethod by gettingFirstMethodDeclaratively {
name("getCustomShareDomain")
definingClass(EXTENSION_CLASS_DESCRIPTOR)
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)

View file

@ -5,12 +5,12 @@ import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.iface.ClassDef
context(_: BytecodePatchContext)
internal fun ClassDef.getIsValidSignatureClassMethod() = firstMutableMethodDeclaratively(
internal fun ClassDef.getIsValidSignatureClassMethod() = firstMethodDeclaratively(
"The provider for uri '",
"' is not trusted: ",
)
internal val BytecodePatchContext.isValidSignatureMethodMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.isValidSignatureMethodMethod by gettingFirstMethodDeclaratively {
parameterTypes("L", "Z")
returnType("Z")
instructions(method("keySet"))

View file

@ -1,13 +1,13 @@
package app.revanced.patches.instagram.reels
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.clipsViewPagerImplGetViewAtIndexMethod by gettingFirstMutableMethodDeclaratively("ClipsViewPagerImpl_getViewAtIndex")
internal val BytecodePatchContext.clipsViewPagerImplGetViewAtIndexMethod by gettingFirstMethodDeclaratively("ClipsViewPagerImpl_getViewAtIndex")
internal val BytecodePatchContext.clipsSwipeRefreshLayoutOnInterceptTouchEventMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.clipsSwipeRefreshLayoutOnInterceptTouchEventMethod by gettingFirstMethodDeclaratively {
parameterTypes("Landroid/view/MotionEvent;")
definingClass("Linstagram/features/clips/viewer/ui/ClipsSwipeRefreshLayout;")
}

View file

@ -1,12 +1,12 @@
package app.revanced.patches.instagram.story.flipping
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.onStoryTimeoutActionMethod by gettingFirstMutableMethodDeclaratively("userSession") {
internal val BytecodePatchContext.onStoryTimeoutActionMethod by gettingFirstMethodDeclaratively("userSession") {
parameterTypes("Ljava/lang/Object;")
returnType("V")
definingClass("Linstagram/features/stories/fragment/ReelViewerFragment;")

View file

@ -1,12 +1,12 @@
package app.revanced.patches.irplus.ad
import app.revanced.patcher.accessFlags
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.irplusAdsMethod by gettingFirstMutableMethodDeclaratively("TAGGED") {
internal val BytecodePatchContext.irplusAdsMethod by gettingFirstMethodDeclaratively("TAGGED") {
accessFlags(AccessFlags.PUBLIC, AccessFlags.CONSTRUCTOR)
parameterTypes("L", "Z")
}

View file

@ -1,11 +1,11 @@
package app.revanced.patches.kleinanzeigen.ads
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.getLibertyInitMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getLibertyInitMethod by gettingFirstMethodDeclaratively {
name("init")
definingClass { endsWith("/Liberty;") }
}

View file

@ -1,28 +1,28 @@
package app.revanced.patches.letterboxd.ads
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal const val admobHelperClassName = "Lcom/letterboxd/letterboxd/helpers/AdmobHelper;"
internal val BytecodePatchContext.admobHelperSetShowAdsMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.admobHelperSetShowAdsMethod by gettingFirstMethodDeclaratively {
name("setShowAds")
definingClass(admobHelperClassName)
}
internal val BytecodePatchContext.admobHelperShouldShowAdsMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.admobHelperShouldShowAdsMethod by gettingFirstMethodDeclaratively {
name("shouldShowAds")
definingClass(admobHelperClassName)
}
internal val BytecodePatchContext.filmFragmentShowAdsMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.filmFragmentShowAdsMethod by gettingFirstMethodDeclaratively {
name("showAds")
definingClass { endsWith("/FilmFragment;") }
}
internal val BytecodePatchContext.memberExtensionShowAdsMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.memberExtensionShowAdsMethod by gettingFirstMethodDeclaratively {
name("showAds")
definingClass { endsWith("/AMemberExtensionKt;") }
}

View file

@ -1,11 +1,11 @@
package app.revanced.patches.letterboxd.unlock.unlockAppIcons
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.getCanChangeAppIconMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getCanChangeAppIconMethod by gettingFirstMethodDeclaratively {
name("getCanChangeAppIcon")
definingClass { endsWith("SettingsAppIconFragment;") }
}

View file

@ -1,14 +1,14 @@
package app.revanced.patches.lightroom.misc.login
import app.revanced.patcher.accessFlags
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.opcodes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.isLoggedInMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.isLoggedInMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC, AccessFlags.FINAL)
returnType("Z")
opcodes(

View file

@ -1,14 +1,14 @@
package app.revanced.patches.lightroom.misc.premium
import app.revanced.patcher.accessFlags
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.opcodes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.hasPurchasedMethod by gettingFirstMutableMethodDeclaratively("isPurchaseDoneRecently = true, access platform profile present? = ") {
internal val BytecodePatchContext.hasPurchasedMethod by gettingFirstMethodDeclaratively("isPurchaseDoneRecently = true, access platform profile present? = ") {
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
returnType("Z")
opcodes(

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.licenseValidationMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.licenseValidationMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
returnType("Z")
parameterTypes("Landroid/content/Context;")

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.verifySignatureMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.verifySignatureMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
returnType("Z")
parameterTypes("Landroid/app/Activity;")

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.isFreeVersionMethod by gettingFirstMutableMethodDeclaratively("free") {
internal val BytecodePatchContext.isFreeVersionMethod by gettingFirstMethodDeclaratively("free") {
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
returnType("Ljava/lang/Boolean;")
parameterTypes("Landroid/content/Context;")

View file

@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.value.StringEncodedValue
internal val BytecodePatchContext.createInboxSubTabsMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.createInboxSubTabsMethod by gettingFirstMethodDeclaratively {
name("run")
returnType("V")
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
@ -23,7 +23,7 @@ internal val BytecodePatchContext.createInboxSubTabsMethod by gettingFirstMutabl
}
}
internal val BytecodePatchContext.loadInboxAdsMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.loadInboxAdsMethod by gettingFirstMethodDeclaratively(
"ads_load_begin",
"inbox_ads_fetch_start"
) {

View file

@ -1,11 +1,11 @@
package app.revanced.patches.messenger.layout
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.isFacebookButtonEnabledMethod by gettingFirstMutableMethodDeclaratively("FacebookButtonTabButtonImplementation") {
internal val BytecodePatchContext.isFacebookButtonEnabledMethod by gettingFirstMethodDeclaratively("FacebookButtonTabButtonImplementation") {
parameterTypes()
returnType("Z")
}

View file

@ -1,13 +1,13 @@
package app.revanced.patches.meta.ads
import app.revanced.patcher.accessFlags
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.adInjectorMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.adInjectorMethod by gettingFirstMethodDeclaratively(
"SponsoredContentController.insertItem",
) {
accessFlags(AccessFlags.PRIVATE)

View file

@ -2,12 +2,12 @@ package app.revanced.patches.mifitness.misc.login
import app.revanced.patcher.accessFlags
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.xiaomiAccountManagerConstructorMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.xiaomiAccountManagerConstructorMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PRIVATE, AccessFlags.CONSTRUCTOR)
parameterTypes("Landroid/content/Context;", "Z")
definingClass("Lcom/xiaomi/passport/accountmanager/XiaomiAccountManager;")

View file

@ -1,7 +1,7 @@
package app.revanced.patches.music.audio.exclusiveaudio
import app.revanced.patcher.accessFlags
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.opcodes
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
@ -9,7 +9,7 @@ import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.allowExclusiveAudioPlaybackMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.allowExclusiveAudioPlaybackMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returnType("Z")
parameterTypes()

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patches.music.shared.YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE
import app.revanced.patches.shared.misc.mapping.ResourceType
internal val BytecodePatchContext.cairoSplashAnimationConfigMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.cairoSplashAnimationConfigMethod by gettingFirstMethodDeclaratively {
name("onCreate")
returnType("V")
definingClass(YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE)

View file

@ -7,12 +7,12 @@ import app.revanced.util.literal
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.mediaRouteButtonMethod by gettingFirstMutableMethodDeclaratively("MediaRouteButton") {
internal val BytecodePatchContext.mediaRouteButtonMethod by gettingFirstMethodDeclaratively("MediaRouteButton") {
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
returnType("Z")
}
internal val BytecodePatchContext.playerOverlayChipMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.playerOverlayChipMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returnType("L")
instructions(playerOverlayChip())
@ -45,7 +45,7 @@ internal val BytecodePatchContext.historyMenuItemOfflineTabMethodMatch by compos
custom { match(instructions) }
}
internal val BytecodePatchContext.searchActionViewMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.searchActionViewMethod by gettingFirstMethodDeclaratively {
definingClass { endsWith("/SearchActionProvider;") }
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returnType("Landroid/view/View;")
@ -53,7 +53,7 @@ internal val BytecodePatchContext.searchActionViewMethod by gettingFirstMutableM
literal { searchButton }
}
internal val BytecodePatchContext.topBarMenuItemImageViewMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.topBarMenuItemImageViewMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returnType("Landroid/view/View;")
parameterTypes()

View file

@ -3,7 +3,7 @@ package app.revanced.patches.music.layout.buttons
import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.getInstruction
import app.revanced.patcher.firstMutableMethod
import app.revanced.patcher.firstMethod
import app.revanced.patcher.immutableClassDef
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.patches.all.misc.resources.addResources
@ -110,7 +110,7 @@ val hideButtonsPatch = bytecodePatch(
}
// Region for hide cast button in the player.
mediaRouteButtonMethod.immutableClassDef.firstMutableMethod {
mediaRouteButtonMethod.immutableClassDef.firstMethod {
name == "setVisibility"
}.addInstructions(
0,

View file

@ -4,7 +4,7 @@ package app.revanced.patches.music.layout.miniplayercolor
import app.revanced.patcher.accessFlags
import app.revanced.patcher.extensions.getInstruction
import app.revanced.patcher.firstMutableMethodDeclaratively
import app.revanced.patcher.firstMethodDeclaratively
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.patcher.returnType
@ -78,7 +78,7 @@ val changeMiniplayerColorPatch = bytecodePatch(
val colorMathPlayerIPutReference = miniPlayerConstructorMethodMatch.immutableMethod
.getInstruction<ReferenceInstruction>(iPutIndex).reference
miniPlayerConstructorMethodMatch.immutableClassDef.firstMutableMethodDeclaratively {
miniPlayerConstructorMethodMatch.immutableClassDef.firstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returnType("V")
parameterTypes(

View file

@ -19,7 +19,7 @@ internal val BytecodePatchContext.hideGetPremiumMethodMatch by composingFirstMet
)
}
internal val BytecodePatchContext.membershipSettingsMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.membershipSettingsMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returnType("Ljava/lang/CharSequence;")
opcodes(

View file

@ -1,7 +1,7 @@
package app.revanced.patches.music.misc.androidauto
import app.revanced.patcher.firstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.firstMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.parameterTypes
@ -9,7 +9,7 @@ import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.iface.ClassDef
internal val BytecodePatchContext.checkCertificateMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.checkCertificateMethod by gettingFirstMethodDeclaratively(
"X509",
) {
returnType("Z")
@ -17,13 +17,13 @@ internal val BytecodePatchContext.checkCertificateMethod by gettingFirstMutableM
instructions("Failed to get certificate"(String::contains))
}
internal val BytecodePatchContext.searchMediaItemsConstructorMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.searchMediaItemsConstructorMethod by gettingFirstMethodDeclaratively(
"ytm_media_browser/search_media_items",
) {
returnType("V")
}
context(_: BytecodePatchContext)
internal fun ClassDef.getSearchMediaItemsExecuteMethod() = firstMutableMethodDeclaratively {
internal fun ClassDef.getSearchMediaItemsExecuteMethod() = firstMethodDeclaratively {
parameterTypes()
}

View file

@ -5,7 +5,7 @@ import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.backgroundPlaybackDisableMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.backgroundPlaybackDisableMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
returnType("Z")
parameterTypes("L")
@ -22,7 +22,7 @@ internal val BytecodePatchContext.backgroundPlaybackDisableMethod by gettingFirs
)
}
internal val BytecodePatchContext.kidsBackgroundPlaybackPolicyControllerMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.kidsBackgroundPlaybackPolicyControllerMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returnType("V")
parameterTypes("I", "L", "Z")

View file

@ -1,10 +1,10 @@
package app.revanced.patches.music.misc.fileprovider
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.fileProviderResolverMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.fileProviderResolverMethod by gettingFirstMethodDeclaratively(
"android.support.FILE_PROVIDER_PATHS",
"Name must not be empty"
) {

View file

@ -3,7 +3,7 @@ package app.revanced.patches.music.misc.gms
import app.revanced.patcher.*
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.musicActivityOnCreateMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.musicActivityOnCreateMethod by gettingFirstMethodDeclaratively {
name("onCreate")
definingClass { endsWith("/MusicActivity;") }
returnType("V")

View file

@ -1,13 +1,13 @@
package app.revanced.patches.music.misc.settings
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.googleApiActivityMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.googleApiActivityMethod by gettingFirstMethodDeclaratively {
name("onCreate")
definingClass { endsWith("GoogleApiActivity;") }
returnType("V")

View file

@ -1,8 +1,8 @@
package app.revanced.patches.music.shared
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstImmutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.name
@ -13,14 +13,14 @@ import app.revanced.patcher.returnType
internal const val YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE =
"Lcom/google/android/apps/youtube/music/activities/MusicActivity;"
internal val BytecodePatchContext.mainActivityOnCreateMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.mainActivityOnCreateMethod by gettingFirstMethodDeclaratively {
name("onCreate")
definingClass(YOUTUBE_MUSIC_MAIN_ACTIVITY_CLASS_TYPE)
returnType("V")
parameterTypes("Landroid/os/Bundle;")
}
internal val BytecodePatchContext.conversionContextToStringMethod by gettingFirstMethodDeclaratively(
internal val BytecodePatchContext.conversionContextToStringMethod by gettingFirstImmutableMethodDeclaratively(
"ConversionContext{containerInternal=",
", gridColumnCount=",
", gridColumnIndex=",

View file

@ -1,9 +1,9 @@
package app.revanced.patches.myexpenses.misc.pro
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.isEnabledMethod by gettingFirstMutableMethodDeclaratively("feature", "feature.licenceStatus") {
internal val BytecodePatchContext.isEnabledMethod by gettingFirstMethodDeclaratively("feature", "feature.licenceStatus") {
returnType("Z")
}

View file

@ -2,19 +2,19 @@ package app.revanced.patches.myfitnesspal.ads
import app.revanced.patcher.accessFlags
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.isPremiumUseCaseImplMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.isPremiumUseCaseImplMethod by gettingFirstMethodDeclaratively {
name("doWork")
definingClass { endsWith("IsPremiumUseCaseImpl;") }
accessFlags(AccessFlags.PUBLIC)
}
internal val BytecodePatchContext.mainActivityNavigateToNativePremiumUpsellMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.mainActivityNavigateToNativePremiumUpsellMethod by gettingFirstMethodDeclaratively {
name("navigateToNativePremiumUpsell")
definingClass { endsWith("MainActivity;") }
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)

View file

@ -1,7 +1,7 @@
package app.revanced.patches.nothingx.misc.logk1token
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
@ -11,7 +11,7 @@ import app.revanced.patcher.returnType
* Fingerprint for the Application onCreate method.
* This is used to trigger scanning for existing log files on app startup.
*/
internal val BytecodePatchContext.applicationOnCreateMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.applicationOnCreateMethod by gettingFirstMethodDeclaratively {
name("onCreate")
definingClass { endsWith("BaseApplication;") }
returnType("V")

View file

@ -2,13 +2,13 @@ package app.revanced.patches.nunl.ads
import app.revanced.patcher.*
import app.revanced.patcher.accessFlags
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode val BytecodePatchContext.jwPlayerConfigMethod by gettingFirstMutableMethodDeclaratively {
import com.android.tools.smali.dexlib2.Opcode val BytecodePatchContext.jwPlayerConfigMethod by gettingFirstMethodDeclaratively {
name("advertisingConfig")
definingClass($$"Lcom/jwplayer/pub/api/configuration/PlayerConfig$Builder;")
accessFlags(AccessFlags.PUBLIC)

View file

@ -1,7 +1,7 @@
package app.revanced.patches.nunl.firebase
import app.revanced.patcher.*
import app.revanced.patcher.firstMutableMethodDeclaratively
import app.revanced.patcher.firstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
@ -10,7 +10,7 @@ internal fun BytecodePatchContext.getFingerprintHashForPackageMethods() = arrayO
"Lcom/google/firebase/remoteconfig/internal/ConfigFetchHttpClient;",
"Lcom/google/firebase/remoteconfig/internal/ConfigRealtimeHttpClient;"
).map {
firstMutableMethodDeclaratively {
firstMethodDeclaratively {
name("getFingerprintHashForPackage")
definingClass(it)
accessFlags(AccessFlags.PRIVATE)

View file

@ -1,13 +1,13 @@
package app.revanced.patches.openinghours.misc.fix.crash
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.definingClass
import app.revanced.patcher.name
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.setPlaceMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.setPlaceMethod by gettingFirstMethodDeclaratively {
name("setPlace")
definingClass("Lde/simon/openinghours/views/custom/PlaceCard;")
returnType("V")

View file

@ -2,13 +2,13 @@ package app.revanced.patches.orfon.detection.root
import app.revanced.patcher.accessFlags
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.isDeviceRootedMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.isDeviceRootedMethod by gettingFirstMethodDeclaratively {
name("isDeviceRooted")
definingClass { endsWith("/RootChecker;") }
accessFlags(AccessFlags.PUBLIC)

View file

@ -1,16 +1,16 @@
package app.revanced.patches.pandora.ads
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.getIsAdSupportedMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getIsAdSupportedMethod by gettingFirstMethodDeclaratively {
name("getIsAdSupported")
definingClass("UserData;")
}
internal val BytecodePatchContext.requestAudioAdMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.requestAudioAdMethod by gettingFirstMethodDeclaratively {
name("requestAudioAdFromAdSDK")
definingClass { endsWith("ContentServiceOpsImpl;") }
}

View file

@ -1,11 +1,11 @@
package app.revanced.patches.pandora.misc
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.getSkipLimitBehaviorMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getSkipLimitBehaviorMethod by gettingFirstMethodDeclaratively {
name("getSkipLimitBehavior")
definingClass { endsWith("UserData;") }
}

View file

@ -1,12 +1,12 @@
package app.revanced.patches.peacocktv.ads
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.accessFlags
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.mediaTailerAdServiceMethod by gettingFirstMutableMethodDeclaratively("Could not build MT Advertising service") {
internal val BytecodePatchContext.mediaTailerAdServiceMethod by gettingFirstMethodDeclaratively("Could not build MT Advertising service") {
accessFlags(AccessFlags.PUBLIC)
returnType("Ljava/lang/Object;")
}

View file

@ -1,6 +1,6 @@
package app.revanced.patches.photomath.detection.deviceid
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.opcodes
@ -9,7 +9,7 @@ import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.getDeviceIdMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getDeviceIdMethod by gettingFirstMethodDeclaratively {
returnType("Ljava/lang/String;")
parameterTypes()
opcodes(

View file

@ -1,12 +1,12 @@
package app.revanced.patches.photomath.misc.annoyances
import app.revanced.patcher.*
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.hideUpdatePopupMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.hideUpdatePopupMethod by gettingFirstMethodDeclaratively {
definingClass("Lcom/microblink/photomath/main/activity/MainActivity;")
accessFlags(AccessFlags.FINAL, AccessFlags.PUBLIC)
returnType("V")

View file

@ -1,13 +1,13 @@
package app.revanced.patches.photomath.misc.unlock.bookpoint
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.accessFlags
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.isBookpointEnabledMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.isBookpointEnabledMethod by gettingFirstMethodDeclaratively(
"NoGeoData",
"NoCountryInGeo",
"RemoteConfig",

View file

@ -2,12 +2,12 @@ package app.revanced.patches.photomath.misc.unlock.plus
import app.revanced.patcher.accessFlags
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.isPlusUnlockedMethod by gettingFirstMutableMethodDeclaratively("genius") {
internal val BytecodePatchContext.isPlusUnlockedMethod by gettingFirstMethodDeclaratively("genius") {
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
returnType("Z")
definingClass { endsWith("/User;") }

View file

@ -1,13 +1,13 @@
package app.revanced.patches.piccomafr.misc
import app.revanced.patcher.accessFlags
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.getAndroidIdMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.getAndroidIdMethod by gettingFirstMethodDeclaratively(
"context",
"android_id"
) {

View file

@ -1,20 +1,20 @@
package app.revanced.patches.piccomafr.tracking
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.accessFlags
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.appMeasurementMethod by gettingFirstMutableMethodDeclaratively("config/app/", "Fetching remote configuration") {
internal val BytecodePatchContext.appMeasurementMethod by gettingFirstMethodDeclaratively("config/app/", "Fetching remote configuration") {
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
returnType("V")
}
internal val BytecodePatchContext.facebookSDKMethod by gettingFirstMutableMethodDeclaratively("instagram.com", "facebook.com") {
internal val BytecodePatchContext.facebookSDKMethod by gettingFirstMethodDeclaratively("instagram.com", "facebook.com") {
accessFlags(AccessFlags.STATIC, AccessFlags.CONSTRUCTOR)
}
internal val BytecodePatchContext.firebaseInstallMethod by gettingFirstMutableMethodDeclaratively("https://%s/%s/%s", "firebaseinstallations.googleapis.com") {
internal val BytecodePatchContext.firebaseInstallMethod by gettingFirstMethodDeclaratively("https://%s/%s/%s", "firebaseinstallations.googleapis.com") {
accessFlags(AccessFlags.PRIVATE)
}

View file

@ -2,13 +2,13 @@ package app.revanced.patches.pixiv.ads
import app.revanced.patcher.accessFlags
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.shouldShowAdsMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.shouldShowAdsMethod by gettingFirstMethodDeclaratively {
definingClass { endsWith("AdUtils;") }
name("shouldShowAds")
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)

View file

@ -1,12 +1,12 @@
package app.revanced.patches.primevideo.ads
import app.revanced.patcher.*
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.enterServerInsertedAdBreakStateMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.enterServerInsertedAdBreakStateMethod by gettingFirstMethodDeclaratively {
name("enter")
definingClass("Lcom/amazon/avod/media/ads/internal/state/ServerInsertedAdBreakState;")
accessFlags(AccessFlags.PUBLIC)
@ -20,7 +20,7 @@ internal val BytecodePatchContext.enterServerInsertedAdBreakStateMethod by getti
)
}
internal val BytecodePatchContext.doTriggerMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.doTriggerMethod by gettingFirstMethodDeclaratively {
name("doTrigger")
definingClass("Lcom/amazon/avod/fsm/StateBase;")
accessFlags(AccessFlags.PROTECTED)

View file

@ -1,11 +1,11 @@
package app.revanced.patches.primevideo.video.speed
import app.revanced.patcher.*
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.playbackUserControlsInitializeMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.playbackUserControlsInitializeMethod by gettingFirstMethodDeclaratively {
name("initialize")
definingClass("Lcom/amazon/avod/playbackclient/activity/feature/PlaybackUserControlsFeature;")
accessFlags(AccessFlags.PUBLIC)
@ -13,7 +13,7 @@ internal val BytecodePatchContext.playbackUserControlsInitializeMethod by gettin
returnType("V")
}
internal val BytecodePatchContext.playbackUserControlsPrepareForPlaybackMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.playbackUserControlsPrepareForPlaybackMethod by gettingFirstMethodDeclaratively {
name("prepareForPlayback")
definingClass("Lcom/amazon/avod/playbackclient/activity/feature/PlaybackUserControlsFeature;")
accessFlags(AccessFlags.PUBLIC)

View file

@ -1,13 +1,13 @@
package app.revanced.patches.protonvpn.delay
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.longDelayMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.longDelayMethod by gettingFirstMethodDeclaratively {
name("getChangeServerLongDelayInSeconds")
}
internal val BytecodePatchContext.shortDelayMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.shortDelayMethod by gettingFirstMethodDeclaratively {
name("getChangeServerShortDelayInSeconds")
}

View file

@ -12,6 +12,6 @@ internal val BytecodePatchContext.enableSplitTunnelingUiMethodMatch by composing
)
}
internal val BytecodePatchContext.initializeSplitTunnelingSettingsUIMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.initializeSplitTunnelingSettingsUIMethod by gettingFirstMethodDeclaratively {
name("applyRestrictions")
}

View file

@ -2,13 +2,13 @@ package app.revanced.patches.rar.misc.annoyances.purchasereminder
import app.revanced.patcher.accessFlags
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.showReminderMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.showReminderMethod by gettingFirstMethodDeclaratively {
definingClass { endsWith("AdsNotify;") }
name("show")
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)

View file

@ -1,11 +1,11 @@
package app.revanced.patches.reddit.ad.comments
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.hideCommentAdsMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.hideCommentAdsMethod by gettingFirstMethodDeclaratively {
name("invokeSuspend")
definingClass { contains("LoadAdsCombinedCall") }
}

View file

@ -1,19 +1,19 @@
package app.revanced.patches.reddit.ad.general
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.adPostMethod by gettingFirstMutableMethodDeclaratively("children") {
internal val BytecodePatchContext.adPostMethod by gettingFirstMethodDeclaratively("children") {
definingClass { endsWith("Listing;") }
returnType("V")
}
internal val BytecodePatchContext.newAdPostMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.newAdPostMethod by gettingFirstMethodDeclaratively(
"feedElement",
"com.reddit.cookie",
) {

View file

@ -1,13 +1,13 @@
package app.revanced.patches.reddit.customclients.baconreader.fix.redgifs
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.definingClass
import app.revanced.patcher.name
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.getOkHttpClientMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getOkHttpClientMethod by gettingFirstMethodDeclaratively {
definingClass("Lcom/onelouder/baconreader/media/gfycat/RedGifsManager;")
name("getOkhttpClient")
returnType("Lokhttp3/OkHttpClient;")

View file

@ -1,12 +1,12 @@
package app.revanced.patches.reddit.customclients.boostforreddit.ads
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.maxMediationMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.maxMediationMethod by gettingFirstMethodDeclaratively(
"MaxMediation: Attempting to initialize SDK"
)
internal val BytecodePatchContext.admobMediationMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.admobMediationMethod by gettingFirstMethodDeclaratively(
"AdmobMediation: Attempting to initialize SDK"
)

View file

@ -1,15 +1,15 @@
package app.revanced.patches.reddit.customclients.boostforreddit.api
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.buildUserAgentMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.buildUserAgentMethod by gettingFirstMethodDeclaratively(
"%s:%s:%s (by /u/%s)",
)
internal val BytecodePatchContext.getClientIdMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getClientIdMethod by gettingFirstMethodDeclaratively {
name("getClientId")
definingClass { endsWith("Credentials;") }
}

View file

@ -1,12 +1,12 @@
package app.revanced.patches.reddit.customclients.boostforreddit.fix.redgifs
import app.revanced.patcher.*
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.createOkHttpClientMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.createOkHttpClientMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PRIVATE)
opcodes(
Opcode.NEW_INSTANCE,

View file

@ -1,19 +1,19 @@
package app.revanced.patches.reddit.customclients.boostforreddit.fix.slink
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.accessFlags
import app.revanced.patcher.definingClass
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.getOAuthAccessTokenMethod by gettingFirstMutableMethodDeclaratively("access_token") {
internal val BytecodePatchContext.getOAuthAccessTokenMethod by gettingFirstMethodDeclaratively("access_token") {
definingClass("Lnet/dean/jraw/http/oauth/OAuthData;")
accessFlags(AccessFlags.PUBLIC)
returnType("Ljava/lang/String;")
}
internal val BytecodePatchContext.handleNavigationMethod by gettingFirstMutableMethodDeclaratively(
internal val BytecodePatchContext.handleNavigationMethod by gettingFirstMethodDeclaratively(
"android.intent.action.SEARCH",
"subscription",
"sort",

View file

@ -1,6 +1,6 @@
package app.revanced.patches.reddit.customclients.infinityforreddit.api
import app.revanced.patcher.gettingFirstMutableMethod
import app.revanced.patcher.gettingFirstMethod
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.apiUtilsMethod by gettingFirstMutableMethod("native-lib")
internal val BytecodePatchContext.apiUtilsMethod by gettingFirstMethod("native-lib")

View file

@ -1,13 +1,13 @@
package app.revanced.patches.reddit.customclients.infinityforreddit.subscription
import app.revanced.patcher.gettingFirstMutableMethod
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethod
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.invoke
import app.revanced.patcher.instructions
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.billingClientOnServiceConnectedMethod by gettingFirstMutableMethod("Billing service connected")
internal val BytecodePatchContext.billingClientOnServiceConnectedMethod by gettingFirstMethod("Billing service connected")
internal val BytecodePatchContext.startSubscriptionActivityMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.startSubscriptionActivityMethod by gettingFirstMethodDeclaratively {
instructions(0x10008000L())
}

View file

@ -1,12 +1,12 @@
package app.revanced.patches.reddit.customclients.joeyforreddit.ads
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.accessFlags
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
internal val BytecodePatchContext.isAdFreeUserMethod by gettingFirstMutableMethodDeclaratively("AD_FREE_USER") {
internal val BytecodePatchContext.isAdFreeUserMethod by gettingFirstMethodDeclaratively("AD_FREE_USER") {
accessFlags(AccessFlags.PUBLIC)
returnType("Z")
}

View file

@ -1,19 +1,19 @@
package app.revanced.patches.reddit.customclients.joeyforreddit.api
import app.revanced.patcher.*
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.authUtilityUserAgentMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.authUtilityUserAgentMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
returnType("Ljava/lang/String;")
opcodes(Opcode.APUT_OBJECT)
custom { immutableClassDef.sourceFile == "AuthUtility.java" }
}
internal val BytecodePatchContext.getClientIdMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getClientIdMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
returnType("L")
opcodes(

View file

@ -2,7 +2,7 @@ package app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy
import app.revanced.patcher.accessFlags
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.opcodes
@ -11,7 +11,7 @@ import app.revanced.patcher.returnType
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.detectPiracyMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.detectPiracyMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
returnType("V")
opcodes(

View file

@ -1,7 +1,7 @@
package app.revanced.patches.reddit.customclients.redditisfun.api
import app.revanced.patcher.*
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
@ -20,7 +20,7 @@ internal val BytecodePatchContext.buildAuthorizationStringMethodMatch by composi
)
}
internal val BytecodePatchContext.getUserAgentMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getUserAgentMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
returnType("Ljava/lang/String;")
parameterTypes()

View file

@ -1,7 +1,7 @@
package app.revanced.patches.reddit.customclients.relayforreddit.api
import app.revanced.patcher.composingFirstMethod
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.parameterTypes
@ -24,10 +24,10 @@ internal val BytecodePatchContext.getRefreshTokenMethodMatch by baseClientIdMeth
internal val BytecodePatchContext.loginActivityClientIdMethodMatch by baseClientIdMethod("&duration=permanent")
internal val BytecodePatchContext.redditCheckDisableAPIMethod by gettingFirstMutableMethodDeclaratively("Reddit Disabled") {
internal val BytecodePatchContext.redditCheckDisableAPIMethod by gettingFirstMethodDeclaratively("Reddit Disabled") {
instructions(Opcode.IF_EQZ())
}
internal val BytecodePatchContext.setRemoteConfigMethod by gettingFirstMutableMethodDeclaratively("reddit_oauth_url") {
internal val BytecodePatchContext.setRemoteConfigMethod by gettingFirstMethodDeclaratively("reddit_oauth_url") {
parameterTypes("Lcom/google/firebase/remoteconfig/FirebaseRemoteConfig;")
}

View file

@ -1,11 +1,11 @@
package app.revanced.patches.reddit.customclients.slide.api
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.getClientIdMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getClientIdMethod by gettingFirstMethodDeclaratively {
name("getClientId")
definingClass { endsWith("Credentials;") }
}

View file

@ -1,12 +1,12 @@
package app.revanced.patches.reddit.customclients.sync.ads
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.accessFlags
import com.android.tools.smali.dexlib2.AccessFlags
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
internal val BytecodePatchContext.isAdsEnabledMethod by gettingFirstMutableMethodDeclaratively("SyncIapHelper") {
internal val BytecodePatchContext.isAdsEnabledMethod by gettingFirstMethodDeclaratively("SyncIapHelper") {
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
returnType("Z")
}

View file

@ -4,7 +4,7 @@ import app.revanced.patcher.accessFlags
import app.revanced.patcher.custom
import app.revanced.patcher.extensions.instructions
import app.revanced.patcher.extensions.reference
import app.revanced.patcher.gettingFirstMutableMethodDeclarativelyOrNull
import app.revanced.patcher.gettingFirstMethodDeclarativelyOrNull
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.opcodes
@ -14,7 +14,7 @@ import app.revanced.patcher.type
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
internal val BytecodePatchContext.detectPiracyMethodOrNull by gettingFirstMutableMethodDeclarativelyOrNull(
internal val BytecodePatchContext.detectPiracyMethodOrNull by gettingFirstMethodDeclarativelyOrNull(
"Lcom/github/javiersantos/piracychecker/PiracyChecker;",
) {
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)

View file

@ -1,11 +1,11 @@
package app.revanced.patches.reddit.customclients.sync.syncforreddit.annoyances.startup
import app.revanced.patcher.definingClass
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.name
import app.revanced.patcher.patch.BytecodePatchContext
internal val BytecodePatchContext.mainActivityOnCreateMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.mainActivityOnCreateMethod by gettingFirstMethodDeclaratively {
name("onCreate")
definingClass { endsWith("MainActivity;") }
}

View file

@ -2,7 +2,7 @@ package app.revanced.patches.reddit.customclients.sync.syncforreddit.api
import app.revanced.patcher.ClassDefComposing
import app.revanced.patcher.composingFirstMethod
import app.revanced.patcher.gettingFirstMutableMethod
import app.revanced.patcher.gettingFirstMethod
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
import app.revanced.patcher.patch.BytecodePatchContext
@ -17,7 +17,7 @@ internal val ClassDef.getBearerTokenMethodMatch by ClassDefComposing.composingFi
instructions(string { startsWith("Basic") })
}
internal val BytecodePatchContext.getUserAgentMethod by gettingFirstMutableMethod(
internal val BytecodePatchContext.getUserAgentMethod by gettingFirstMethod(
"android:com.laurencedawson.reddit_sync",
)

View file

@ -2,7 +2,7 @@ package app.revanced.patches.reddit.customclients.sync.syncforreddit.fix.redgifs
import app.revanced.patcher.*
import app.revanced.patcher.extensions.instructions
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.util.indexOfFirstInstruction
import app.revanced.util.writeRegister
@ -10,7 +10,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.NarrowLiteralInstruction
internal val BytecodePatchContext.createOkHttpClientMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.createOkHttpClientMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PRIVATE, AccessFlags.STATIC)
returnType("V")
parameterTypes()
@ -26,12 +26,12 @@ internal val BytecodePatchContext.createOkHttpClientMethod by gettingFirstMutabl
}
}
internal val BytecodePatchContext.getDefaultUserAgentMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getDefaultUserAgentMethod by gettingFirstMethodDeclaratively {
name("getDefaultUserAgent")
definingClass(EXTENSION_CLASS_DESCRIPTOR)
}
internal val BytecodePatchContext.getOriginalUserAgentMethod by gettingFirstMutableMethodDeclaratively {
internal val BytecodePatchContext.getOriginalUserAgentMethod by gettingFirstMethodDeclaratively {
accessFlags(AccessFlags.PUBLIC, AccessFlags.STATIC)
returnType { startsWith("Ljava/lang/String;") }
parameterTypes()

Some files were not shown because too many files have changed in this diff Show more