File tree 2 files changed +6
-8
lines changed
patches/src/main/kotlin/app/revanced/patches/spotify/misc/fix
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,5 @@ package app.revanced.patches.spotify.misc.fix
3
3
import app.revanced.patcher.fingerprint
4
4
5
5
internal val getPackageInfoFingerprint = fingerprint {
6
- strings(
7
- " Failed to get the application signatures" ,
8
- " Failed to get installer package"
9
- )
6
+ strings(" Failed to get the application signatures" )
10
7
}
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ package app.revanced.patches.spotify.misc.fix
3
3
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
4
4
import app.revanced.patcher.extensions.InstructionExtensions.instructions
5
5
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
6
+ import app.revanced.patcher.fingerprint
6
7
import app.revanced.patcher.patch.bytecodePatch
7
8
import app.revanced.util.addInstructionsAtControlFlowLabel
8
- import app.revanced.util.indexOfFirstInstructionOrThrow
9
9
import app.revanced.util.indexOfFirstInstructionReversedOrThrow
10
10
import com.android.tools.smali.dexlib2.Opcode
11
11
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@@ -37,10 +37,11 @@ val spoofPackageInfoPatch = bytecodePatch(
37
37
38
38
// region Spoof installer name.
39
39
40
- val failedToGetInstallerPackageStringIndex = getPackageInfoFingerprint.stringMatches!! .last().index
40
+ // Old versions of Spotify do not check the installer name.
41
+ fingerprint { strings(" Failed to get installer package" ) }.matchOrNull(this ) ? : return @execute
41
42
42
- val returnInstallerNameIndex = indexOfFirstInstructionOrThrow (
43
- failedToGetInstallerPackageStringIndex ,
43
+ val returnInstallerNameIndex = indexOfFirstInstructionReversedOrThrow (
44
+ instructions.size ,
44
45
Opcode .RETURN_OBJECT
45
46
)
46
47
You can’t perform that action at this time.
0 commit comments