Skip to content

Commit

Permalink
addExtraProfileFields() is back!
Browse files Browse the repository at this point in the history
  • Loading branch information
ElJaviLuki committed Sep 15, 2022
1 parent faed4b6 commit a822f0f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 17 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/eljaviluki/grindrplus/Hooker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Hooker : IXposedHookLoadPackage {
Hooks.hookFeatureGranting()
Hooks.allowScreenshotsHook()
Hooks.unlimitedExpiringPhotos()
//Hooks.addExtraProfileFields()
Hooks.addExtraProfileFields()
Hooks.hookUserSessionImpl()
Hooks.allowMockProvider()
Hooks.allowVideocallsOnEmptyChats()
Expand Down
19 changes: 13 additions & 6 deletions app/src/main/java/com/eljaviluki/grindrplus/Hooks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -53,7 +53,7 @@ object Hooks {
)

val class_ExtendedProfileFieldView = findClass(
null, //GApp.view.ExtendedProfileFieldView,
GApp.view.ExtendedProfileFieldView,
Hooker.pkgParam.classLoader
)

Expand All @@ -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 {
Expand All @@ -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) {
Expand Down Expand Up @@ -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
)
Expand Down
18 changes: 8 additions & 10 deletions app/src/main/java/com/eljaviluki/grindrplus/Obfuscation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand Down Expand Up @@ -99,7 +99,7 @@ object Obfuscation {

const val ProfileFieldsView = "$_profileV2.ProfileFieldsView"
object ProfileFieldsView_ {
//const val setProfile = "setProfile" // gone
const val setProfile = "g"
}
}
}
Expand All @@ -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_ {
Expand Down

0 comments on commit a822f0f

Please sign in to comment.