简体   繁体   中英

How to view network traffic of React Native App on Android WITHOUT code

I'm trying to view the network traffic of an android app for which I'm in no way associated.

Here's what I've done:

  1. Install app from google play store. Running adb shell pm path ... shows multiple APK files have been installed.

  2. Proxy network traffic through my laptop. This works but all the requests from the app are encrypted.

  3. Install custom certificate authority on my android to prepare for SSL encrypt/decrypt inside laptop proxy.

  4. Decrypt traffic on my laptop proxy. From laptop proxy logs I can see many requests are succeeding, including mail.google.com. However the app I'm interested in is failing SSL handshake between android and my laptop.

  5. Pull all app APK files from my android to laptop.

My plan: Modify the APK files and reload them onto my android to accept my own SSL ca. I believe this can be achieved by simply modifying/adding xml files.

Problem: How do I configure android studio to load the many APK files onto my android. I can get it to install one APK file, but this doesn't work.

Edit1: Replace 'cert' with 'ca' for clarity.

Putting in your own cert won't work. The encrypted traffic will be encrypted with the public key of the server when going to the server, and the app wil make a random one for traffic coming back. Adding an SSL cert won't effect outgoing traffic, unless you're also going to man in the middle attack it.

Probably the easiest way to do this is the compile a custom AOSP that replaces the networking libraries with versions that also log to a file. Let the traffic go through as normal, but let the SSL lib decrypt it for us and read the results directly from that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM