Skip to content

Commit 297dd62

Browse files
committed
fix(GmsCore support): Patched apps are not added to Cloud Messaging inotia00/ReVanced_Extended#2691
1 parent 0fb4934 commit 297dd62

File tree

3 files changed

+0
-60
lines changed

3 files changed

+0
-60
lines changed

extensions/shared/src/main/java/app/revanced/extension/shared/patches/spoof/SpoofStreamingDataPatch.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,6 @@ public static boolean isSpoofingEnabled() {
109109
return SPOOF_STREAMING_DATA;
110110
}
111111

112-
/**
113-
* Injection point.
114-
*/
115-
public static Object isSpoofingEnabled(Object original) {
116-
if (!SPOOF_STREAMING_DATA) {
117-
return original;
118-
}
119-
return null;
120-
}
121-
122112
/**
123113
* Injection point.
124114
* This method is only invoked when playing a livestream on an iOS client.

patches/src/main/kotlin/app/revanced/patches/shared/spoof/streamingdata/BaseSpoofStreamingDataPatch.kt

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,11 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMu
1414
import app.revanced.patches.shared.extension.Constants.SPOOF_PATH
1515
import app.revanced.patches.shared.formatStreamModelConstructorFingerprint
1616
import app.revanced.util.findInstructionIndicesReversedOrThrow
17-
import app.revanced.util.findMethodOrThrow
1817
import app.revanced.util.fingerprint.definingClassOrThrow
1918
import app.revanced.util.fingerprint.injectLiteralInstructionBooleanCall
2019
import app.revanced.util.fingerprint.matchOrThrow
2120
import app.revanced.util.fingerprint.methodOrThrow
22-
import app.revanced.util.fingerprint.mutableClassOrThrow
2321
import app.revanced.util.getReference
24-
import app.revanced.util.getWalkerMethod
2522
import app.revanced.util.indexOfFirstInstructionOrThrow
2623
import com.android.tools.smali.dexlib2.AccessFlags
2724
import com.android.tools.smali.dexlib2.Opcode
@@ -370,35 +367,4 @@ fun baseSpoofStreamingDataPatch(
370367
executeBlock()
371368

372369
}
373-
374-
finalize {
375-
gmsServiceBrokerFingerprint.methodOrThrow()
376-
.addInstructionsWithLabels(
377-
0, """
378-
invoke-static {}, $EXTENSION_CLASS_DESCRIPTOR->isSpoofingEnabled()Z
379-
move-result v0
380-
if-eqz v0, :ignore
381-
return-void
382-
:ignore
383-
nop
384-
"""
385-
)
386-
387-
gmsServiceBrokerExceptionFingerprint.matchOrThrow().let {
388-
val walkerIndex = it.patternMatch!!.startIndex
389-
val walkerMethod = it.getWalkerMethod(walkerIndex)
390-
391-
walkerMethod.apply {
392-
val insertIndex = indexOfFirstInstructionOrThrow(Opcode.CHECK_CAST)
393-
val insertRegister = getInstruction<OneRegisterInstruction>(insertIndex).registerA
394-
395-
addInstructions(
396-
insertIndex + 1, """
397-
invoke-static {v$insertRegister}, $EXTENSION_CLASS_DESCRIPTOR->isSpoofingEnabled(Ljava/lang/Object;)Ljava/lang/Object;
398-
move-result-object v$insertRegister
399-
"""
400-
)
401-
}
402-
}
403-
}
404370
}

patches/src/main/kotlin/app/revanced/patches/shared/spoof/streamingdata/Fingerprints.kt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -198,20 +198,4 @@ internal val hlsCurrentTimeFingerprint = legacyFingerprint(
198198
literals = listOf(HLS_CURRENT_TIME_FEATURE_FLAG),
199199
)
200200

201-
internal val gmsServiceBrokerFingerprint = legacyFingerprint(
202-
name = "gmsServiceBrokerFingerprint",
203-
returnType = "V",
204-
strings = listOf("mServiceBroker is null, client disconnected")
205-
)
206-
207-
internal val gmsServiceBrokerExceptionFingerprint = legacyFingerprint(
208-
name = "gmsServiceBrokerExceptionFingerprint",
209-
returnType = "V",
210-
parameters = listOf("Ljava/lang/Exception;"),
211-
opcodes = listOf(
212-
Opcode.INVOKE_VIRTUAL,
213-
Opcode.RETURN_VOID
214-
),
215-
strings = listOf("Exception must not be null")
216-
)
217201

0 commit comments

Comments
 (0)