From 464a9e9020f70a6e4003b031ffc4935ccfadd32f Mon Sep 17 00:00:00 2001 From: d4rkk3y <43563783+d4rkk3y@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:11:32 +0700 Subject: [PATCH] refactor(tiktok): simplify names (#1085) --- ...AdsCompatibility.kt => HideAdsCompatibility.kt} | 2 +- .../patch/{TiktokAdsPatch.kt => HideAdsPatch.kt} | 8 ++++---- .../{TiktokFeedFilter.kt => FeedFilterPatch.kt} | 10 +++++----- .../interaction/downloads/patch/DownloadsPatch.kt | 8 ++++---- ...ompatibility.kt => ShowSeekbarCompatibility.kt} | 2 +- .../{TiktokSeekbarPatch.kt => ShowSeekbarPatch.kt} | 10 +++++----- ...patibility.kt => PlaybackSpeedCompatibility.kt} | 2 +- .../patch/{SpeedPatch.kt => PlaybackSpeedPatch.kt} | 8 ++++---- ...mpatibility.kt => IntegrationsCompatibility.kt} | 2 +- ...okIntegrationsPatch.kt => IntegrationsPatch.kt} | 8 ++++---- .../DisableLoginRequirementCompatibility.kt | 14 ++++++++++++++ .../MandatoryLoginServiceFingerprint.kt | 3 +-- .../MandatoryLoginServiceFingerprint2.kt | 6 +++--- .../patch/DisableLoginRequirementPatch.kt} | 14 +++++++------- .../annotations/FixGoogleLoginCompatibility.kt} | 4 ++-- .../fingerprints/GoogleAuthAvailableFingerprint.kt | 2 +- .../GoogleOneTapAuthAvailableFingerprint.kt | 2 +- .../fixgoogle/patch/FixGoogleLoginPatch.kt} | 14 +++++++------- .../annotations/TikTokWebLoginCompatibility.kt | 14 -------------- ...gsCompatibility.kt => SettingsCompatibility.kt} | 2 +- .../{TikTokSettingsPatch.kt => SettingsPatch.kt} | 12 ++++++------ .../tiktok/misc/spoof/sim/patch/SpoofSimPatch.kt | 6 +++--- 22 files changed, 76 insertions(+), 77 deletions(-) rename src/main/kotlin/app/revanced/patches/tiktok/ad/annotations/{TiktokAdsCompatibility.kt => HideAdsCompatibility.kt} (87%) rename src/main/kotlin/app/revanced/patches/tiktok/ad/patch/{TiktokAdsPatch.kt => HideAdsPatch.kt} (93%) rename src/main/kotlin/app/revanced/patches/tiktok/feedfilter/patch/{TiktokFeedFilter.kt => FeedFilterPatch.kt} (87%) rename src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/annotations/{SeekbarCompatibility.kt => ShowSeekbarCompatibility.kt} (87%) rename src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/patch/{TiktokSeekbarPatch.kt => ShowSeekbarPatch.kt} (91%) rename src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/annotations/{SpeedCompatibility.kt => PlaybackSpeedCompatibility.kt} (87%) rename src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/patch/{SpeedPatch.kt => PlaybackSpeedPatch.kt} (93%) rename src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/annotations/{TikTokIntegrationsCompatibility.kt => IntegrationsCompatibility.kt} (86%) rename src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/patch/{TikTokIntegrationsPatch.kt => IntegrationsPatch.kt} (72%) create mode 100644 src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/annotations/DisableLoginRequirementCompatibility.kt rename src/main/kotlin/app/revanced/patches/tiktok/misc/{forcelogin => login/disablerequirement}/fingerprints/MandatoryLoginServiceFingerprint.kt (79%) rename src/main/kotlin/app/revanced/patches/tiktok/misc/{forcelogin => login/disablerequirement}/fingerprints/MandatoryLoginServiceFingerprint2.kt (66%) rename src/main/kotlin/app/revanced/patches/tiktok/misc/{forcelogin/patch/DisableForceLoginPatch.kt => login/disablerequirement/patch/DisableLoginRequirementPatch.kt} (67%) rename src/main/kotlin/app/revanced/patches/tiktok/misc/{forcelogin/annotations/DisableForceLoginCompatibility.kt => login/fixgoogle/annotations/FixGoogleLoginCompatibility.kt} (70%) rename src/main/kotlin/app/revanced/patches/tiktok/misc/{loginfallback => login/fixgoogle}/fingerprints/GoogleAuthAvailableFingerprint.kt (86%) rename src/main/kotlin/app/revanced/patches/tiktok/misc/{loginfallback => login/fixgoogle}/fingerprints/GoogleOneTapAuthAvailableFingerprint.kt (86%) rename src/main/kotlin/app/revanced/patches/tiktok/misc/{loginfallback/patch/TikTokLoginFallbackPatch.kt => login/fixgoogle/patch/FixGoogleLoginPatch.kt} (71%) delete mode 100644 src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/annotations/TikTokWebLoginCompatibility.kt rename src/main/kotlin/app/revanced/patches/tiktok/misc/settings/annotations/{TikTokSettingsCompatibility.kt => SettingsCompatibility.kt} (87%) rename src/main/kotlin/app/revanced/patches/tiktok/misc/settings/patch/{TikTokSettingsPatch.kt => SettingsPatch.kt} (94%) diff --git a/src/main/kotlin/app/revanced/patches/tiktok/ad/annotations/TiktokAdsCompatibility.kt b/src/main/kotlin/app/revanced/patches/tiktok/ad/annotations/HideAdsCompatibility.kt similarity index 87% rename from src/main/kotlin/app/revanced/patches/tiktok/ad/annotations/TiktokAdsCompatibility.kt rename to src/main/kotlin/app/revanced/patches/tiktok/ad/annotations/HideAdsCompatibility.kt index f9a1089d2..529acafbf 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/ad/annotations/TiktokAdsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/ad/annotations/HideAdsCompatibility.kt @@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package ) @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.RUNTIME) -internal annotation class TiktokAdsCompatibility +internal annotation class HideAdsCompatibility diff --git a/src/main/kotlin/app/revanced/patches/tiktok/ad/patch/TiktokAdsPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/ad/patch/HideAdsPatch.kt similarity index 93% rename from src/main/kotlin/app/revanced/patches/tiktok/ad/patch/TiktokAdsPatch.kt rename to src/main/kotlin/app/revanced/patches/tiktok/ad/patch/HideAdsPatch.kt index b79f994b1..862f80517 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/ad/patch/TiktokAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/ad/patch/HideAdsPatch.kt @@ -10,7 +10,7 @@ import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultError import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.tiktok.ad.annotations.TiktokAdsCompatibility +import app.revanced.patches.tiktok.ad.annotations.HideAdsCompatibility import app.revanced.patches.tiktok.ad.fingerprints.ConvertHelpFeedItemListFingerprint import app.revanced.patches.tiktok.ad.fingerprints.FeedItemListCloneFingerprint import org.jf.dexlib2.Opcode @@ -19,11 +19,11 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction import org.jf.dexlib2.iface.reference.FieldReference @Patch -@Name("tiktok-ads") +@Name("hide-ads") @Description("Removes ads from TikTok.") -@TiktokAdsCompatibility +@HideAdsCompatibility @Version("0.0.1") -class TiktokAdsPatch : BytecodePatch( +class HideAdsPatch : BytecodePatch( listOf( FeedItemListCloneFingerprint, ConvertHelpFeedItemListFingerprint diff --git a/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/patch/TiktokFeedFilter.kt b/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/patch/FeedFilterPatch.kt similarity index 87% rename from src/main/kotlin/app/revanced/patches/tiktok/feedfilter/patch/TiktokFeedFilter.kt rename to src/main/kotlin/app/revanced/patches/tiktok/feedfilter/patch/FeedFilterPatch.kt index 1717e9ab2..fb6ba0b32 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/patch/TiktokFeedFilter.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/feedfilter/patch/FeedFilterPatch.kt @@ -12,19 +12,19 @@ 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.patches.tiktok.feedfilter.fingerprints.FeedApiServiceLIZFingerprint -import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch +import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint -import app.revanced.patches.tiktok.misc.settings.patch.TikTokSettingsPatch +import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @Patch -@DependsOn([TikTokIntegrationsPatch::class, TikTokSettingsPatch::class]) -@Name("tiktok-feed-filter") +@DependsOn([IntegrationsPatch::class, SettingsPatch::class]) +@Name("feed-filter") @Description("Filters tiktok videos: removing ads, removing livestreams.") @FeedFilterCompatibility @Version("0.0.1") -class TiktokFeedFilter : BytecodePatch( +class FeedFilterPatch : BytecodePatch( listOf( FeedApiServiceLIZFingerprint, SettingsStatusLoadFingerprint diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/patch/DownloadsPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/patch/DownloadsPatch.kt index ed5237f55..a3ea7572f 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/patch/DownloadsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/downloads/patch/DownloadsPatch.kt @@ -21,17 +21,17 @@ import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonS 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.TikTokIntegrationsPatch +import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint -import app.revanced.patches.tiktok.misc.settings.patch.TikTokSettingsPatch +import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.ReferenceInstruction import org.jf.dexlib2.iface.reference.StringReference @Patch -@DependsOn([TikTokIntegrationsPatch::class, TikTokSettingsPatch::class]) -@Name("tiktok-download") +@DependsOn([IntegrationsPatch::class, SettingsPatch::class]) +@Name("downloads") @Description("Removes download restrictions and changes the default path to download to.") @DownloadsCompatibility @Version("0.0.1") diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/annotations/SeekbarCompatibility.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/annotations/ShowSeekbarCompatibility.kt similarity index 87% rename from src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/annotations/SeekbarCompatibility.kt rename to src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/annotations/ShowSeekbarCompatibility.kt index 889f1f880..713de9423 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/annotations/SeekbarCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/annotations/ShowSeekbarCompatibility.kt @@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package ) @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.RUNTIME) -internal annotation class SeekbarCompatibility +internal annotation class ShowSeekbarCompatibility diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/patch/TiktokSeekbarPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/patch/ShowSeekbarPatch.kt similarity index 91% rename from src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/patch/TiktokSeekbarPatch.kt rename to src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/patch/ShowSeekbarPatch.kt index 2948263e2..0c99ab370 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/patch/TiktokSeekbarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/seekbar/patch/ShowSeekbarPatch.kt @@ -10,18 +10,18 @@ import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultError import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.tiktok.interaction.seekbar.annotations.SeekbarCompatibility +import app.revanced.patches.tiktok.interaction.seekbar.annotations.ShowSeekbarCompatibility import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.AwemeGetVideoControlFingerprint import org.jf.dexlib2.Opcode import org.jf.dexlib2.builder.instruction.BuilderInstruction11n import org.jf.dexlib2.builder.instruction.BuilderInstruction22c @Patch -@Name("tiktok-seekbar") -@Description("Show progress bar for all video.") -@SeekbarCompatibility +@Name("show-seekbar") +@Description("Shows progress bar for all video.") +@ShowSeekbarCompatibility @Version("0.0.1") -class TiktokSeekbarPatch : BytecodePatch( +class ShowSeekbarPatch : BytecodePatch( listOf( AwemeGetVideoControlFingerprint ) diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/annotations/SpeedCompatibility.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/annotations/PlaybackSpeedCompatibility.kt similarity index 87% rename from src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/annotations/SpeedCompatibility.kt rename to src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/annotations/PlaybackSpeedCompatibility.kt index af78df2f7..33c3dc45b 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/annotations/SpeedCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/annotations/PlaybackSpeedCompatibility.kt @@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package ) @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.RUNTIME) -internal annotation class SpeedCompatibility +internal annotation class PlaybackSpeedCompatibility diff --git a/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/patch/SpeedPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/patch/PlaybackSpeedPatch.kt similarity index 93% rename from src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/patch/SpeedPatch.kt rename to src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/patch/PlaybackSpeedPatch.kt index 1023fc0d8..c1f15a75d 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/patch/SpeedPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/interaction/speed/patch/PlaybackSpeedPatch.kt @@ -11,16 +11,16 @@ import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod -import app.revanced.patches.tiktok.interaction.speed.annotations.SpeedCompatibility +import app.revanced.patches.tiktok.interaction.speed.annotations.PlaybackSpeedCompatibility import app.revanced.patches.tiktok.interaction.speed.fingerprints.SpeedControlParentFingerprint import org.jf.dexlib2.Opcode @Patch -@Name("tiktok-speed") +@Name("playback-speed") @Description("Enables the playback speed option for all videos.") -@SpeedCompatibility +@PlaybackSpeedCompatibility @Version("0.0.1") -class SpeedPatch : BytecodePatch( +class PlaybackSpeedPatch : BytecodePatch( listOf( SpeedControlParentFingerprint ) diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/annotations/TikTokIntegrationsCompatibility.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/annotations/IntegrationsCompatibility.kt similarity index 86% rename from src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/annotations/TikTokIntegrationsCompatibility.kt rename to src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/annotations/IntegrationsCompatibility.kt index 5b1c277e6..e397ecf30 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/annotations/TikTokIntegrationsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/annotations/IntegrationsCompatibility.kt @@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package ) @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.RUNTIME) -internal annotation class TikTokIntegrationsCompatibility \ No newline at end of file +internal annotation class IntegrationsCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/patch/TikTokIntegrationsPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/patch/IntegrationsPatch.kt similarity index 72% rename from src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/patch/TikTokIntegrationsPatch.kt rename to src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/patch/IntegrationsPatch.kt index 5d81d9396..6deed2970 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/patch/TikTokIntegrationsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/integrations/patch/IntegrationsPatch.kt @@ -1,13 +1,13 @@ package app.revanced.patches.tiktok.misc.integrations.patch import app.revanced.patcher.annotation.Name -import app.revanced.patches.tiktok.misc.integrations.annotations.TikTokIntegrationsCompatibility +import app.revanced.patches.tiktok.misc.integrations.annotations.IntegrationsCompatibility import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprint import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch -@Name("tiktok-integrations") -@TikTokIntegrationsCompatibility -class TikTokIntegrationsPatch : AbstractIntegrationsPatch( +@Name("integrations") +@IntegrationsCompatibility +class IntegrationsPatch : AbstractIntegrationsPatch( "Lapp/revanced/tiktok/utils/ReVancedUtils;", listOf(InitFingerprint) ) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/annotations/DisableLoginRequirementCompatibility.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/annotations/DisableLoginRequirementCompatibility.kt new file mode 100644 index 000000000..64acf153b --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/annotations/DisableLoginRequirementCompatibility.kt @@ -0,0 +1,14 @@ +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) +@Retention(AnnotationRetention.RUNTIME) +internal annotation class DisableLoginRequirementCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/forcelogin/fingerprints/MandatoryLoginServiceFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/fingerprints/MandatoryLoginServiceFingerprint.kt similarity index 79% rename from src/main/kotlin/app/revanced/patches/tiktok/misc/forcelogin/fingerprints/MandatoryLoginServiceFingerprint.kt rename to src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/fingerprints/MandatoryLoginServiceFingerprint.kt index 6c5290115..842dcae2d 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/forcelogin/fingerprints/MandatoryLoginServiceFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/fingerprints/MandatoryLoginServiceFingerprint.kt @@ -1,7 +1,6 @@ -package app.revanced.patches.tiktok.misc.forcelogin.fingerprints +package app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint - object MandatoryLoginServiceFingerprint : MethodFingerprint( customFingerprint = { methodDef -> methodDef.definingClass.endsWith("/MandatoryLoginService;") && diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/forcelogin/fingerprints/MandatoryLoginServiceFingerprint2.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/fingerprints/MandatoryLoginServiceFingerprint2.kt similarity index 66% rename from src/main/kotlin/app/revanced/patches/tiktok/misc/forcelogin/fingerprints/MandatoryLoginServiceFingerprint2.kt rename to src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/fingerprints/MandatoryLoginServiceFingerprint2.kt index 62eabf353..59015a6b6 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/forcelogin/fingerprints/MandatoryLoginServiceFingerprint2.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/fingerprints/MandatoryLoginServiceFingerprint2.kt @@ -1,12 +1,12 @@ -package app.revanced.patches.tiktok.misc.forcelogin.fingerprints +package app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Version import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.patches.tiktok.misc.forcelogin.annotations.DisableForceLoginCompatibility +import app.revanced.patches.tiktok.misc.login.disablerequirement.annotations.DisableLoginRequirementCompatibility @Name("mandatory-login-service-fingerprint2") -@DisableForceLoginCompatibility +@DisableLoginRequirementCompatibility @Version("0.0.1") object MandatoryLoginServiceFingerprint2 : MethodFingerprint( customFingerprint = { methodDef -> diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/forcelogin/patch/DisableForceLoginPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/patch/DisableLoginRequirementPatch.kt similarity index 67% rename from src/main/kotlin/app/revanced/patches/tiktok/misc/forcelogin/patch/DisableForceLoginPatch.kt rename to src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/patch/DisableLoginRequirementPatch.kt index 928c912a2..0967f7269 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/forcelogin/patch/DisableForceLoginPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/disablerequirement/patch/DisableLoginRequirementPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.tiktok.misc.forcelogin.patch +package app.revanced.patches.tiktok.misc.login.disablerequirement.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name @@ -9,16 +9,16 @@ import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.tiktok.misc.forcelogin.annotations.DisableForceLoginCompatibility -import app.revanced.patches.tiktok.misc.forcelogin.fingerprints.MandatoryLoginServiceFingerprint -import app.revanced.patches.tiktok.misc.forcelogin.fingerprints.MandatoryLoginServiceFingerprint2 +import app.revanced.patches.tiktok.misc.login.disablerequirement.annotations.DisableLoginRequirementCompatibility +import app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints.MandatoryLoginServiceFingerprint +import app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints.MandatoryLoginServiceFingerprint2 @Patch -@Name("tiktok-force-login") +@Name("disable-login-requirement") @Description("Do not force login.") -@DisableForceLoginCompatibility +@DisableLoginRequirementCompatibility @Version("0.0.1") -class DisableForceLoginPatch : BytecodePatch( +class DisableLoginRequirementPatch : BytecodePatch( listOf( MandatoryLoginServiceFingerprint, MandatoryLoginServiceFingerprint2 diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/forcelogin/annotations/DisableForceLoginCompatibility.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/annotations/FixGoogleLoginCompatibility.kt similarity index 70% rename from src/main/kotlin/app/revanced/patches/tiktok/misc/forcelogin/annotations/DisableForceLoginCompatibility.kt rename to src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/annotations/FixGoogleLoginCompatibility.kt index eaf11e684..0f03b09df 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/forcelogin/annotations/DisableForceLoginCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/annotations/FixGoogleLoginCompatibility.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.tiktok.misc.forcelogin.annotations +package app.revanced.patches.tiktok.misc.login.fixgoogle.annotations import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Package @@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package ) @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.RUNTIME) -internal annotation class DisableForceLoginCompatibility \ No newline at end of file +internal annotation class FixGoogleLoginCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/fingerprints/GoogleAuthAvailableFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleAuthAvailableFingerprint.kt similarity index 86% rename from src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/fingerprints/GoogleAuthAvailableFingerprint.kt rename to src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleAuthAvailableFingerprint.kt index d4e6cfbce..2e1a1eaf1 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/fingerprints/GoogleAuthAvailableFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleAuthAvailableFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.tiktok.misc.loginfallback.fingerprints +package app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/fingerprints/GoogleOneTapAuthAvailableFingerprint.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleOneTapAuthAvailableFingerprint.kt similarity index 86% rename from src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/fingerprints/GoogleOneTapAuthAvailableFingerprint.kt rename to src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleOneTapAuthAvailableFingerprint.kt index 5cb14e864..26e51a522 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/fingerprints/GoogleOneTapAuthAvailableFingerprint.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/fingerprints/GoogleOneTapAuthAvailableFingerprint.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.tiktok.misc.loginfallback.fingerprints +package app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints import app.revanced.patcher.extensions.or import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/patch/TikTokLoginFallbackPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/patch/FixGoogleLoginPatch.kt similarity index 71% rename from src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/patch/TikTokLoginFallbackPatch.kt rename to src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/patch/FixGoogleLoginPatch.kt index 9b32a9020..9e27025c7 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/patch/TikTokLoginFallbackPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/login/fixgoogle/patch/FixGoogleLoginPatch.kt @@ -1,4 +1,4 @@ -package app.revanced.patches.tiktok.misc.loginfallback.patch +package app.revanced.patches.tiktok.misc.login.fixgoogle.patch import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Name @@ -9,16 +9,16 @@ import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.tiktok.misc.loginfallback.annotations.TikTokWebLoginCompatibility -import app.revanced.patches.tiktok.misc.loginfallback.fingerprints.GoogleAuthAvailableFingerprint -import app.revanced.patches.tiktok.misc.loginfallback.fingerprints.GoogleOneTapAuthAvailableFingerprint +import app.revanced.patches.tiktok.misc.login.fixgoogle.annotations.FixGoogleLoginCompatibility +import app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints.GoogleAuthAvailableFingerprint +import app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints.GoogleOneTapAuthAvailableFingerprint @Patch -@Name("tiktok-web-login") +@Name("fix-google-login") @Description("Allows logging in with a Google account.") -@TikTokWebLoginCompatibility +@FixGoogleLoginCompatibility @Version("0.0.1") -class TikTokLoginFallbackPatch : BytecodePatch( +class FixGoogleLoginPatch : BytecodePatch( listOf( GoogleOneTapAuthAvailableFingerprint, GoogleAuthAvailableFingerprint diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/annotations/TikTokWebLoginCompatibility.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/annotations/TikTokWebLoginCompatibility.kt deleted file mode 100644 index dcdd93c59..000000000 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/loginfallback/annotations/TikTokWebLoginCompatibility.kt +++ /dev/null @@ -1,14 +0,0 @@ -package app.revanced.patches.tiktok.misc.loginfallback.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) -@Retention(AnnotationRetention.RUNTIME) -internal annotation class TikTokWebLoginCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/annotations/TikTokSettingsCompatibility.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/annotations/SettingsCompatibility.kt similarity index 87% rename from src/main/kotlin/app/revanced/patches/tiktok/misc/settings/annotations/TikTokSettingsCompatibility.kt rename to src/main/kotlin/app/revanced/patches/tiktok/misc/settings/annotations/SettingsCompatibility.kt index 413a29438..8aa98d70c 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/annotations/TikTokSettingsCompatibility.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/annotations/SettingsCompatibility.kt @@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package ) @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.RUNTIME) -internal annotation class TikTokSettingsCompatibility \ No newline at end of file +internal annotation class SettingsCompatibility \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/patch/TikTokSettingsPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/patch/SettingsPatch.kt similarity index 94% rename from src/main/kotlin/app/revanced/patches/tiktok/misc/settings/patch/TikTokSettingsPatch.kt rename to src/main/kotlin/app/revanced/patches/tiktok/misc/settings/patch/SettingsPatch.kt index 1357d66c0..20b9228e0 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/patch/TikTokSettingsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/settings/patch/SettingsPatch.kt @@ -13,8 +13,8 @@ import app.revanced.patcher.patch.PatchResultError import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch -import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch -import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility +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.AboutOnClickMethodFingerprint import app.revanced.patches.tiktok.misc.settings.fingerprints.AdPersonalizationActivityOnCreateFingerprint import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsOnViewCreatedFingerprint @@ -27,12 +27,12 @@ import org.jf.dexlib2.iface.reference.StringReference import org.jf.dexlib2.iface.reference.TypeReference @Patch -@DependsOn([TikTokIntegrationsPatch::class]) -@Name("tiktok-settings") +@DependsOn([IntegrationsPatch::class]) +@Name("settings") @Description("Adds settings for ReVanced to TikTok.") -@TikTokSettingsCompatibility +@SettingsCompatibility @Version("0.0.1") -class TikTokSettingsPatch : BytecodePatch( +class SettingsPatch : BytecodePatch( listOf( AdPersonalizationActivityOnCreateFingerprint, SettingsOnViewCreatedFingerprint, diff --git a/src/main/kotlin/app/revanced/patches/tiktok/misc/spoof/sim/patch/SpoofSimPatch.kt b/src/main/kotlin/app/revanced/patches/tiktok/misc/spoof/sim/patch/SpoofSimPatch.kt index 1b6a5485d..822a2e2fb 100644 --- a/src/main/kotlin/app/revanced/patches/tiktok/misc/spoof/sim/patch/SpoofSimPatch.kt +++ b/src/main/kotlin/app/revanced/patches/tiktok/misc/spoof/sim/patch/SpoofSimPatch.kt @@ -14,9 +14,9 @@ import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod -import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch +import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint -import app.revanced.patches.tiktok.misc.settings.patch.TikTokSettingsPatch +import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch import app.revanced.patches.tiktok.misc.spoof.sim.annotations.SpoofSimCompatibility import org.jf.dexlib2.Opcode import org.jf.dexlib2.iface.instruction.OneRegisterInstruction @@ -24,7 +24,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c import org.jf.dexlib2.iface.reference.MethodReference @Patch(false) -@DependsOn([TikTokIntegrationsPatch::class, TikTokSettingsPatch::class]) +@DependsOn([IntegrationsPatch::class, SettingsPatch::class]) @Name("sim-spoof") @Description("Spoofs the information which is retrieved from the sim-card.") @SpoofSimCompatibility