LoginSignup
9
10

More than 3 years have passed since last update.

Android Studio 2.1のAndroid Emulatorの通信をCharles Proxyを使ってパケットキャプチャする

Last updated at Posted at 2016-07-12

個人的なメモ。多分Android Studioにかぎらず適用出来ると思う。
EmulatorはNexus 5 API 23で確認。

やり方

  • Charles Proxyを起動する。
  • Android StudioからAndroid Emulatorを起動する。
  • エミュレータの中のSettingsアプリ → Wireless & NetworksのMore → Cellular networks → Access Point Names → T-Mobile US(環境によって違うかもだけどとにかく使ってるやつ) → Proxyを自分のホストマシンのIP, Portを8888に設定
  • そのエミュレータのブラウザで http://charlesproxy.com/getssl/ にアクセスしてcharlesの証明書をインストールする。
  • これでてきとうに通信するとCharlesにパケットが流れるはず。
  • Charlesにパケットが流れてこない時はエミュレータを1度Airplane modeにしてまた戻すと動くかもしれない。
    • これで数時間無駄にしたぞ☆

補足

9
10
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
10