Modified for genshin.exzork.me
How to run mitmproxy on android without needing a PC. Rooted users
- Install the magisk module to trust user certificates. You don't need to reboot after installing, we'll reboot later. https://github.com/NVISOsecurity/MagiskTrustUserCerts/releases/tag/v0.4.1 Non root users
- Install patched apk that accepts user ca certs, unfortunately you will have to uninstall the regular apk https://file.yuuki.me/0:/Leak/uc-patched.apk If the patched apk is not working you can patch it yourself by extracting the apk using SAI (on Play Store) & using apk-mitm. https://github.com/shroudedcode/apk-mitm 1b. Download the game files in the patched apk, or restore a backup if possible continued for root/nonroot...
- Install termux
- use these commands
pkg upgrade -y
pkg install python wget rustc-dev nano
python3 -m ensurepip --upgrade
python3 -m pip install --user pipx
python3 -m pipx ensurepath
export CARGO_BUILD_TARGET=aarch64-linux-android
pipx install mitmproxy
- Now download proxy config:
wget https://gist.githubusercontent.com/exzork/8bbf5975bb9efab0a9c8a03a01dadd5e/raw/c2574d6f66798e65f2ed4709a69b43c6cecf60be/proxy.py
- Now run mitmproxy: mitmdump -s proxy.py -k --ssl-insecure --set block_global=false
- Then go to wifi settings and set proxy to 127.0.0.1 and 8080. Note that proxies are ignored if you are using a VPN. 6b. (optional) set excluded to discordapp.com,discord.com,discordapp.net,discord.gg,gateway.discord.gg
- Open http://mitm.it/ in your browser, download certificate. Then go to settings and install it.
- (rooted only, non-root can skip this step) Now reboot to set the user cert as a system one
- open termux, run mitmdump with the same parameters again (press the up key to fill in previous commands)
- ???
- Profit
Make sure to turn off your proxy after quitting the game or nothing will work. If you get error 4206, it's likely a problem with your internet connection, not the proxy.