diff --git a/README.md b/README.md index 8dcccde6..4d394746 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,10 @@ Grindr Plus is a Xposed Module that allows you to unlock some features in Grindr - Allow taking screenshots in any part of the app (including albums and expiring photos). - Unlimited expiring photos. - Remove expiration on incoming expiring photos, allowing to see them any number of times you want. +- Extra profile fields in the so-called CruiseViewHolder + - Profile ID. + - Exact time of 'Last seen'. + - Body mass index (BMI) and its description (underweight, normal, overweight, obesity I, obesity II or obesity III), if both weight and height are available. - Make videocalls even if you didn't start a chat with the recipient. - Access to some user-hidden features (developer features) - More accurate online status from other users. (The green dot from other profiles goes off after 3 minutes of inactivity.) diff --git a/app/src/main/java/com/eljaviluki/grindrplus/Hooker.kt b/app/src/main/java/com/eljaviluki/grindrplus/Hooker.kt index a574a12d..2dd67a0f 100644 --- a/app/src/main/java/com/eljaviluki/grindrplus/Hooker.kt +++ b/app/src/main/java/com/eljaviluki/grindrplus/Hooker.kt @@ -39,7 +39,7 @@ class Hooker : IXposedHookLoadPackage { Hooks.hookFeatureGranting() Hooks.allowScreenshotsHook() Hooks.unlimitedExpiringPhotos() - //Hooks.addExtraProfileFields() + Hooks.addExtraProfileFields() Hooks.hookUserSessionImpl() Hooks.allowMockProvider() Hooks.allowVideocallsOnEmptyChats() diff --git a/app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt b/app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt index ea79b1f4..5c9d8a29 100644 --- a/app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt +++ b/app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt @@ -41,7 +41,7 @@ object Hooks { * - Profile ID * - Last seen (exact date and time) */ - fun addExtraProfileFields_DISABLED() { + fun addExtraProfileFields() { val class_ProfileFieldsView = findClass( GApp.ui.profileV2.ProfileFieldsView, Hooker.pkgParam.classLoader @@ -53,7 +53,7 @@ object Hooks { ) val class_ExtendedProfileFieldView = findClass( - null, //GApp.view.ExtendedProfileFieldView, + GApp.view.ExtendedProfileFieldView, Hooker.pkgParam.classLoader ) @@ -62,10 +62,17 @@ object Hooks { Hooker.pkgParam.classLoader ) + val class_Continuation = findClass( + "kotlin.coroutines.Continuation", + Hooker.pkgParam.classLoader + ) //I tried using Continuation::class.java, but that only gives a different Class instance (does not work) + + findAndHookMethod( class_ProfileFieldsView, - null, //GApp.ui.profileV2.ProfileFieldsView_.setProfile, + GApp.ui.profileV2.ProfileFieldsView_.setProfile, class_Profile, + class_Continuation, object : XC_MethodHook() { var fieldsViewInstance: Any? = null val context: Any? by lazy { @@ -88,7 +95,7 @@ object Hooks { val valueColorId = getStaticIntField( class_R_color, - null, //GApp.R.color_.grindr_pure_white + GApp.R.color_.grindr_pure_white ) //R.color.grindr_pure_white override fun afterHookedMethod(param: MethodHookParam) { @@ -131,14 +138,14 @@ object Hooks { callMethod( extendedProfileFieldView, - null, //GApp.view.ExtendedProfileFieldView_.setLabel, + GApp.view.ExtendedProfileFieldView_.setLabel, label, labelColorRgb ) callMethod( extendedProfileFieldView, - null, //GApp.view.ExtendedProfileFieldView_.setValue, + GApp.view.ExtendedProfileFieldView_.setValue, value, valueColorId ) diff --git a/app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt b/app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt index de88b766..33dcf46f 100644 --- a/app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt +++ b/app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt @@ -66,12 +66,12 @@ object Obfuscation { } object R { - private const val _R_base = Constants.GRINDR_PKG + private const val _R = Constants.GRINDR_PKG - const val color = "$_R_base.h0" + const val color = "$_R.h0" object color_ { - const val grindr_gold_star_gay = "u" - //const val grindr_pure_white = "L" // seems gone + const val grindr_gold_star_gay = "x" + const val grindr_pure_white = "M" } } @@ -99,7 +99,7 @@ object Obfuscation { const val ProfileFieldsView = "$_profileV2.ProfileFieldsView" object ProfileFieldsView_ { - //const val setProfile = "setProfile" // gone + const val setProfile = "g" } } } @@ -116,13 +116,11 @@ object Obfuscation { object view { private const val _view = Constants.GRINDR_PKG + ".view" - /* unused - const val ExtendedProfileFieldView = "$_view.bv" + const val ExtendedProfileFieldView = "$_view.b4" object ExtendedProfileFieldView_ { - const val setLabel = "a" - const val setValue = "b" + const val setLabel = "l" + const val setValue = "n" } - */ const val TapsAnimLayout = "$_view.TapsAnimLayout" object TapsAnimLayout_ {