build(Needs bump): Bump dependencies (#2946)
Co-authored-by: Ushie <ushiekane@gmail.com> Co-authored-by: aAbed <aabedhkhan@gmail.com> Co-authored-by: CnC-Robert <CnC.Rob3rt@gmail.com>
This commit is contained in:
@ -1,13 +1,11 @@
|
||||
package app.revanced.patches.tiktok.ad.patch
|
||||
package app.revanced.patches.tiktok.ad
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tiktok.ad.annotations.HideAdsCompatibility
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.tiktok.ad.fingerprints.ConvertHelpFeedItemListFingerprint
|
||||
import app.revanced.patches.tiktok.ad.fingerprints.FeedItemListCloneFingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
@ -15,15 +13,16 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||
|
||||
@Patch
|
||||
@Name("Hide ads")
|
||||
@Description("Removes ads from TikTok.")
|
||||
@HideAdsCompatibility
|
||||
class HideAdsPatch : BytecodePatch(
|
||||
listOf(
|
||||
FeedItemListCloneFingerprint,
|
||||
ConvertHelpFeedItemListFingerprint
|
||||
)
|
||||
@Patch(
|
||||
name = "Hide ads",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage("com.ss.android.ugc.trill"),
|
||||
CompatiblePackage("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HideAdsPatch : BytecodePatch(
|
||||
setOf(FeedItemListCloneFingerprint, ConvertHelpFeedItemListFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
listOf(
|
@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.tiktok.ad.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.ss.android.ugc.trill"),
|
||||
Package("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class HideAdsCompatibility
|
@ -1,31 +1,29 @@
|
||||
package app.revanced.patches.tiktok.feedfilter.patch
|
||||
package app.revanced.patches.tiktok.feedfilter
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tiktok.feedfilter.annotations.FeedFilterCompatibility
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.tiktok.feedfilter.fingerprints.FeedApiServiceLIZFingerprint
|
||||
import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.SettingsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("Feed filter")
|
||||
@Description("Filters tiktok videos: removing ads, removing livestreams.")
|
||||
@FeedFilterCompatibility
|
||||
class FeedFilterPatch : BytecodePatch(
|
||||
listOf(
|
||||
FeedApiServiceLIZFingerprint,
|
||||
SettingsStatusLoadFingerprint
|
||||
)
|
||||
) {
|
||||
@Patch(
|
||||
name = "Feed filter",
|
||||
description = "Filters tiktok videos: removing ads, removing livestreams.",
|
||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage("com.ss.android.ugc.trill"),
|
||||
CompatiblePackage("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object FeedFilterPatch : BytecodePatch(setOf(FeedApiServiceLIZFingerprint, SettingsStatusLoadFingerprint)) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
val method = FeedApiServiceLIZFingerprint.result!!.mutableMethod
|
||||
for ((index, instruction) in method.implementation!!.instructions.withIndex()) {
|
||||
@ -37,10 +35,10 @@ class FeedFilterPatch : BytecodePatch(
|
||||
)
|
||||
break
|
||||
}
|
||||
val method2 = SettingsStatusLoadFingerprint.result!!.mutableMethod
|
||||
method2.addInstruction(
|
||||
|
||||
SettingsStatusLoadFingerprint.result?.mutableMethod?.addInstruction(
|
||||
0,
|
||||
"invoke-static {}, Lapp/revanced/tiktok/settingsmenu/SettingsStatus;->enableFeedFilter()V"
|
||||
)
|
||||
) ?: throw SettingsStatusLoadFingerprint.exception
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.tiktok.feedfilter.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.ss.android.ugc.trill"),
|
||||
Package("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class FeedFilterCompatibility
|
@ -1,7 +1,5 @@
|
||||
package app.revanced.patches.tiktok.interaction.downloads.patch
|
||||
package app.revanced.patches.tiktok.interaction.downloads
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
@ -10,29 +8,33 @@ import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
|
||||
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint
|
||||
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint2
|
||||
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint3
|
||||
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.DownloadPathParentFingerprint
|
||||
import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.SettingsPatch
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("Downloads")
|
||||
@Description("Removes download restrictions and changes the default path to download to.")
|
||||
@DownloadsCompatibility
|
||||
class DownloadsPatch : BytecodePatch(
|
||||
listOf(
|
||||
@Patch(
|
||||
name = "Downloads",
|
||||
description = "Removes download restrictions and changes the default path to download to.",
|
||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage("com.ss.android.ugc.trill"),
|
||||
CompatiblePackage("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object DownloadsPatch : BytecodePatch(
|
||||
setOf(
|
||||
ACLCommonShareFingerprint,
|
||||
ACLCommonShareFingerprint2,
|
||||
ACLCommonShareFingerprint3,
|
@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.tiktok.interaction.downloads.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.ss.android.ugc.trill"),
|
||||
Package("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class DownloadsCompatibility
|
@ -1,13 +1,9 @@
|
||||
package app.revanced.patches.tiktok.interaction.downloads.fingerprints
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
@Name("Acl common share get show type")
|
||||
@DownloadsCompatibility
|
||||
object ACLCommonShareFingerprint2 : MethodFingerprint(
|
||||
"I",
|
||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
|
@ -1,13 +1,9 @@
|
||||
package app.revanced.patches.tiktok.interaction.downloads.fingerprints
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
@Name("Acl common share get transcode")
|
||||
@DownloadsCompatibility
|
||||
object ACLCommonShareFingerprint3 : MethodFingerprint(
|
||||
"I",
|
||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
|
@ -1,26 +1,24 @@
|
||||
package app.revanced.patches.tiktok.interaction.seekbar.patch
|
||||
package app.revanced.patches.tiktok.interaction.seekbar
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tiktok.interaction.seekbar.annotations.ShowSeekbarCompatibility
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.SetSeekBarShowTypeFingerprint
|
||||
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.ShouldShowSeekBarFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("Show seekbar")
|
||||
@Description("Shows progress bar for all video.")
|
||||
@ShowSeekbarCompatibility
|
||||
class ShowSeekbarPatch : BytecodePatch(
|
||||
listOf(
|
||||
SetSeekBarShowTypeFingerprint,
|
||||
ShouldShowSeekBarFingerprint,
|
||||
)
|
||||
) {
|
||||
@Patch(
|
||||
name = "Show seekbar",
|
||||
description = "Shows progress bar for all video.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage("com.ss.android.ugc.trill"),
|
||||
CompatiblePackage("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object ShowSeekbarPatch : BytecodePatch(setOf(SetSeekBarShowTypeFingerprint, ShouldShowSeekBarFingerprint)) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
ShouldShowSeekBarFingerprint.result?.mutableMethod?.apply {
|
||||
addInstructions(
|
||||
@ -42,5 +40,4 @@ class ShowSeekbarPatch : BytecodePatch(
|
||||
)
|
||||
} ?: throw SetSeekBarShowTypeFingerprint.exception
|
||||
}
|
||||
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.tiktok.interaction.seekbar.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.ss.android.ugc.trill"),
|
||||
Package("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class ShowSeekbarCompatibility
|
@ -1,25 +1,24 @@
|
||||
package app.revanced.patches.tiktok.interaction.speed.patch
|
||||
package app.revanced.patches.tiktok.interaction.speed
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.tiktok.interaction.speed.annotations.PlaybackSpeedCompatibility
|
||||
import app.revanced.patches.tiktok.interaction.speed.fingerprints.SpeedControlParentFingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
@Patch
|
||||
@Name("Playback speed")
|
||||
@Description("Enables the playback speed option for all videos.")
|
||||
@PlaybackSpeedCompatibility
|
||||
class PlaybackSpeedPatch : BytecodePatch(
|
||||
listOf(
|
||||
SpeedControlParentFingerprint
|
||||
)
|
||||
) {
|
||||
@Patch(
|
||||
name = "Playback speed",
|
||||
description = "Enables the playback speed option for all videos.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage("com.ss.android.ugc.trill"),
|
||||
CompatiblePackage("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object PlaybackSpeedPatch : BytecodePatch(setOf(SpeedControlParentFingerprint)) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
val parentMethod = SpeedControlParentFingerprint.result!!.mutableMethod
|
||||
val parentMethodInstructions = parentMethod.implementation!!.instructions
|
@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.tiktok.interaction.speed.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.ss.android.ugc.trill"),
|
||||
Package("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class PlaybackSpeedCompatibility
|
@ -0,0 +1,11 @@
|
||||
package app.revanced.patches.tiktok.misc.integrations
|
||||
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.shared.integrations.AbstractIntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprint
|
||||
|
||||
@Patch(requiresIntegrations = true)
|
||||
object IntegrationsPatch : AbstractIntegrationsPatch(
|
||||
"Lapp/revanced/tiktok/utils/ReVancedUtils;",
|
||||
setOf(InitFingerprint)
|
||||
)
|
@ -1,6 +1,6 @@
|
||||
package app.revanced.patches.tiktok.misc.integrations.fingerprints
|
||||
|
||||
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||
import app.revanced.patches.shared.integrations.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||
|
||||
object InitFingerprint : IntegrationsFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
|
@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.tiktok.misc.integrations.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
||||
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprint
|
||||
|
||||
@Name("Integrations")
|
||||
@RequiresIntegrations
|
||||
class IntegrationsPatch : AbstractIntegrationsPatch(
|
||||
"Lapp/revanced/tiktok/utils/ReVancedUtils;",
|
||||
listOf(InitFingerprint)
|
||||
)
|
@ -1,24 +1,23 @@
|
||||
package app.revanced.patches.tiktok.misc.login.disablerequirement.patch
|
||||
package app.revanced.patches.tiktok.misc.login.disablerequirement
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tiktok.misc.login.disablerequirement.annotations.DisableLoginRequirementCompatibility
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints.MandatoryLoginServiceFingerprint
|
||||
import app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints.MandatoryLoginServiceFingerprint2
|
||||
|
||||
@Patch
|
||||
@Name("Disable login requirement")
|
||||
@Description("Do not force login.")
|
||||
@DisableLoginRequirementCompatibility
|
||||
class DisableLoginRequirementPatch : BytecodePatch(
|
||||
listOf(
|
||||
MandatoryLoginServiceFingerprint,
|
||||
MandatoryLoginServiceFingerprint2
|
||||
)
|
||||
@Patch(
|
||||
name = "Disable login requirement",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage("com.ss.android.ugc.trill"),
|
||||
CompatiblePackage("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object DisableLoginRequirementPatch : BytecodePatch(
|
||||
setOf(MandatoryLoginServiceFingerprint, MandatoryLoginServiceFingerprint2)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
listOf(
|
@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.tiktok.misc.login.disablerequirement.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.ss.android.ugc.trill"),
|
||||
Package("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class DisableLoginRequirementCompatibility
|
@ -1,11 +1,7 @@
|
||||
package app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.tiktok.misc.login.disablerequirement.annotations.DisableLoginRequirementCompatibility
|
||||
|
||||
@Name("Mandatory login service fingerprint2")
|
||||
@DisableLoginRequirementCompatibility
|
||||
object MandatoryLoginServiceFingerprint2 : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("/MandatoryLoginService;") &&
|
||||
|
@ -1,24 +1,24 @@
|
||||
package app.revanced.patches.tiktok.misc.login.fixgoogle.patch
|
||||
package app.revanced.patches.tiktok.misc.login.fixgoogle
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tiktok.misc.login.fixgoogle.annotations.FixGoogleLoginCompatibility
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints.GoogleAuthAvailableFingerprint
|
||||
import app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints.GoogleOneTapAuthAvailableFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("Fix google login")
|
||||
@Description("Allows logging in with a Google account.")
|
||||
@FixGoogleLoginCompatibility
|
||||
class FixGoogleLoginPatch : BytecodePatch(
|
||||
listOf(
|
||||
GoogleOneTapAuthAvailableFingerprint,
|
||||
GoogleAuthAvailableFingerprint
|
||||
)
|
||||
@Patch(
|
||||
name = "Fix Google login",
|
||||
description = "Allows logging in with a Google account.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage("com.ss.android.ugc.trill"),
|
||||
CompatiblePackage("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object FixGoogleLoginPatch : BytecodePatch(
|
||||
setOf(GoogleOneTapAuthAvailableFingerprint, GoogleAuthAvailableFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
listOf(
|
@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.tiktok.misc.login.fixgoogle.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.ss.android.ugc.trill"),
|
||||
Package("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class FixGoogleLoginCompatibility
|
@ -1,36 +1,54 @@
|
||||
package app.revanced.patches.tiktok.misc.settings.patch
|
||||
package app.revanced.patches.tiktok.misc.settings
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.annotations.SettingsCompatibility
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.*
|
||||
import app.revanced.patches.tiktok.misc.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.AdPersonalizationActivityOnCreateFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.AddSettingsEntryFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsEntryFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsEntryInfoFingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class])
|
||||
@Name("Settings")
|
||||
@Description("Adds ReVanced settings to TikTok.")
|
||||
@SettingsCompatibility
|
||||
class SettingsPatch : BytecodePatch(
|
||||
listOf(
|
||||
@Patch(
|
||||
name = "Settings",
|
||||
description = "Adds ReVanced settings to TikTok.",
|
||||
dependencies = [IntegrationsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage("com.ss.android.ugc.trill"),
|
||||
CompatiblePackage("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
object SettingsPatch : BytecodePatch(
|
||||
setOf(
|
||||
AdPersonalizationActivityOnCreateFingerprint,
|
||||
AddSettingsEntryFingerprint,
|
||||
SettingsEntryFingerprint,
|
||||
SettingsEntryInfoFingerprint,
|
||||
)
|
||||
) {
|
||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/tiktok/settingsmenu/SettingsMenu;"
|
||||
|
||||
private const val INITIALIZE_SETTINGS_METHOD_DESCRIPTOR =
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->initializeSettings(" +
|
||||
"Lcom/bytedance/ies/ugc/aweme/commercialize/compliance/personalization/AdPersonalizationActivity;" +
|
||||
")Z"
|
||||
|
||||
private const val CREATE_SETTINGS_ENTRY_METHOD_DESCRIPTOR =
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->createSettingsEntry(" +
|
||||
"Ljava/lang/String;" +
|
||||
"Ljava/lang/String;" +
|
||||
")Ljava/lang/Object;"
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
// Find the class name of classes which construct a settings entry
|
||||
val settingsButtonClass = SettingsEntryFingerprint.result?.classDef?.type?.toClassName()
|
||||
@ -91,19 +109,4 @@ class SettingsPatch : BytecodePatch(
|
||||
private fun String.toClassName(): String {
|
||||
return substring(1, this.length - 1).replace("/", ".")
|
||||
}
|
||||
|
||||
private companion object {
|
||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/tiktok/settingsmenu/SettingsMenu;"
|
||||
|
||||
private const val INITIALIZE_SETTINGS_METHOD_DESCRIPTOR =
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->initializeSettings(" +
|
||||
"Lcom/bytedance/ies/ugc/aweme/commercialize/compliance/personalization/AdPersonalizationActivity;" +
|
||||
")Z"
|
||||
private const val CREATE_SETTINGS_ENTRY_METHOD_DESCRIPTOR =
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->createSettingsEntry(" +
|
||||
"Ljava/lang/String;" +
|
||||
"Ljava/lang/String;" +
|
||||
")Ljava/lang/Object;"
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.tiktok.misc.settings.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.ss.android.ugc.trill"),
|
||||
Package("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class SettingsCompatibility
|
@ -1,41 +1,42 @@
|
||||
package app.revanced.patches.tiktok.misc.spoof.sim.patch
|
||||
package app.revanced.patches.tiktok.misc.spoof.sim
|
||||
|
||||
import app.revanced.extensions.findMutableMethodOf
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch
|
||||
import app.revanced.patches.tiktok.misc.spoof.sim.annotations.SpoofSimCompatibility
|
||||
import app.revanced.patches.tiktok.misc.settings.SettingsPatch
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@Patch(false)
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("Sim spoof")
|
||||
@Description("Spoofs the information which is retrieved from the sim-card.")
|
||||
@SpoofSimCompatibility
|
||||
class SpoofSimPatch : BytecodePatch() {
|
||||
private companion object {
|
||||
val replacements = hashMapOf(
|
||||
"getSimCountryIso" to "getCountryIso",
|
||||
"getNetworkCountryIso" to "getCountryIso",
|
||||
"getSimOperator" to "getOperator",
|
||||
"getNetworkOperator" to "getOperator",
|
||||
"getSimOperatorName" to "getOperatorName",
|
||||
"getNetworkOperatorName" to "getOperatorName"
|
||||
)
|
||||
}
|
||||
@Patch(
|
||||
name = "SIM spoof",
|
||||
description = "Spoofs the information which is retrieved from the SIM card.",
|
||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage("com.ss.android.ugc.trill"),
|
||||
CompatiblePackage("com.zhiliaoapp.musically")
|
||||
],
|
||||
use = false
|
||||
)
|
||||
@Suppress("unused")
|
||||
object SpoofSimPatch : BytecodePatch() {
|
||||
private val replacements = hashMapOf(
|
||||
"getSimCountryIso" to "getCountryIso",
|
||||
"getNetworkCountryIso" to "getCountryIso",
|
||||
"getSimOperator" to "getOperator",
|
||||
"getNetworkOperator" to "getOperator",
|
||||
"getSimOperatorName" to "getOperatorName",
|
||||
"getNetworkOperatorName" to "getOperatorName"
|
||||
)
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
// Find all api call to check sim information
|
@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.tiktok.misc.spoof.sim.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.ss.android.ugc.trill"),
|
||||
Package("com.zhiliaoapp.musically")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class SpoofSimCompatibility
|
Reference in New Issue
Block a user