From 48582427c46dbdfa166bb3d887783dcb46e109fd Mon Sep 17 00:00:00 2001 From: ElJaviLuki Date: Mon, 5 Dec 2022 19:02:50 +0100 Subject: [PATCH] Prevent from Recording Profile Views Now, you will be able to see who viewed your profile even if you have "Show Me In Viewed Me List" disabled. --- app/build.gradle | 4 ++-- .../java/com/eljaviluki/grindrplus/Hooker.kt | 6 ++++++ .../main/java/com/eljaviluki/grindrplus/Hooks.kt | 16 ++++++++++++++++ .../com/eljaviluki/grindrplus/Obfuscation.kt | 9 +++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 07b9a00c..215aba2e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,7 @@ plugins { ext.versionMajor = 1 ext.versionMinor = 1 -ext.versionPatch = 3 +ext.versionPatch = 4 ext.grindrVersion = '8.22.1' private String genVersionName() { @@ -24,7 +24,7 @@ android { applicationId 'com.eljaviluki.grindrplus' minSdk 21 targetSdk 32 - versionCode 9 + versionCode 10 versionName genVersionName() versionNameSuffix getVersionNameSuffix() } diff --git a/app/src/main/java/com/eljaviluki/grindrplus/Hooker.kt b/app/src/main/java/com/eljaviluki/grindrplus/Hooker.kt index a9d48ac9..8c955d66 100644 --- a/app/src/main/java/com/eljaviluki/grindrplus/Hooker.kt +++ b/app/src/main/java/com/eljaviluki/grindrplus/Hooker.kt @@ -102,6 +102,12 @@ class Hooker : IXposedHookLoadPackage { } catch (e : Exception) { e.message?.let { Logger.xLog(it) } } + + try { + Hooks.preventRecordProfileViews() + } catch (e : Exception) { + e.message?.let { Logger.xLog(it) } + } } } ) diff --git a/app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt b/app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt index 579fbdb9..87dc67b1 100644 --- a/app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt +++ b/app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt @@ -456,4 +456,20 @@ object Hooks { RETURN_LONG_MAX_VALUE ) } + + fun preventRecordProfileViews(){ + val class_Continuation = findClass( + "kotlin.coroutines.Continuation", + Hooker.pkgParam.classLoader + ) + + val class_GrindrRestService = findClass(GApp.api.GrindrRestService, Hooker.pkgParam.classLoader) + findAndHookMethod( + class_GrindrRestService, + GApp.api.GrindrRestService_.recordProfileViews, + List::class.java, + class_Continuation, + XC_MethodReplacement.DO_NOTHING + ) + } } \ No newline at end of file diff --git a/app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt b/app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt index edf19f7d..584022d9 100644 --- a/app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt +++ b/app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt @@ -2,6 +2,15 @@ package com.eljaviluki.grindrplus object Obfuscation { object GApp { + object api { + private const val _api = Constants.GRINDR_PKG + ".api" + + const val GrindrRestService = "$_api.GrindrRestService" + object GrindrRestService_ { + const val recordProfileViews = "W" + } + } + object base { private const val _base = Constants.GRINDR_PKG + ".base"