25

I'm trying to get Genymotion (an x86 Android emulator hosted in Virtualbox) working with Charles proxy. I've managed to connect the device to the proxy in the device's wifi proxy settings, using the gateway ip (the vm is configured to use a host-only adapter fwiw) and http traffic is proxied just fine. I've got the charles cert installed on the vm, but all ssl connections still fail with "SSL: Unrecognized SSL message, plaintext connection?" errors. Has anyone been able to configure genymotion to work with Charles as an ssl proxy? Is there a more generic solution I can implement through the virtualbox settings?

Thanks in advance.

CtrlF
  • 674
  • 3
  • 8
  • 17
  • can you maybe explain with some more details, what conifg did you change, that normal http traffic could be tracked... ? thx in advance – cV2 Oct 30 '13 at 01:57
  • 6
    If someone searches it too: In your virtual device, Go to Android settings menu In Wireless & Networks section, select Wi-Fi Press and hold for 2 seconds WiredSSID network in the list Choose Modify Network Check Show advanced options Select Manual for Proxy settings menu entry Now enter the proxy settings provided by your network administrator Finally press the Save button <-> from https://cloud.genymotion.com/page/faq/#android-proxy – cV2 Oct 31 '13 at 16:22
  • 1
    btw: to enable ssl in charles itself: You must specifically identify the host names you want to enable SSL Proxying on. The list is in the Proxy Settings, SSL tab. You can also right-click on a host name in the structure view and turn on or off SSL Proxying. – cV2 Jan 21 '14 at 14:52

4 Answers4

21

Go to your genymotion emulator

Settings -> Wifi -> Press and hold your active network

Select “Modify Network”

Select “Show Advanced Options”

Select “Proxy Settings -> Manual”

Set your Proxy to: 10.0.3.2 (Genymotion’s special code for the local workstation. the Network mode must be NAT on virtual device configuration)

Set your Port to: 8888

Press Save.

Although after this you will see the network requests logged in charlesproxy . Open the genymotion browser and go the following URL http://charlesproxy.com/getssl to download and install the certificate . you should be good to go . Copied from :http://rexstjohn.com/using-genymotion-charles-proxy/

ultra.deep
  • 1,699
  • 1
  • 19
  • 23
Salil Kaul
  • 261
  • 2
  • 7
  • its easier to directly install the certificate on genymotion by opening the following url http://charlesproxy.com/getssl on the device – Salil Kaul Sep 30 '15 at 12:18
  • It ask to set up PIN, is there a way to avoid it ? – vikramvi Sep 04 '18 at 10:12
  • Even after doing this step, I'm getting 503 response. can you please check https://stackoverflow.com/questions/52163004/unknownhost-api-staging-companyname-com-nodename-nor-servname-provided-or-not – vikramvi Sep 04 '18 at 10:16
  • Official docs for Charles and VPN https://www.charlesproxy.com/documentation/faqs/vpn-not-working-with-charles/ – Michal Harakal Sep 05 '18 at 13:30
14

Updated 21.07.2016 reflecting changes since Charles 3.10

For enabling plain text communication on SSL connections Charles act as a Man in the Middle. After you have managed your device to communicate via Charles http proxy, you need to download and install certificate from your running instance of Charles, its generated and signed by a Charles Root Certificate.

Basically there are two ways possible (I prefer the first one):

Download and install directly on device

Device has to be configured to communicate via Charles!

  1. start browser
  2. open http://charlesproxy.com/getssl
  3. certificate download will be started
  4. confirm insertion dialog

Save the certificate from Charles UI

  1. save the certificate via "Help -> SSL Proxying -> Save Charles Root Certificate.."
  2. put it on a device (via adb push, email ....) and click on the file in order to install it.

Note 1: After install the certificate you will be forced to create a security Pin/Pattern/Password for the device.

Note 2: Since Charles v3.10 single SSL Root Certificates aren't supported anymore.

Michal Harakal
  • 1,025
  • 15
  • 21
  • Even after doing this step, I'm getting 503 response. can you please check https://stackoverflow.com/questions/52163004/unknownhost-api-staging-companyname-com-nodename-nor-servname-provided-or-not – vikramvi Sep 04 '18 at 10:16
0

After install the cert you will be forced to create a security Pin/Pattern/Password for the device. :)

JamesDeHart
  • 245
  • 2
  • 9
0

It's tricky to setup properly on genymotion device, but here is the steps: 1. Start Genymotion device 2. Go to Setting -> Wifi -> Hold or open Advance Tab 3. Proxy Setting and select Manual 4. Config to the port of Mitm app. Charles is 8888, Proxyman is 9090 5. Install the certificate at: - http://charlesproxy.com/getssl for Charles - http://proxy.man/ssl for Proxyman 6. Accept the Certificate 7. Test again.

Basically, those steps are consistent from Charles Proxy and Proxyman. Hopefully it could help you.

Nghia Tran
  • 2,600
  • 2
  • 16
  • 25