You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.8 KiB
1.8 KiB
Setup a debug mitm proxy to inspect all the app's network traffic
- Install mitmproxy:
brew install mitmproxy
.- Launch
mitmweb
from a terminal. It will pop up mitmproxy's web interface in a web browser.
- Launch
- Configure Android Emulator.
- Launch your android emulator.
- Open its settings page and go to Settings -> Proxy (nb this tab isn't visible when running the emu inside the Android Studio window, you need to set it so it runs in its own window).
- Disable "Use Android Studio HTTP proxy settings" and pick "Manual proxy configuration".
- Set
127.0.0.1
as "Host name" and8080
as "Port number". - Click "Apply" and verify that "Proxy status" is "Success" and close the settings window.
- Install the mitmproxy CA cert (this is needed to see traffic from java/kotlin code, it's not needed for traffic coming from native code e.g. the matrix-rust-sdk).
- Open the emulator Chrome browser app
- Go to the url
mitm.it
- Follow the instructions to install the CA cert on Android devices.
- Slightly modify the Element X app source code.
- Go to the
RustMatrixClientFactory.create()
method. - Add
.disableSslVerification()
in theClientBuilder
method chain.
- Go to the
- Build and run the Element X app.
- Enjoy, you will see all the traffic in mitmproxy's web interface.