From bd6929857b1a4d173039eb8f0268e32022908990 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 2 Sep 2024 00:35:47 +0200 Subject: [PATCH 01/29] feat: Add `Check environment` patch --- api/revanced-patches.api | 10 ++ build.gradle.kts | 2 + settings.gradle.kts | 2 + .../misc/checks/BaseCheckEnvironmentPatch.kt | 161 ++++++++++++++++++ .../fingerprints/PatchInfoBuildFingerprint.kt | 7 + .../fingerprints/PatchInfoFingerprint.kt | 9 + .../misc/gms/BaseGmsCoreSupportPatch.kt | 4 +- .../misc/check/CheckEnvironmentPatch.kt | 13 ++ .../resources/addresources/values/strings.xml | 12 ++ stub/build.gradle.kts | 10 ++ stub/src/main/java/android/os/Build.java | 27 +++ 11 files changed, 255 insertions(+), 2 deletions(-) create mode 100644 src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt create mode 100644 src/main/kotlin/app/revanced/patches/shared/misc/checks/fingerprints/PatchInfoBuildFingerprint.kt create mode 100644 src/main/kotlin/app/revanced/patches/shared/misc/checks/fingerprints/PatchInfoFingerprint.kt create mode 100644 src/main/kotlin/app/revanced/patches/youtube/misc/check/CheckEnvironmentPatch.kt create mode 100644 stub/build.gradle.kts create mode 100644 stub/src/main/java/android/os/Build.java diff --git a/api/revanced-patches.api b/api/revanced-patches.api index 27fedbe324..a7135cbb58 100644 --- a/api/revanced-patches.api +++ b/api/revanced-patches.api @@ -854,6 +854,12 @@ public final class app/revanced/patches/serviceportalbund/detection/root/RootDet public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V } +public abstract class app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch : app/revanced/patcher/patch/BytecodePatch { + public fun (Lapp/revanced/patcher/fingerprint/MethodFingerprint;Ljava/util/Set;Lapp/revanced/patches/shared/misc/integrations/BaseIntegrationsPatch;)V + 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/shared/misc/fix/verticalscroll/VerticalScrollPatch : app/revanced/patcher/patch/BytecodePatch { public static final field INSTANCE Lapp/revanced/patches/shared/misc/fix/verticalscroll/VerticalScrollPatch; public fun execute (Lapp/revanced/patcher/data/BytecodeContext;)V @@ -1862,6 +1868,10 @@ public final class app/revanced/patches/youtube/misc/backgroundplayback/Backgrou public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V } +public final class app/revanced/patches/youtube/misc/check/CheckEnvironmentPatch : app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch { + public static final field INSTANCE Lapp/revanced/patches/youtube/misc/check/CheckEnvironmentPatch; +} + public final class app/revanced/patches/youtube/misc/debugging/DebuggingPatch : app/revanced/patcher/patch/ResourcePatch { public static final field INSTANCE Lapp/revanced/patches/youtube/misc/debugging/DebuggingPatch; public synthetic fun execute (Lapp/revanced/patcher/data/Context;)V diff --git a/build.gradle.kts b/build.gradle.kts index a9e0830e26..9ed1416786 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -31,6 +31,8 @@ dependencies { implementation(libs.guava) // Used in JsonGenerator. implementation(libs.gson) + // Android API stubs defined here. + compileOnly(project(":stub")) } kotlin { diff --git a/settings.gradle.kts b/settings.gradle.kts index 432b20014d..0988585a03 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,3 +5,5 @@ buildCache { isEnabled = "CI" !in System.getenv() } } + +include(":stub") diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt new file mode 100644 index 0000000000..d037df9759 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt @@ -0,0 +1,161 @@ +package app.revanced.patches.shared.misc.checks + +import android.os.Build.* +import app.revanced.patcher.data.BytecodeContext +import app.revanced.patcher.extensions.InstructionExtensions.addInstructions +import app.revanced.patcher.fingerprint.MethodFingerprint +import app.revanced.patcher.patch.BytecodePatch +import app.revanced.patcher.util.proxy.mutableTypes.encodedValue.MutableEncodedValue +import app.revanced.patcher.util.proxy.mutableTypes.encodedValue.MutableLongEncodedValue +import app.revanced.patcher.util.proxy.mutableTypes.encodedValue.MutableStringEncodedValue +import app.revanced.patches.all.misc.resources.AddResourcesPatch +import app.revanced.patches.shared.misc.checks.fingerprints.PatchInfoBuildFingerprint +import app.revanced.patches.shared.misc.checks.fingerprints.PatchInfoFingerprint +import app.revanced.patches.shared.misc.integrations.BaseIntegrationsPatch +import app.revanced.util.exception +import app.revanced.util.resultOrThrow +import com.android.tools.smali.dexlib2.immutable.value.ImmutableLongEncodedValue +import com.android.tools.smali.dexlib2.immutable.value.ImmutableStringEncodedValue +import java.io.BufferedReader +import java.io.InputStreamReader +import java.net.HttpURLConnection +import java.net.URL +import java.security.MessageDigest +import java.util.logging.Logger +import kotlin.io.encoding.Base64 +import kotlin.io.encoding.ExperimentalEncodingApi +import kotlin.random.Random + +abstract class BaseCheckEnvironmentPatch( + private val mainActivityOnCreateFingerprint: MethodFingerprint, + compatiblePackages: Set, + integrationsPatch: BaseIntegrationsPatch, +) : BytecodePatch( + name = "Check environment", + description = "Checks, if the application was patched by the user, otherwise warns the user.", + compatiblePackages = compatiblePackages, + dependencies = setOf( + AddResourcesPatch::class, + integrationsPatch::class, + ), + fingerprints = setOf( + PatchInfoFingerprint, + PatchInfoBuildFingerprint, + mainActivityOnCreateFingerprint, + ), +) { + override fun execute(context: BytecodeContext) { + AddResourcesPatch(BaseCheckEnvironmentPatch::class) + + setPatchInfo() + invokeRunChecks() + } + + private fun setPatchInfo() { + PatchInfoFingerprint.setClassFields( + "PUBLIC_IP_DURING_PATCH" to (publicIp ?: "").encodedAndHashed, + "PATCH_TIME" to System.currentTimeMillis().encoded, + ) + + fun setBuildInfo() { + try { + Class.forName("android.os.Build") + } catch (e: ClassNotFoundException) { + // This only works on Android, + // because it uses Android APIs. + return + } + + PatchInfoBuildFingerprint.setClassFields( + "PATCH_BOARD" to BOARD.encodedAndHashed, + "PATCH_BOOTLOADER" to BOOTLOADER.encodedAndHashed, + "PATCH_BRAND" to BRAND.encodedAndHashed, + "PATCH_CPU_ABI" to CPU_ABI.encodedAndHashed, + "PATCH_CPU_ABI2" to CPU_ABI2.encodedAndHashed, + "PATCH_DEVICE" to DEVICE.encodedAndHashed, + "PATCH_DISPLAY" to DISPLAY.encodedAndHashed, + "PATCH_FINGERPRINT" to FINGERPRINT.encodedAndHashed, + "PATCH_HARDWARE" to HARDWARE.encodedAndHashed, + "PATCH_HOST" to HOST.encodedAndHashed, + "PATCH_ID" to ID.encodedAndHashed, + "PATCH_MANUFACTURER" to MANUFACTURER.encodedAndHashed, + "PATCH_MODEL" to MODEL.encodedAndHashed, + "PATCH_ODM_SKU" to ODM_SKU.encodedAndHashed, + "PATCH_PRODUCT" to PRODUCT.encodedAndHashed, + "PATCH_RADIO" to RADIO.encodedAndHashed, + "PATCH_SERIAL" to SERIAL.encodedAndHashed, + "PATCH_SKU" to SKU.encodedAndHashed, + "PATCH_SOC_MANUFACTURER" to SOC_MANUFACTURER.encodedAndHashed, + "PATCH_SOC_MODEL" to SOC_MODEL.encodedAndHashed, + "PATCH_TAGS" to TAGS.encodedAndHashed, + "PATCH_TYPE" to TYPE.encodedAndHashed, + "PATCH_USER" to USER.encodedAndHashed, + ) + } + + setBuildInfo() + } + + private fun invokeRunChecks() = mainActivityOnCreateFingerprint.result?.mutableMethod?.addInstructions( + 0, + "invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->runChecks()V", + ) ?: throw mainActivityOnCreateFingerprint.exception + + private companion object { + private const val INTEGRATIONS_CLASS_DESCRIPTOR = + "Lapp/revanced/integrations/shared/checks/CheckEnvironmentPatch;" + + @OptIn(ExperimentalEncodingApi::class) + private val String.encodedAndHashed + get() = MutableStringEncodedValue( + ImmutableStringEncodedValue( + Base64.encode(MessageDigest.getInstance("SHA-1").digest(toByteArray())), + ), + ) + + private val Long.encoded get() = MutableLongEncodedValue(ImmutableLongEncodedValue(this)) + + private fun MethodFingerprint.setClassFields(vararg fieldNameValues: Pair) { + val fieldNameValueMap = mapOf(*fieldNameValues) + + resultOrThrow().mutableClass.fields.forEach { field -> + field.initialValue = fieldNameValueMap[field.name] ?: return@forEach + } + } + + private val publicIp: String? + get() { + // Using multiple services to increase reliability, distribute the load and minimize tracking. + val getIpServices = listOf( + "https://wtfismyip.com/text", + "https://whatsmyfuckingip.com/text", + "https://api.ipify.org?format=text", + "https://icanhazip.com", + "https://ifconfig.me/ip", + ) + + var publicIP: String? = null + + try { + val service = getIpServices[Random.Default.nextInt(getIpServices.size - 1)] + val urlConnection = URL(service).openConnection() as HttpURLConnection + + try { + val reader = BufferedReader(InputStreamReader(urlConnection.inputStream)) + + publicIP = reader.readLine() + + reader.close() + } finally { + urlConnection.disconnect() + } + } catch (e: Exception) { + // If the app does not have the INTERNET permission or the service is down, + // the public IP can not be retrieved. + Logger.getLogger(this::class.simpleName).severe("Failed to get public IP address: " + e.message) + } + + return publicIP + } + } +} diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/fingerprints/PatchInfoBuildFingerprint.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/fingerprints/PatchInfoBuildFingerprint.kt new file mode 100644 index 0000000000..106dde705d --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/fingerprints/PatchInfoBuildFingerprint.kt @@ -0,0 +1,7 @@ +package app.revanced.patches.shared.misc.checks.fingerprints + +import app.revanced.patcher.fingerprint.MethodFingerprint + +internal object PatchInfoBuildFingerprint : MethodFingerprint( + customFingerprint = { _, classDef -> classDef.type == "Lapp/revanced/integrations/shared/checks/PatchInfo\$Build;" }, +) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/fingerprints/PatchInfoFingerprint.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/fingerprints/PatchInfoFingerprint.kt new file mode 100644 index 0000000000..48d7d7dccc --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/fingerprints/PatchInfoFingerprint.kt @@ -0,0 +1,9 @@ +package app.revanced.patches.shared.misc.checks.fingerprints + +import app.revanced.patcher.fingerprint.MethodFingerprint + +internal object PatchInfoFingerprint : MethodFingerprint( + customFingerprint = { _, classDef -> + classDef.type == "Lapp/revanced/integrations/shared/checks/PatchInfo;" + }, +) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt index 26958a2d3a..5969d2c29a 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/gms/BaseGmsCoreSupportPatch.kt @@ -115,8 +115,8 @@ abstract class BaseGmsCoreSupportPatch( // Verify GmsCore is installed and whitelisted for power optimizations and background usage. mainActivityOnCreateFingerprint.result?.mutableMethod?.apply { - // Temporary fix for Google photos integration. - var setContextIndex = indexOfFirstInstruction { + // Temporary fix for patches with an integrations patch that hook the onCreate method as well. + val setContextIndex = indexOfFirstInstruction { val reference = getReference() ?: return@indexOfFirstInstruction false reference.toString() == "Lapp/revanced/integrations/shared/Utils;->setContext(Landroid/content/Context;)V" diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/check/CheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/check/CheckEnvironmentPatch.kt new file mode 100644 index 0000000000..01fd6814c6 --- /dev/null +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/check/CheckEnvironmentPatch.kt @@ -0,0 +1,13 @@ +package app.revanced.patches.youtube.misc.check + +import app.revanced.patches.shared.misc.checks.BaseCheckEnvironmentPatch +import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch +import app.revanced.patches.youtube.shared.fingerprints.MainActivityOnCreateFingerprint + +@Suppress("unused") +object CheckEnvironmentPatch : + BaseCheckEnvironmentPatch( + mainActivityOnCreateFingerprint = MainActivityOnCreateFingerprint, + integrationsPatch = IntegrationsPatch, + compatiblePackages = setOf(CompatiblePackage("com.google.android.youtube")), + ) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index db6abcaca3..9fe1351814 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -31,6 +31,18 @@ This is because Crowdin requires temporarily flattening this file and removing t --> + + Failed checks + Open official link + Ignore + Ignore (%s) + <p>This app looks to be pre-patched or obtained from someone other than you. It is possible, this app does not function correctly or is <b>harmful and even dangerous</b> to run and use.<p>It is strongly recommended to <b>uninstall this version of the app and patch it yourself</b> to ensure, all patches are intended and secure.<p>The following checks have failed and concluded this app to be pre-patched, obtained from someone else other than you, not correctly functional or <b>harmful and even dangerous</b> to use:</p><p>This warning will only be shown once more, if dismissed, and never again.<p>Uninstall this version of the app and patch it yourself, by opening the offical link below.</p><br><h2>Official links</h2><br><p>ReVanced is always available at <a href=https://revanced.app>revanced.app</a>.</p><br><ul><li><a href=https://revanced.app>Website</a><li><a href=https://revanced.app/discord>Discord</a><li><a href=https://www.reddit.com/r/revancedapp>Reddit</a><li><a href=https://twitter.com/revancedapp>Twitter</a><li><a href=https://t.me/app_revanced>Telegram</a><li><a href=https://www.youtube.com/@ReVanced>YouTube</a></ul> + Not installed by ReVanced Manager + No installation of ReVanced Manager found + Patched on another device + Patched longer than 10 minutes ago + IP during patching different from current + ReVanced Do you wish to proceed? diff --git a/stub/build.gradle.kts b/stub/build.gradle.kts new file mode 100644 index 0000000000..d80352d6ea --- /dev/null +++ b/stub/build.gradle.kts @@ -0,0 +1,10 @@ +plugins { + `java-library` +} + +description = "Provide Android API stubs for ReVanced Patches." + +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 +} diff --git a/stub/src/main/java/android/os/Build.java b/stub/src/main/java/android/os/Build.java new file mode 100644 index 0000000000..88ba702dc3 --- /dev/null +++ b/stub/src/main/java/android/os/Build.java @@ -0,0 +1,27 @@ +package android.os; + +public class Build { + public static final String BOARD = null; + public static final String BOOTLOADER = null; + public static final String BRAND = null; + public static final String CPU_ABI = null; + public static final String CPU_ABI2 = null; + public static final String DEVICE = null; + public static final String DISPLAY = null; + public static final String FINGERPRINT = null; + public static final String HARDWARE = null; + public static final String HOST = null; + public static final String ID = null; + public static final String MANUFACTURER = null; + public static final String MODEL = null; + public static final String ODM_SKU = null; + public static final String PRODUCT = null; + public static final String RADIO = null; + public static final String SERIAL = null; + public static final String SKU = null; + public static final String SOC_MANUFACTURER = null; + public static final String SOC_MODEL = null; + public static final String TAGS = null; + public static final String TYPE = null; + public static final String USER = null; +} From 87e2d0e46563230c062b21668ae502e280ef861f Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 2 Sep 2024 00:41:07 +0200 Subject: [PATCH 02/29] move check before calling function --- .../misc/checks/BaseCheckEnvironmentPatch.kt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt index d037df9759..ad23868ca1 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt @@ -58,14 +58,6 @@ abstract class BaseCheckEnvironmentPatch( ) fun setBuildInfo() { - try { - Class.forName("android.os.Build") - } catch (e: ClassNotFoundException) { - // This only works on Android, - // because it uses Android APIs. - return - } - PatchInfoBuildFingerprint.setClassFields( "PATCH_BOARD" to BOARD.encodedAndHashed, "PATCH_BOOTLOADER" to BOOTLOADER.encodedAndHashed, @@ -93,7 +85,12 @@ abstract class BaseCheckEnvironmentPatch( ) } - setBuildInfo() + try { + Class.forName("android.os.Build") + // This only works on Android, + // because it uses Android APIs. + setBuildInfo() + } catch (_: ClassNotFoundException) { } } private fun invokeRunChecks() = mainActivityOnCreateFingerprint.result?.mutableMethod?.addInstructions( From 20d001d024061459d17ddb32bee1b90b6b9c7c3b Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 2 Sep 2024 00:45:12 +0200 Subject: [PATCH 03/29] rename method --- .../patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt index ad23868ca1..494e7d0175 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt @@ -48,7 +48,7 @@ abstract class BaseCheckEnvironmentPatch( AddResourcesPatch(BaseCheckEnvironmentPatch::class) setPatchInfo() - invokeRunChecks() + invokeCheck() } private fun setPatchInfo() { @@ -93,9 +93,9 @@ abstract class BaseCheckEnvironmentPatch( } catch (_: ClassNotFoundException) { } } - private fun invokeRunChecks() = mainActivityOnCreateFingerprint.result?.mutableMethod?.addInstructions( + private fun invokeCheck() = mainActivityOnCreateFingerprint.result?.mutableMethod?.addInstructions( 0, - "invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->runChecks()V", + "invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->check()V", ) ?: throw mainActivityOnCreateFingerprint.exception private companion object { From 0c3865ae127ab021d334be2b1063dd454dce06b0 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 2 Sep 2024 01:02:43 +0200 Subject: [PATCH 04/29] use activity context --- .../patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt index 494e7d0175..6304b17327 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt @@ -95,7 +95,7 @@ abstract class BaseCheckEnvironmentPatch( private fun invokeCheck() = mainActivityOnCreateFingerprint.result?.mutableMethod?.addInstructions( 0, - "invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->check()V", + "invoke-static/range { p0 .. p0 },$INTEGRATIONS_CLASS_DESCRIPTOR->check(Landroid/app/Activity;)V", ) ?: throw mainActivityOnCreateFingerprint.exception private companion object { From 5acebd230efb4e359c95abf94008c61ab769dcbf Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 2 Sep 2024 03:48:14 +0400 Subject: [PATCH 05/29] small changes --- src/main/resources/addresources/values/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 9fe1351814..b704dc392e 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -36,12 +36,12 @@ This is because Crowdin requires temporarily flattening this file and removing t Open official link Ignore Ignore (%s) - <p>This app looks to be pre-patched or obtained from someone other than you. It is possible, this app does not function correctly or is <b>harmful and even dangerous</b> to run and use.<p>It is strongly recommended to <b>uninstall this version of the app and patch it yourself</b> to ensure, all patches are intended and secure.<p>The following checks have failed and concluded this app to be pre-patched, obtained from someone else other than you, not correctly functional or <b>harmful and even dangerous</b> to use:</p><p>This warning will only be shown once more, if dismissed, and never again.<p>Uninstall this version of the app and patch it yourself, by opening the offical link below.</p><br><h2>Official links</h2><br><p>ReVanced is always available at <a href=https://revanced.app>revanced.app</a>.</p><br><ul><li><a href=https://revanced.app>Website</a><li><a href=https://revanced.app/discord>Discord</a><li><a href=https://www.reddit.com/r/revancedapp>Reddit</a><li><a href=https://twitter.com/revancedapp>Twitter</a><li><a href=https://t.me/app_revanced>Telegram</a><li><a href=https://www.youtube.com/@ReVanced>YouTube</a></ul> + <p>This app looks to be pre-patched or obtained from someone other than you. It is possible, this app does not function correctly or is <b>harmful and even dangerous</b> to run and use.<br><br><p>It is strongly recommended to <b>uninstall this version of the app and patch it yourself</b> to ensure, all patches are intended and secure.<p>The following checks have failed and concluded this app to be pre-patched, obtained from someone else other than you, not correctly functional or <b>harmful and even dangerous</b> to use:<br><br></p>%s<br><p>This warning will only be shown once more, if dismissed, and never again.<p>Uninstall this version of the app and patch it yourself, by opening the offical link below.</p><br><h2>Official links</h2><br><p>ReVanced is always available at <a href=https://revanced.app>revanced.app</a>.</p><br><ul><li><a href=https://revanced.app>Website</a><li><a href=https://revanced.app/discord>Discord</a><li><a href=https://www.reddit.com/r/revancedapp>Reddit</a><li><a href=https://twitter.com/revancedapp>Twitter</a><li><a href=https://t.me/app_revanced>Telegram</a><li><a href=https://www.youtube.com/@ReVanced>YouTube</a></ul> Not installed by ReVanced Manager No installation of ReVanced Manager found Patched on another device Patched longer than 10 minutes ago - IP during patching different from current + IP during patch different from current ReVanced From f1036e0a16fcc131fb1588ac3d008f8a1fe04802 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 2 Sep 2024 04:13:58 +0400 Subject: [PATCH 06/29] Use last three digits to prevent brute forcing the hashed IP --- .../patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt index 6304b17327..39b1464b40 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt @@ -53,7 +53,8 @@ abstract class BaseCheckEnvironmentPatch( private fun setPatchInfo() { PatchInfoFingerprint.setClassFields( - "PUBLIC_IP_DURING_PATCH" to (publicIp ?: "").encodedAndHashed, + // Use last three digits to prevent brute forcing the hashed IP. + "PUBLIC_IP_DURING_PATCH" to (publicIp?.takeLast(3) ?: "").encodedAndHashed, "PATCH_TIME" to System.currentTimeMillis().encoded, ) From 6280d13470590feb34ee3640eabd8c4e2115e529 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 2 Sep 2024 15:16:25 +0400 Subject: [PATCH 07/29] fix some issues add todos --- .../shared/misc/checks/BaseCheckEnvironmentPatch.kt | 9 ++++++--- src/main/resources/addresources/values/strings.xml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt index 39b1464b40..8f56069206 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt @@ -53,8 +53,8 @@ abstract class BaseCheckEnvironmentPatch( private fun setPatchInfo() { PatchInfoFingerprint.setClassFields( - // Use last three digits to prevent brute forcing the hashed IP. - "PUBLIC_IP_DURING_PATCH" to (publicIp?.takeLast(3) ?: "").encodedAndHashed, + // Use last five characters to prevent brute forcing the hashed IP. + "PUBLIC_IP_DURING_PATCH" to (publicIp?.takeLast(5) ?: "").encodedAndHashed, "PATCH_TIME" to System.currentTimeMillis().encoded, ) @@ -139,7 +139,10 @@ abstract class BaseCheckEnvironmentPatch( val urlConnection = URL(service).openConnection() as HttpURLConnection try { - val reader = BufferedReader(InputStreamReader(urlConnection.inputStream)) + // TODO: This needed to run in a background thread in integrations. + // Probably needs to, here as well. + val stream = urlConnection.inputStream + val reader = BufferedReader(InputStreamReader(stream)) publicIP = reader.readLine() diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index b704dc392e..9bacd3f26d 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -36,7 +36,7 @@ This is because Crowdin requires temporarily flattening this file and removing t Open official link Ignore Ignore (%s) - <p>This app looks to be pre-patched or obtained from someone other than you. It is possible, this app does not function correctly or is <b>harmful and even dangerous</b> to run and use.<br><br><p>It is strongly recommended to <b>uninstall this version of the app and patch it yourself</b> to ensure, all patches are intended and secure.<p>The following checks have failed and concluded this app to be pre-patched, obtained from someone else other than you, not correctly functional or <b>harmful and even dangerous</b> to use:<br><br></p>%s<br><p>This warning will only be shown once more, if dismissed, and never again.<p>Uninstall this version of the app and patch it yourself, by opening the offical link below.</p><br><h2>Official links</h2><br><p>ReVanced is always available at <a href=https://revanced.app>revanced.app</a>.</p><br><ul><li><a href=https://revanced.app>Website</a><li><a href=https://revanced.app/discord>Discord</a><li><a href=https://www.reddit.com/r/revancedapp>Reddit</a><li><a href=https://twitter.com/revancedapp>Twitter</a><li><a href=https://t.me/app_revanced>Telegram</a><li><a href=https://www.youtube.com/@ReVanced>YouTube</a></ul> + <p>This app looks to be pre-patched or obtained from someone other than you. It is possible, this app does not function correctly or is <b>harmful and even dangerous</b> to run and use.<br><br><p>The following checks have failed and concluded this app to be pre-patched, obtained from someone else other than you, not correctly functional or <b>harmful and even dangerous</b> to use:<br><br></p>%s<br>It is strongly recommended to <b>uninstall this version of the app and patch it yourself</b> to ensure, all patches are intended and secure.<p><br><p>This warning will only be shown once more, if dismissed, and never again.<br><h2>Official links</h2><br><p>ReVanced is always available at <a href=https://revanced.app>revanced.app</a>.</p><br><ul><li><a href=https://revanced.app>Website</a><li><a href=https://revanced.app/discord>Discord</a><li><a href=https://www.reddit.com/r/revancedapp>Reddit</a><li><a href=https://twitter.com/revancedapp>Twitter</a><li><a href=https://t.me/app_revanced>Telegram</a><li><a href=https://www.youtube.com/@ReVanced>YouTube</a></ul> Not installed by ReVanced Manager No installation of ReVanced Manager found Patched on another device From fed02f8fe05a8549b55ceb3fa6bd0fb277cc2fed Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 2 Sep 2024 19:31:55 -0400 Subject: [PATCH 08/29] refactor --- .../shared/misc/checks/BaseCheckEnvironmentPatch.kt | 12 ++++++------ src/main/resources/addresources/values/strings.xml | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt index 8f56069206..d46c452d7c 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt @@ -139,14 +139,14 @@ abstract class BaseCheckEnvironmentPatch( val urlConnection = URL(service).openConnection() as HttpURLConnection try { - // TODO: This needed to run in a background thread in integrations. - // Probably needs to, here as well. + // It is ok to make the url call here and not on a background thread, + // since Manager already does patching off the main thread + // and with CLI patching there is no UI to worry about blocking. val stream = urlConnection.inputStream - val reader = BufferedReader(InputStreamReader(stream)) + BufferedReader(InputStreamReader(stream)).use { reader -> + publicIP = reader.readLine() + } - publicIP = reader.readLine() - - reader.close() } finally { urlConnection.disconnect() } diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 9bacd3f26d..0c6d84b4e3 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -36,12 +36,12 @@ This is because Crowdin requires temporarily flattening this file and removing t Open official link Ignore Ignore (%s) - <p>This app looks to be pre-patched or obtained from someone other than you. It is possible, this app does not function correctly or is <b>harmful and even dangerous</b> to run and use.<br><br><p>The following checks have failed and concluded this app to be pre-patched, obtained from someone else other than you, not correctly functional or <b>harmful and even dangerous</b> to use:<br><br></p>%s<br>It is strongly recommended to <b>uninstall this version of the app and patch it yourself</b> to ensure, all patches are intended and secure.<p><br><p>This warning will only be shown once more, if dismissed, and never again.<br><h2>Official links</h2><br><p>ReVanced is always available at <a href=https://revanced.app>revanced.app</a>.</p><br><ul><li><a href=https://revanced.app>Website</a><li><a href=https://revanced.app/discord>Discord</a><li><a href=https://www.reddit.com/r/revancedapp>Reddit</a><li><a href=https://twitter.com/revancedapp>Twitter</a><li><a href=https://t.me/app_revanced>Telegram</a><li><a href=https://www.youtube.com/@ReVanced>YouTube</a></ul> + <h5>This app appears to be pre-patched and not patched by you.</h5><br>It\'s possible this install will not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else other than yourself:<br>%1$s<br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>This warning will only be shown once more, and if dismissed it will never show.<br><br><h5>Official links</h5><br>%2$s Not installed by ReVanced Manager No installation of ReVanced Manager found - Patched on another device - Patched longer than 10 minutes ago - IP during patch different from current + Patched more than 10 minutes ago + Patched on another device + Network address during patching is different from current ReVanced From 29506c27e200221ba76373145148a96f4257c54f Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 2 Sep 2024 22:44:11 -0400 Subject: [PATCH 09/29] fix: Check data returned from ip service. Try other services if needed. --- .../misc/checks/BaseCheckEnvironmentPatch.kt | 57 +++++++++++-------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt index d46c452d7c..20f9bbdf35 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt @@ -19,12 +19,13 @@ import com.android.tools.smali.dexlib2.immutable.value.ImmutableStringEncodedVal import java.io.BufferedReader import java.io.InputStreamReader import java.net.HttpURLConnection +import java.net.InetAddress import java.net.URL +import java.net.UnknownHostException import java.security.MessageDigest import java.util.logging.Logger import kotlin.io.encoding.Base64 import kotlin.io.encoding.ExperimentalEncodingApi -import kotlin.random.Random abstract class BaseCheckEnvironmentPatch( private val mainActivityOnCreateFingerprint: MethodFingerprint, @@ -124,39 +125,47 @@ abstract class BaseCheckEnvironmentPatch( private val publicIp: String? get() { // Using multiple services to increase reliability, distribute the load and minimize tracking. - val getIpServices = listOf( + mutableListOf( "https://wtfismyip.com/text", "https://whatsmyfuckingip.com/text", "https://api.ipify.org?format=text", "https://icanhazip.com", "https://ifconfig.me/ip", - ) - - var publicIP: String? = null - - try { - val service = getIpServices[Random.Default.nextInt(getIpServices.size - 1)] - val urlConnection = URL(service).openConnection() as HttpURLConnection - + ).shuffled().forEach { service -> try { - // It is ok to make the url call here and not on a background thread, - // since Manager already does patching off the main thread - // and with CLI patching there is no UI to worry about blocking. - val stream = urlConnection.inputStream - BufferedReader(InputStreamReader(stream)).use { reader -> - publicIP = reader.readLine() + var urlConnection : HttpURLConnection? = null + + try { + urlConnection = URL(service).openConnection() as HttpURLConnection + urlConnection.setFixedLengthStreamingMode(0) + urlConnection.readTimeout = 10000 + urlConnection.connectTimeout = 10000 + + // It is ok to make the url call here and not on a background thread, + // since Manager already does patching off the main thread + // and with CLI patching there is no UI to worry about blocking. + BufferedReader(InputStreamReader(urlConnection.inputStream)).use { + val ipString = it.readLine() + //noinspection ResultOfMethodCallIgnored + InetAddress.getByName(ipString) // Validate IP address. + return ipString + } + } catch (e: UnknownHostException) { + // Site is returning nonsense. Try another. + } finally { + urlConnection?.disconnect() } - - } finally { - urlConnection.disconnect() + } catch (e: Exception) { + // If the app does not have the INTERNET permission or the service is down, + // the public IP can not be retrieved. + Logger.getLogger(this::class.simpleName) + .info("Failed to get public IP address: " + e.message) } - } catch (e: Exception) { - // If the app does not have the INTERNET permission or the service is down, - // the public IP can not be retrieved. - Logger.getLogger(this::class.simpleName).severe("Failed to get public IP address: " + e.message) } - return publicIP + Logger.getLogger(this::class.simpleName).severe("Failed to get network address") + + return null } } } From 285131d92715c1d8aea0534c6a130f319792f477 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 3 Sep 2024 02:31:02 -0400 Subject: [PATCH 10/29] fix: Remove Check if manager is installed --- src/main/resources/addresources/values/strings.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 0c6d84b4e3..3d447d188e 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -38,7 +38,6 @@ This is because Crowdin requires temporarily flattening this file and removing t Ignore (%s) <h5>This app appears to be pre-patched and not patched by you.</h5><br>It\'s possible this install will not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else other than yourself:<br>%1$s<br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>This warning will only be shown once more, and if dismissed it will never show.<br><br><h5>Official links</h5><br>%2$s Not installed by ReVanced Manager - No installation of ReVanced Manager found Patched more than 10 minutes ago Patched on another device Network address during patching is different from current From dbcea081f6ab4831dc323b0d6ff7964643a22c5c Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 3 Sep 2024 03:09:21 -0400 Subject: [PATCH 11/29] fix: Remove ip check that sometimes fails due to privacy concerns and this check isn't needed to validate a CLI install --- src/main/resources/addresources/values/strings.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 3d447d188e..00b17546a7 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -37,10 +37,9 @@ This is because Crowdin requires temporarily flattening this file and removing t Ignore Ignore (%s) <h5>This app appears to be pre-patched and not patched by you.</h5><br>It\'s possible this install will not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else other than yourself:<br>%1$s<br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>This warning will only be shown once more, and if dismissed it will never show.<br><br><h5>Official links</h5><br>%2$s + Patched on another device Not installed by ReVanced Manager Patched more than 10 minutes ago - Patched on another device - Network address during patching is different from current ReVanced From 2f74e882d33f305c61e4ba348e925b2fdfa4847c Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 3 Sep 2024 03:25:26 -0400 Subject: [PATCH 12/29] fix: Remove social media links, as the main website is where they should go and there's already a button for that --- src/main/resources/addresources/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 00b17546a7..5857216ba3 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -36,7 +36,7 @@ This is because Crowdin requires temporarily flattening this file and removing t Open official link Ignore Ignore (%s) - <h5>This app appears to be pre-patched and not patched by you.</h5><br>It\'s possible this install will not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else other than yourself:<br>%1$s<br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>This warning will only be shown once more, and if dismissed it will never show.<br><br><h5>Official links</h5><br>%2$s + <h5>This app appears to be pre-patched and not patched by you.</h5><br>It\'s possible this install will not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else other than yourself:<br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>This warning will only be shown once more, and if dismissed it will never show. Patched on another device Not installed by ReVanced Manager Patched more than 10 minutes ago From 19a1b53150a3d84c6098afe28b42fa99d6310a22 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 3 Sep 2024 03:49:40 -0400 Subject: [PATCH 13/29] fix: Don't show any dialog buttons until after a few seconds --- src/main/resources/addresources/values/strings.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 5857216ba3..7165e94eb3 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -33,9 +33,8 @@ This is because Crowdin requires temporarily flattening this file and removing t Failed checks - Open official link + Open official website Ignore - Ignore (%s) <h5>This app appears to be pre-patched and not patched by you.</h5><br>It\'s possible this install will not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else other than yourself:<br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>This warning will only be shown once more, and if dismissed it will never show. Patched on another device Not installed by ReVanced Manager From e64ba5b31016ea65a02d8eb3de5fcf7ef66dfc4e Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 3 Sep 2024 04:32:26 -0400 Subject: [PATCH 14/29] fix: Adjust text --- src/main/resources/addresources/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 7165e94eb3..9bc16b7017 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -35,7 +35,7 @@ This is because Crowdin requires temporarily flattening this file and removing t Failed checks Open official website Ignore - <h5>This app appears to be pre-patched and not patched by you.</h5><br>It\'s possible this install will not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else other than yourself:<br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>This warning will only be shown once more, and if dismissed it will never show. + <h5>This app appears to be pre-patched and not patched by you.</h5><br>It\'s possible this install will not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If this warning is ignored it will never be shown again. Patched on another device Not installed by ReVanced Manager Patched more than 10 minutes ago From 116d343ef5992bbc575a49f310b85c8bcb9b8518 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 3 Sep 2024 16:04:13 -0400 Subject: [PATCH 15/29] fix: Adjust text --- src/main/resources/addresources/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 9bc16b7017..ace18362f0 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -35,7 +35,7 @@ This is because Crowdin requires temporarily flattening this file and removing t Failed checks Open official website Ignore - <h5>This app appears to be pre-patched and not patched by you.</h5><br>It\'s possible this install will not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If this warning is ignored it will never be shown again. + <h5>This app does not appear to be patched by you.</h5><br>It\'s possible this install will not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If this warning is ignored it will not be shown again. Patched on another device Not installed by ReVanced Manager Patched more than 10 minutes ago From e0fcbe167c1593c21b99483d1b2932bd1e63c16d Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 3 Sep 2024 16:56:06 -0400 Subject: [PATCH 16/29] fix: Add patch as dependency to Settings, until a way for mandatory patches to be specified --- .../revanced/patches/youtube/misc/settings/SettingsPatch.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsPatch.kt index 6f96dcffa0..819b9d3b9b 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/misc/settings/SettingsPatch.kt @@ -15,6 +15,7 @@ import app.revanced.patches.shared.misc.settings.preference.IntentPreference import app.revanced.patches.shared.misc.settings.preference.NonInteractivePreference import app.revanced.patches.shared.misc.settings.preference.PreferenceScreen.Sorting import app.revanced.patches.shared.misc.settings.preference.TextPreference +import app.revanced.patches.youtube.misc.check.CheckEnvironmentPatch import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch import app.revanced.patches.youtube.misc.settings.fingerprints.LicenseActivityOnCreateFingerprint import app.revanced.patches.youtube.misc.settings.fingerprints.SetThemeFingerprint @@ -30,6 +31,9 @@ import java.io.Closeable IntegrationsPatch::class, SettingsResourcePatch::class, AddResourcesPatch::class, + // Currently there is no easy way to make a mandatory patch, + // so for now this is a dependent of this patch. + CheckEnvironmentPatch::class, ], ) object SettingsPatch : From 1329337398b17b5db20f077571877071424da926 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 3 Sep 2024 17:20:25 -0400 Subject: [PATCH 17/29] fix: Remove unused network address code --- .../misc/checks/BaseCheckEnvironmentPatch.kt | 55 ------------------- 1 file changed, 55 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt index 20f9bbdf35..220a03717a 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt @@ -16,14 +16,7 @@ import app.revanced.util.exception import app.revanced.util.resultOrThrow import com.android.tools.smali.dexlib2.immutable.value.ImmutableLongEncodedValue import com.android.tools.smali.dexlib2.immutable.value.ImmutableStringEncodedValue -import java.io.BufferedReader -import java.io.InputStreamReader -import java.net.HttpURLConnection -import java.net.InetAddress -import java.net.URL -import java.net.UnknownHostException import java.security.MessageDigest -import java.util.logging.Logger import kotlin.io.encoding.Base64 import kotlin.io.encoding.ExperimentalEncodingApi @@ -54,8 +47,6 @@ abstract class BaseCheckEnvironmentPatch( private fun setPatchInfo() { PatchInfoFingerprint.setClassFields( - // Use last five characters to prevent brute forcing the hashed IP. - "PUBLIC_IP_DURING_PATCH" to (publicIp?.takeLast(5) ?: "").encodedAndHashed, "PATCH_TIME" to System.currentTimeMillis().encoded, ) @@ -121,51 +112,5 @@ abstract class BaseCheckEnvironmentPatch( field.initialValue = fieldNameValueMap[field.name] ?: return@forEach } } - - private val publicIp: String? - get() { - // Using multiple services to increase reliability, distribute the load and minimize tracking. - mutableListOf( - "https://wtfismyip.com/text", - "https://whatsmyfuckingip.com/text", - "https://api.ipify.org?format=text", - "https://icanhazip.com", - "https://ifconfig.me/ip", - ).shuffled().forEach { service -> - try { - var urlConnection : HttpURLConnection? = null - - try { - urlConnection = URL(service).openConnection() as HttpURLConnection - urlConnection.setFixedLengthStreamingMode(0) - urlConnection.readTimeout = 10000 - urlConnection.connectTimeout = 10000 - - // It is ok to make the url call here and not on a background thread, - // since Manager already does patching off the main thread - // and with CLI patching there is no UI to worry about blocking. - BufferedReader(InputStreamReader(urlConnection.inputStream)).use { - val ipString = it.readLine() - //noinspection ResultOfMethodCallIgnored - InetAddress.getByName(ipString) // Validate IP address. - return ipString - } - } catch (e: UnknownHostException) { - // Site is returning nonsense. Try another. - } finally { - urlConnection?.disconnect() - } - } catch (e: Exception) { - // If the app does not have the INTERNET permission or the service is down, - // the public IP can not be retrieved. - Logger.getLogger(this::class.simpleName) - .info("Failed to get public IP address: " + e.message) - } - } - - Logger.getLogger(this::class.simpleName).severe("Failed to get network address") - - return null - } } } From 5840c75cf8b3fa0dd02fd15e64bd3b1f86a9fd0c Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:03:44 -0400 Subject: [PATCH 18/29] fix: adjust text --- src/main/resources/addresources/values/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index ace18362f0..9878937fbd 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -32,11 +32,11 @@ This is because Crowdin requires temporarily flattening this file and removing t - Failed checks + Checks failed Open official website Ignore <h5>This app does not appear to be patched by you.</h5><br>It\'s possible this install will not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If this warning is ignored it will not be shown again. - Patched on another device + Patched on a different device Not installed by ReVanced Manager Patched more than 10 minutes ago From f4132cd96b15ec3ef05bec06ddfb2efcac3fceda Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:39:11 -0400 Subject: [PATCH 19/29] Update src/main/resources/addresources/values/strings.xml Co-authored-by: KobeW50 <84587632+KobeW50@users.noreply.github.com> --- src/main/resources/addresources/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 9878937fbd..1fa8d5338c 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -35,7 +35,7 @@ This is because Crowdin requires temporarily flattening this file and removing t Checks failed Open official website Ignore - <h5>This app does not appear to be patched by you.</h5><br>It\'s possible this install will not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If this warning is ignored it will not be shown again. + <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly or <b>may be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If this warning is ignored it will not be shown again. Patched on a different device Not installed by ReVanced Manager Patched more than 10 minutes ago From 4a9793ea30aa22fc3f9f97a1a0c1c966e4f5eb0e Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:46:04 -0400 Subject: [PATCH 20/29] fix: Adjust text --- src/main/resources/addresources/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 1fa8d5338c..23c6a3b437 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -35,7 +35,7 @@ This is because Crowdin requires temporarily flattening this file and removing t Checks failed Open official website Ignore - <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly or <b>may be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If this warning is ignored it will not be shown again. + <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If this warning is ignored it will not be shown again. Patched on a different device Not installed by ReVanced Manager Patched more than 10 minutes ago From da657726609b02ce53335d52ad61ab3c6a7a78da Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Wed, 4 Sep 2024 03:15:16 -0400 Subject: [PATCH 21/29] fix: Show how old the patched apk is if any other checks fail --- src/main/resources/addresources/values/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 23c6a3b437..4f307358c8 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -39,6 +39,8 @@ This is because Crowdin requires temporarily flattening this file and removing t Patched on a different device Not installed by ReVanced Manager Patched more than 10 minutes ago + Patched %s days ago + APK build date is corrupted ReVanced From fadd7a4f61baa8fe6d067b694f1e0c7ad57ace4b Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 4 Sep 2024 22:24:34 +0400 Subject: [PATCH 22/29] Remove name so the patch does not appear as selectable --- .../patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt index 220a03717a..3d0ac4175f 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt @@ -25,8 +25,7 @@ abstract class BaseCheckEnvironmentPatch( compatiblePackages: Set, integrationsPatch: BaseIntegrationsPatch, ) : BytecodePatch( - name = "Check environment", - description = "Checks, if the application was patched by the user, otherwise warns the user.", + description = "Checks, if the application was patched by, otherwise warns the user.", compatiblePackages = compatiblePackages, dependencies = setOf( AddResourcesPatch::class, From f52dd9f34ce70cd50e54b82d914c147a5044f332 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 4 Sep 2024 22:30:28 +0400 Subject: [PATCH 23/29] Fix correctness of strings --- src/main/resources/addresources/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 4f307358c8..6253e02711 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -35,7 +35,7 @@ This is because Crowdin requires temporarily flattening this file and removing t Checks failed Open official website Ignore - <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly or <b>could be harmful or dangerous to use</b>.<br><br>The following checks have failed and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If this warning is ignored it will not be shown again. + <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly, <b>could be harmful or even dangerous to use</b>.<br><br>The checks have concluded the following and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If this warning is ignored it will not be shown again. Patched on a different device Not installed by ReVanced Manager Patched more than 10 minutes ago From ff969e34421ea625cbaf46c72fcae565edcb96eb Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Wed, 4 Sep 2024 21:12:40 -0400 Subject: [PATCH 24/29] fix: Use same base64 encoding for integrations and patches --- .../patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt | 5 +++-- stub/src/main/java/android/os/Build.java | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt index 3d0ac4175f..33f58fa6a7 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt @@ -16,6 +16,7 @@ import app.revanced.util.exception import app.revanced.util.resultOrThrow import com.android.tools.smali.dexlib2.immutable.value.ImmutableLongEncodedValue import com.android.tools.smali.dexlib2.immutable.value.ImmutableStringEncodedValue +import java.nio.charset.StandardCharsets import java.security.MessageDigest import kotlin.io.encoding.Base64 import kotlin.io.encoding.ExperimentalEncodingApi @@ -67,7 +68,6 @@ abstract class BaseCheckEnvironmentPatch( "PATCH_ODM_SKU" to ODM_SKU.encodedAndHashed, "PATCH_PRODUCT" to PRODUCT.encodedAndHashed, "PATCH_RADIO" to RADIO.encodedAndHashed, - "PATCH_SERIAL" to SERIAL.encodedAndHashed, "PATCH_SKU" to SKU.encodedAndHashed, "PATCH_SOC_MANUFACTURER" to SOC_MANUFACTURER.encodedAndHashed, "PATCH_SOC_MODEL" to SOC_MODEL.encodedAndHashed, @@ -98,7 +98,8 @@ abstract class BaseCheckEnvironmentPatch( private val String.encodedAndHashed get() = MutableStringEncodedValue( ImmutableStringEncodedValue( - Base64.encode(MessageDigest.getInstance("SHA-1").digest(toByteArray())), + Base64.encode(MessageDigest.getInstance("SHA-1") + .digest(this.toByteArray(StandardCharsets.US_ASCII))), ), ) diff --git a/stub/src/main/java/android/os/Build.java b/stub/src/main/java/android/os/Build.java index 88ba702dc3..45999597cc 100644 --- a/stub/src/main/java/android/os/Build.java +++ b/stub/src/main/java/android/os/Build.java @@ -17,7 +17,6 @@ public class Build { public static final String ODM_SKU = null; public static final String PRODUCT = null; public static final String RADIO = null; - public static final String SERIAL = null; public static final String SKU = null; public static final String SOC_MANUFACTURER = null; public static final String SOC_MODEL = null; From 36de93c31eb81444cf16116bfc3a17445faf48c9 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Wed, 4 Sep 2024 21:23:43 -0400 Subject: [PATCH 25/29] fix: use UTF8 just in case `Build` has foreign characters --- .../patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt index 33f58fa6a7..0411a0c512 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/checks/BaseCheckEnvironmentPatch.kt @@ -99,7 +99,7 @@ abstract class BaseCheckEnvironmentPatch( get() = MutableStringEncodedValue( ImmutableStringEncodedValue( Base64.encode(MessageDigest.getInstance("SHA-1") - .digest(this.toByteArray(StandardCharsets.US_ASCII))), + .digest(this.toByteArray(StandardCharsets.UTF_8))), ), ) From 98e143d6bab9efaa36c4afdb0f3ad4165f32b1cd Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:51:36 -0400 Subject: [PATCH 26/29] Update src/main/resources/addresources/values/strings.xml Co-authored-by: oSumAtrIX --- src/main/resources/addresources/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index 6253e02711..a5bbd803a8 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -35,7 +35,7 @@ This is because Crowdin requires temporarily flattening this file and removing t Checks failed Open official website Ignore - <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly, <b>could be harmful or even dangerous to use</b>.<br><br>The checks have concluded the following and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If this warning is ignored it will not be shown again. + <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly, <b>could be harmful or even dangerous to use</b>.<br><br>The checks have concluded the following and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>This warning will only be shown twice, if ignored. Patched on a different device Not installed by ReVanced Manager Patched more than 10 minutes ago From 7620abfe53edcff8ffc8409ce6b19928c839713c Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 3 Sep 2024 14:56:19 -0400 Subject: [PATCH 27/29] fix: Use more concise text --- src/main/resources/addresources/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index a5bbd803a8..e5aa666339 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -35,7 +35,7 @@ This is because Crowdin requires temporarily flattening this file and removing t Checks failed Open official website Ignore - <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly, <b>could be harmful or even dangerous to use</b>.<br><br>The checks have concluded the following and imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>This warning will only be shown twice, if ignored. + <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly, <b>could be harmful or even dangerous to use</b>.<br><br>These checks imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If ignored, this warning will only be shown twice. Patched on a different device Not installed by ReVanced Manager Patched more than 10 minutes ago From 5f857a8f4a2df1b4aaea05386cdd9401a5cf3c42 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Fri, 6 Sep 2024 01:23:45 -0400 Subject: [PATCH 28/29] fix: Use consistent line break elements --- src/main/resources/addresources/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index e5aa666339..aa7ce0e033 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -35,7 +35,7 @@ This is because Crowdin requires temporarily flattening this file and removing t Checks failed Open official website Ignore - <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly, <b>could be harmful or even dangerous to use</b>.<br><br>These checks imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br><p>If ignored, this warning will only be shown twice. + <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly, <b>could be harmful or even dangerous to use</b>.<br><br>These checks imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<br><br>If ignored, this warning will only be shown twice. Patched on a different device Not installed by ReVanced Manager Patched more than 10 minutes ago From a7115d73b4d4df8201883f7c0892d6dfad163bca Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Fri, 6 Sep 2024 01:28:25 -0400 Subject: [PATCH 29/29] fix: Use paragraph for last element to add some padding between the dialog message and the buttons --- src/main/resources/addresources/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/addresources/values/strings.xml b/src/main/resources/addresources/values/strings.xml index aa7ce0e033..5f41165c1a 100644 --- a/src/main/resources/addresources/values/strings.xml +++ b/src/main/resources/addresources/values/strings.xml @@ -35,7 +35,7 @@ This is because Crowdin requires temporarily flattening this file and removing t Checks failed Open official website Ignore - <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly, <b>could be harmful or even dangerous to use</b>.<br><br>These checks imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<br><br>If ignored, this warning will only be shown twice. + <h5>This app does not appear to be patched by you.</h5><br>This app may not function correctly, <b>could be harmful or even dangerous to use</b>.<br><br>These checks imply this app is pre-patched or obtained from someone else:<br><br><small>%1$s</small><br>It is strongly recommended to <b>uninstall this app and patch it yourself</b> to ensure you are using a validated and secure app.<p><br>If ignored, this warning will only be shown twice. Patched on a different device Not installed by ReVanced Manager Patched more than 10 minutes ago