DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workkloads.

Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Issue and Present Verifiable Credentials With Spring Boot and Android
  • How to Build a React Native Chat App for Android
  • Using Jetpack Compose With MVI Architecture
  • Implementing SOLID Principles in Android Development

Trending

  • Unlocking AI Coding Assistants Part 3: Generating Diagrams, Open API Specs, And Test Data
  • Breaking Bottlenecks: Applying the Theory of Constraints to Software Development
  • Unlocking the Benefits of a Private API in AWS API Gateway
  • Google Cloud Document AI Basics
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Charles Proxy in Android Emulator

Charles Proxy in Android Emulator

Learn how to use a tool called Charles Proxy with an Android emulator for capturing the traffic on your Android mobile application.

By 
Oscar Galindo user avatar
Oscar Galindo
·
Dec. 01, 17 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
19.4K Views

Join the DZone community and get the full member experience.

Join For Free

In this article, we will discuss how to capture the traffic of your Android application using a tool called Charles Proxy. I recommend you continue reading, you will love it! At least, we love here at Apiumhub.

Developing a web application means immediately viewing and analyzing all HTTP requests that are made. Client requests and server responses are easily traceable and reproducible. Instead, when you are working with a mobile device, both physical and virtual, the analysis of this traffic is not as trivial.

Therefore we will present a tool that is very useful, as much in the case covered in this article, as in many others, Charles Proxy. This tool can be used to monitor all HTTP and HTTPS traffic, with certificates that the proxy itself provides us, with a duration of 24 hours.

Set Up Charles Proxy

First of all, we will configure our Charles Proxy. To do this, let’s go to Proxy in the menu and follow these steps:

  • Proxy > Proxy Settings: We leave the port as default and activate “Enable transparent HTTP Proxying.”

charles proxy

  • Proxy > lL Proxy Settings: Activate “Enable SSL Proxying” and we add a new entry in Locations (Host: *, Port: *)

Charles proxy

How to Set Up the Android Emulator

Once we set up Charles Proxy, we are going to set up our Android emulator. For that, when the time of launching it arrives, we will need to pass the IP of our Charles Proxy as an environment variable (in Charles Proxy: Help > Local IP Address), with something similar to the following command:

 emulator -netdelay none -netspeed full -avd <emulador>  -http-proxy http://<ip-proxy> :8888  

(If we have changed the port for another when we had to set up the Charles, we also have to change the port value.)

Once the emulator is opened, we will install the certificate that gives us Charles Proxy by opening from our mobile browser this URL. A dialog will automatically appear to install a new certificate on mobile as shown in the following picture:

Charles proxy

It should be enough by putting a name and accepting the installation. Once all these steps are done, we go to Charlesproxy and click on the button “Start Recording” (Or also, from Proxy > Start Recording) and from now you will have any HTTP/HTTPS traffic exiting from the mobile. I leave you with a screenshot of the final result:

charles proxy

Charles Proxy Android (robot)

Published at DZone with permission of Oscar Galindo. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Issue and Present Verifiable Credentials With Spring Boot and Android
  • How to Build a React Native Chat App for Android
  • Using Jetpack Compose With MVI Architecture
  • Implementing SOLID Principles in Android Development

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!