mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-04-29 22:24:27 +02:00
chore: Merge branch dev
to main
(#4801)
This commit is contained in:
commit
1050c77efd
@ -1,3 +1,10 @@
|
||||
## [5.20.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v5.20.0...v5.20.1-dev.1) (2025-04-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Spotify - Custom theme:** Support latest app target ([#4800](https://github.com/ReVanced/revanced-patches/issues/4800)) ([03d0eb2](https://github.com/ReVanced/revanced-patches/commit/03d0eb2f8c0f3e48d53bdab38d34057f2020bb65))
|
||||
|
||||
# [5.20.0](https://github.com/ReVanced/revanced-patches/compare/v5.19.1...v5.20.0) (2025-04-15)
|
||||
|
||||
|
||||
|
@ -3,4 +3,4 @@ org.gradle.jvmargs = -Xms512M -Xmx2048M
|
||||
org.gradle.parallel = true
|
||||
android.useAndroidX = true
|
||||
kotlin.code.style = official
|
||||
version = 5.20.0
|
||||
version = 5.20.1-dev.1
|
||||
|
@ -5,7 +5,10 @@ import app.revanced.util.containsLiteralInstruction
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
internal val encoreThemeFingerprint = fingerprint {
|
||||
strings("No EncoreLayoutTheme provided")
|
||||
strings("Encore theme was not provided.") // Partial string match.
|
||||
custom { method, _ ->
|
||||
method.name == "invoke"
|
||||
}
|
||||
}
|
||||
|
||||
internal const val PLAYLIST_BACKGROUND_COLOR_LITERAL = 0xFF121212
|
||||
|
@ -3,15 +3,7 @@ package app.revanced.patches.spotify.misc.fix
|
||||
import app.revanced.patcher.fingerprint
|
||||
|
||||
internal val getPackageInfoFingerprint = fingerprint {
|
||||
strings(
|
||||
"Failed to get the application signatures",
|
||||
"Failed to get installer package"
|
||||
)
|
||||
}
|
||||
|
||||
internal val getPackageInfoLegacyFingerprint = fingerprint {
|
||||
strings(
|
||||
"Failed to get the application signatures"
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,15 @@
|
||||
package app.revanced.patches.spotify.misc.fix
|
||||
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patches.spotify.misc.extension.IS_SPOTIFY_LEGACY_APP_TARGET
|
||||
import app.revanced.util.addInstructionsAtControlFlowLabel
|
||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||
import app.revanced.util.findInstructionIndicesReversedOrThrow
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstructionReversedOrThrow
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@Suppress("unused")
|
||||
val spoofPackageInfoPatch = bytecodePatch(
|
||||
@ -18,18 +19,11 @@ val spoofPackageInfoPatch = bytecodePatch(
|
||||
compatibleWith("com.spotify.music")
|
||||
|
||||
execute {
|
||||
val getPackageInfoFingerprint = if (IS_SPOTIFY_LEGACY_APP_TARGET) {
|
||||
getPackageInfoLegacyFingerprint
|
||||
} else {
|
||||
getPackageInfoFingerprint
|
||||
}
|
||||
|
||||
getPackageInfoFingerprint.method.apply {
|
||||
val stringMatches = getPackageInfoFingerprint.stringMatches!!
|
||||
|
||||
// region Spoof signature.
|
||||
|
||||
val failedToGetSignaturesStringIndex = stringMatches.first().index
|
||||
val failedToGetSignaturesStringIndex =
|
||||
getPackageInfoFingerprint.stringMatches!!.first().index
|
||||
|
||||
val concatSignaturesIndex = indexOfFirstInstructionReversedOrThrow(
|
||||
failedToGetSignaturesStringIndex,
|
||||
@ -45,26 +39,23 @@ val spoofPackageInfoPatch = bytecodePatch(
|
||||
|
||||
// region Spoof installer name.
|
||||
|
||||
if (IS_SPOTIFY_LEGACY_APP_TARGET) {
|
||||
// Installer name is not used in the legacy app target.
|
||||
return@execute
|
||||
}
|
||||
|
||||
val expectedInstallerName = "com.android.vending"
|
||||
|
||||
val returnInstallerNameIndex = indexOfFirstInstructionOrThrow(
|
||||
stringMatches.last().index,
|
||||
Opcode.RETURN_OBJECT
|
||||
)
|
||||
findInstructionIndicesReversedOrThrow {
|
||||
val reference = getReference<MethodReference>()
|
||||
reference?.name == "getInstallerPackageName" || reference?.name == "getInstallingPackageName"
|
||||
}.forEach { index ->
|
||||
val returnObjectIndex = index + 1
|
||||
|
||||
val installerNameRegister = getInstruction<OneRegisterInstruction>(
|
||||
returnInstallerNameIndex
|
||||
).registerA
|
||||
val installerPackageNameRegister = getInstruction<OneRegisterInstruction>(
|
||||
returnObjectIndex
|
||||
).registerA
|
||||
|
||||
addInstructionsAtControlFlowLabel(
|
||||
returnInstallerNameIndex,
|
||||
"const-string v$installerNameRegister, \"$expectedInstallerName\""
|
||||
)
|
||||
addInstruction(
|
||||
returnObjectIndex + 1,
|
||||
"const-string v$installerPackageNameRegister, \"$expectedInstallerName\""
|
||||
)
|
||||
}
|
||||
|
||||
// endregion
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user