3

These would allow me to make the input text field clickable and editable but the thing is how to do this.

Instance field

.field private g:Z

1 -

 invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z

move-result p2

invoke-virtual {p0, p2}, Lcom/google/android/material/textfield/TextInputEditText;->setTextInputLayoutFocusedRectEnabled(Z)V

2 - Which call this one:

.method public setTextInputLayoutFocusedRectEnabled(Z)V
.locals 0

iput-boolean p1, p0, Lcom/google/android/material/textfield/TextInputEditText;->g:Z

return-void

.end method

2
  • 1
    That depends on the way how the developer of the app prevents editing of the field. Therefore I would first start by checking stackoverflow.com how to make a field non-editable (you may end up e.g. here: stackoverflow.com/q/4297763/150978). Then check the app code if it uses this way of making the field non-editable and thus you know what to change. BTW: There was a very similar question yesterday: reverseengineering.stackexchange.com/q/31748/1848 If it wa screated by you please don't create a new account every day...
    – Robert
    Commented Apr 5, 2023 at 12:13
  • BTW: The description of setTextInputLayoutFocusedRectEnabled sounds more like an "style option" without an effect of the ability to focus a field or not. It is just if there is a rectangle drawn if the field is focused.
    – Robert
    Commented Apr 5, 2023 at 13:59

1 Answer 1

0

I don't really think that's the correct section that decides if element is clickable or not. But since you're confident here, I'll assume it as correct for now.

After line

move-result p2

Write this:

const/4 p2, 0x1

Try it out. Replace it with 0x0 & try again.

If it doesn't work, then wrong point.


To actually find out source of a button, I'll recommend using some frida script to log clicks & the calls that click event triggered, or use SimpleHook LSPosed Module, as it has that hook inbuilt.

If it isn't clickable, or if you want to dig statically, then: I'll recommend to use "Developer Assistant" from play store, & find out the button ID.

If they're obfuscated for some reason, then search for the button text string on res/ and note down the ID of that instead.

After that, you're suppose to look for id's address. Search for it in res/value/public.xml and note down the address which should be in format of 0x7fxxxxxx . Find the address on smali code & the class that calls for it, those should be the class that initializes the button, and from there you should be digging the code. You must call that button resource to make it clickable/unclickable, for example look for setEnabled call around it.


Reference, try compiling the code with ProGuard obfuscation is turned off and analyze the smali code:- https://www.geeksforgeeks.org/how-to-enable-disable-button-in-android/

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.