element-hq / element-x-android

Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
GNU Affero General Public License v3.0
1.08k stars 155 forks source link

debug proxy mitm #2812

Open rotekii opened 6 months ago

rotekii commented 6 months ago

Steps to reproduce

I'm trying to follow the steps in https://github.com/element-hq/element-x-android/blob/develop/docs/debug_proxying.md but i can't seem to find RustMatrixClientFactory.create() method.

Outcome

I only find this io.element.android.libraries.matrix.impl.RustMatrixClientFactory$create$2.

RustMatrixClientFactory_Method.txt

I'm not sure if it means the same thing and if so how to do other steps: Add .disableSslVerification() in the ClientBuilder method chain.

Your phone model

Google Nexus (emulator)

Operating system version

Android 10

Application version and app store

Element X version 0.4.10

Homeserver

No response

Will you send logs?

Yes

Are you willing to provide a PR?

Yes

jmartinesp commented 6 months ago

Those instructions are meant for developers of the app using its source code, not for using JADX for reverse engineering, modifying it and then repacking and installing the app. It could technically still be done, but not in an easy way.

You can download the source code in this repo, modify the Client builder here, then build the app and install it in your device, but since the APK signatures won't match you'll probably have to replace your current install and it'll erase the local data in your device.

rotekii commented 6 months ago

is there any other way to intercept it for non developers, I have tried tools like HttpToolkit and Owasp ZAP but none seem to be working for ElementX, but somehow they work fine with Element.