mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-25 18:34:07 +01:00
Compare commits
7 Commits
v4.8.0-dev
...
v4.8.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fecfffc48f | ||
|
|
cca5a8b44d | ||
|
|
c09eaa5911 | ||
|
|
09d20158a3 | ||
|
|
5d56662637 | ||
|
|
0e42d1b224 | ||
|
|
bf61b51856 |
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,3 +1,25 @@
|
||||
# [4.8.0-dev.23](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.22...v4.8.0-dev.23) (2024-05-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Piccoma:** Add `Spoof Android device ID` patch ([#3145](https://github.com/ReVanced/revanced-patches/issues/3145)) ([d953c6b](https://github.com/ReVanced/revanced-patches/commit/d953c6bdd4315d2ba44845fd569a3d12ac4d1af0))
|
||||
|
||||
# [4.8.0-dev.22](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.21...v4.8.0-dev.22) (2024-05-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Use correct preference key ([3732b2c](https://github.com/ReVanced/revanced-patches/commit/3732b2ce6b617b4c1c6647397b614f8a040eece3))
|
||||
|
||||
# [4.8.0-dev.21](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.20...v4.8.0-dev.21) (2024-05-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Piccoma:** Add `Disable tracking` patch ([#3143](https://github.com/ReVanced/revanced-patches/issues/3143)) ([8ab9e8f](https://github.com/ReVanced/revanced-patches/commit/8ab9e8f89d2bd014138e31dab7004f8ba77cae10))
|
||||
* **YouTube - Navigation buttons:** Add option to hide navigation button labels ([#3189](https://github.com/ReVanced/revanced-patches/issues/3189)) ([f9dc705](https://github.com/ReVanced/revanced-patches/commit/f9dc7050513b9fdb7766838a63a172f1478296f7))
|
||||
|
||||
# [4.8.0-dev.20](https://github.com/ReVanced/revanced-patches/compare/v4.8.0-dev.19...v4.8.0-dev.20) (2024-05-16)
|
||||
|
||||
|
||||
|
||||
@@ -487,6 +487,18 @@ public final class app/revanced/patches/photomath/misc/unlock/plus/UnlockPlusPat
|
||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/piccomafr/misc/SpoofAndroidDeviceIdPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||
public static final field INSTANCE Lapp/revanced/patches/piccomafr/misc/SpoofAndroidDeviceIdPatch;
|
||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/piccomafr/tracking/DisableTrackingPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||
public static final field INSTANCE Lapp/revanced/patches/piccomafr/tracking/DisableTrackingPatch;
|
||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||
public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/pixiv/ads/HideAdsPatch : app/revanced/patcher/patch/BytecodePatch {
|
||||
public static final field INSTANCE Lapp/revanced/patches/pixiv/ads/HideAdsPatch;
|
||||
public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 4.8.0-dev.20
|
||||
version = 4.8.0-dev.23
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package app.revanced.patches.piccomafr.misc
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
|
||||
import app.revanced.patches.piccomafr.misc.fingerprints.GetAndroidIDFingerprint
|
||||
import app.revanced.util.exception
|
||||
|
||||
@Patch(
|
||||
name = "Spoof Android device ID",
|
||||
description = "Spoofs the Android device ID used by the app for account authentication." +
|
||||
"This can be used to copy the account to another device.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.piccomaeurope.fr",
|
||||
[
|
||||
"6.4.0",
|
||||
"6.4.1",
|
||||
"6.4.2",
|
||||
"6.4.3",
|
||||
"6.4.4",
|
||||
"6.4.5",
|
||||
"6.5.0",
|
||||
"6.5.1",
|
||||
"6.5.2",
|
||||
"6.5.3",
|
||||
"6.5.4",
|
||||
"6.6.0",
|
||||
"6.6.1",
|
||||
"6.6.2",
|
||||
],
|
||||
),
|
||||
],
|
||||
use = false,
|
||||
)
|
||||
@Suppress("unused")
|
||||
object SpoofAndroidDeviceIdPatch : BytecodePatch(
|
||||
setOf(GetAndroidIDFingerprint),
|
||||
) {
|
||||
private var androidDeviceId =
|
||||
stringPatchOption(
|
||||
key = "android-device-id",
|
||||
default = "0011223344556677",
|
||||
title = "Android device ID",
|
||||
description = "The Android device ID to spoof to.",
|
||||
required = true,
|
||||
) { it!!.matches("[A-Fa-f0-9]{16}".toRegex()) }
|
||||
|
||||
override fun execute(context: BytecodeContext) = GetAndroidIDFingerprint.result?.mutableMethod?.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const-string v0, "$androidDeviceId"
|
||||
return-object v0
|
||||
""",
|
||||
) ?: throw GetAndroidIDFingerprint.exception
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package app.revanced.patches.piccomafr.misc.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
|
||||
internal object GetAndroidIDFingerprint : MethodFingerprint(
|
||||
parameters = listOf("Landroid/content/Context"),
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
strings = listOf(
|
||||
"context",
|
||||
"android_id"
|
||||
),
|
||||
returnType = "Ljava/lang/String"
|
||||
)
|
||||
@@ -0,0 +1,80 @@
|
||||
package app.revanced.patches.piccomafr.tracking
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.piccomafr.tracking.fingerprints.AppMesurementFingerprint
|
||||
import app.revanced.patches.piccomafr.tracking.fingerprints.FacebookSDKFingerprint
|
||||
import app.revanced.patches.piccomafr.tracking.fingerprints.FirebaseInstallFingerprint
|
||||
import app.revanced.util.exception
|
||||
import app.revanced.util.getReference
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
||||
|
||||
@Patch(
|
||||
name = "Disable tracking",
|
||||
description = "Disables tracking by replacing tracking URLs with example.com.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.piccomaeurope.fr",
|
||||
[
|
||||
"6.4.0",
|
||||
"6.4.1",
|
||||
"6.4.2",
|
||||
"6.4.3",
|
||||
"6.4.4",
|
||||
"6.4.5",
|
||||
"6.5.0",
|
||||
"6.5.1",
|
||||
"6.5.2",
|
||||
"6.5.3",
|
||||
"6.5.4",
|
||||
"6.6.0",
|
||||
"6.6.1",
|
||||
"6.6.2",
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
@Suppress("unused")
|
||||
object DisableTrackingPatch : BytecodePatch(
|
||||
setOf(FacebookSDKFingerprint, FirebaseInstallFingerprint, AppMesurementFingerprint),
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
FacebookSDKFingerprint.result?.mutableMethod?.apply {
|
||||
getInstructions().filter { instruction ->
|
||||
instruction.opcode == Opcode.CONST_STRING
|
||||
}.forEach { instruction ->
|
||||
instruction as OneRegisterInstruction
|
||||
|
||||
replaceInstruction(
|
||||
instruction.location.index,
|
||||
"const-string v${instruction.registerA}, \"example.com\"",
|
||||
)
|
||||
}
|
||||
} ?: throw FacebookSDKFingerprint.exception
|
||||
|
||||
FirebaseInstallFingerprint.result?.mutableMethod?.apply {
|
||||
getInstructions().filter {
|
||||
it.opcode == Opcode.CONST_STRING
|
||||
}.filter {
|
||||
it.getReference<StringReference>()?.string == "firebaseinstallations.googleapis.com"
|
||||
}.forEach { instruction ->
|
||||
instruction as OneRegisterInstruction
|
||||
|
||||
replaceInstruction(
|
||||
instruction.location.index,
|
||||
"const-string v${instruction.registerA}, \"example.com\"",
|
||||
)
|
||||
}
|
||||
} ?: throw FirebaseInstallFingerprint.exception
|
||||
|
||||
AppMesurementFingerprint.result?.mutableMethod?.addInstruction(0, "return-void")
|
||||
?: throw AppMesurementFingerprint.exception
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package app.revanced.patches.piccomafr.tracking.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
|
||||
internal object AppMesurementFingerprint : MethodFingerprint(
|
||||
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
||||
strings = listOf(
|
||||
"config/app/",
|
||||
"Fetching remote configuration"
|
||||
),
|
||||
returnType = "V"
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
package app.revanced.patches.piccomafr.tracking.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
|
||||
internal object FacebookSDKFingerprint : MethodFingerprint(
|
||||
accessFlags = AccessFlags.STATIC or AccessFlags.CONSTRUCTOR,
|
||||
strings = listOf(
|
||||
"instagram.com",
|
||||
"facebook.com"
|
||||
),
|
||||
returnType = "V"
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
package app.revanced.patches.piccomafr.tracking.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
|
||||
internal object FirebaseInstallFingerprint : MethodFingerprint(
|
||||
accessFlags = AccessFlags.PRIVATE.value,
|
||||
strings = listOf(
|
||||
"https://%s/%s/%s",
|
||||
"firebaseinstallations.googleapis.com"
|
||||
)
|
||||
)
|
||||
@@ -1,6 +1,7 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.navigation
|
||||
|
||||
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
|
||||
@@ -12,11 +13,16 @@ import app.revanced.patches.shared.misc.settings.preference.PreferenceScreen.Sor
|
||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||
import app.revanced.patches.youtube.layout.buttons.navigation.fingerprints.ANDROID_AUTOMOTIVE_STRING
|
||||
import app.revanced.patches.youtube.layout.buttons.navigation.fingerprints.AddCreateButtonViewFingerprint
|
||||
import app.revanced.patches.youtube.layout.buttons.navigation.fingerprints.CreatePivotBarFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.navigation.NavigationBarHookPatch
|
||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||
import app.revanced.util.exception
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@Patch(
|
||||
name = "Navigation buttons",
|
||||
@@ -49,14 +55,17 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"19.08.36",
|
||||
"19.09.38",
|
||||
"19.10.39",
|
||||
"19.11.43"
|
||||
"19.11.43",
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
@Suppress("unused")
|
||||
object NavigationButtonsPatch : BytecodePatch(
|
||||
setOf(AddCreateButtonViewFingerprint),
|
||||
setOf(
|
||||
AddCreateButtonViewFingerprint,
|
||||
CreatePivotBarFingerprint,
|
||||
),
|
||||
) {
|
||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/youtube/patches/NavigationButtonsPatch;"
|
||||
@@ -74,6 +83,7 @@ object NavigationButtonsPatch : BytecodePatch(
|
||||
SwitchPreference("revanced_hide_create_button"),
|
||||
SwitchPreference("revanced_hide_subscriptions_button"),
|
||||
SwitchPreference("revanced_switch_create_with_notifications_button"),
|
||||
SwitchPreference("revanced_hide_navigation_button_labels"),
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -99,6 +109,21 @@ object NavigationButtonsPatch : BytecodePatch(
|
||||
}
|
||||
} ?: throw AddCreateButtonViewFingerprint.exception
|
||||
|
||||
// Hide navigation button labels.
|
||||
CreatePivotBarFingerprint.result?.mutableMethod?.apply {
|
||||
val setTextIndex = indexOfFirstInstruction {
|
||||
getReference<MethodReference>()?.name == "setText"
|
||||
}
|
||||
|
||||
val targetRegister = getInstruction<FiveRegisterInstruction>(setTextIndex).registerC
|
||||
|
||||
addInstruction(
|
||||
setTextIndex,
|
||||
"invoke-static { v$targetRegister }, " +
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->hideNavigationButtonLabels(Landroid/widget/TextView;)V",
|
||||
)
|
||||
} ?: throw CreatePivotBarFingerprint.exception
|
||||
|
||||
// Hook navigation button created, in order to hide them.
|
||||
NavigationBarHookPatch.hookNavigationButtonCreated(INTEGRATIONS_CLASS_DESCRIPTOR)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package app.revanced.patches.youtube.layout.buttons.navigation.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal object CreatePivotBarFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
parameters = listOf(
|
||||
"Lcom/google/android/libraries/youtube/rendering/ui/pivotbar/PivotBar;",
|
||||
"Landroid/widget/TextView;",
|
||||
"Ljava/lang/CharSequence;",
|
||||
),
|
||||
opcodes = listOf(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.RETURN_VOID,
|
||||
),
|
||||
)
|
||||
@@ -437,6 +437,9 @@
|
||||
<string name="revanced_switch_create_with_notifications_button_title">Switch Create with Notifications</string>
|
||||
<string name="revanced_switch_create_with_notifications_button_summary_on">Create button is switched with Notifications button\n\nNote: Enabling this also forcibly hides video ads</string>
|
||||
<string name="revanced_switch_create_with_notifications_button_summary_off">Create button is not switched with Notifications button</string>
|
||||
<string name="revanced_hide_navigation_button_labels_title">Hide navigation button labels</string>
|
||||
<string name="revanced_hide_navigation_button_labels_summary_on">Labels are hidden</string>
|
||||
<string name="revanced_hide_navigation_button_labels_summary_off">Labels are shown</string>
|
||||
</patch>
|
||||
<patch id="layout.hide.player.flyoutmenupanel.HidePlayerFlyoutMenuPatch">
|
||||
<string name="revanced_hide_player_flyout_title">Flyout menu</string>
|
||||
|
||||
Reference in New Issue
Block a user