Android : Emulator - How To Monitor Network Traffic
Mar 16, 2010How do I monitor network traffic sent and received from my android emulator?
View 3 RepliesHow do I monitor network traffic sent and received from my android emulator?
View 3 RepliesIn my system, there has a WebView component, and i want to monitor all traffics when WebView open some URL. I know how to monitor whole phone's traffic, there has an example about how to monitor whole phone's traffic:
http://code.google.com/p/android-labs/source/browse/svn/trunk/NetMeter
But I have no any idea on how to monitor only my own app, how can i do?
I'm interested in whether there is a way to monitor HTTP(S) traffic on an Android phone? What I would like to do is to be able to retrieve all URLs that have been accessed on the phone's browser. I thought that there would be a browser intent for that, but have not seen anything - given I'm green, maybe I just did not know where to look?
I followed the question and answer here, but it works only for hyperlinks which were clicked by the user, however I need to catch all URLs - including the ones typed in by the user. Basically I need to know about every single URL that was opened in the web browser.
Can I register some kind of a handler with the browser?
I'm wondering if, with the G1, it's possible to force the network traffic to pass through the Wifi or through the Cell GSM network. I need to force an application to connect through the tower network to get some login information. Is this possible? Anyone have any ideas as to how this would be possible? I'm trying to accomplish this inside an app with the Android SDK (Sorry I wasn't more clear about that originally)
View 3 Replies View RelatedMy eris has always has pretty alright battery life, what I would expect out of a smartphone, if unplugged at 9AM it usually was running on its last leg around midnight. I've had it for over 5 months now, I've always had it activated on alltel, I installed the 2.1v3 leak before the official OTA was out and just lately it seems like there something very wrong with my battery life...
If I unplug my phone at 9AM within the past week and occasionaly check and respond to a text message, my battery had been down to almost 30% by NOON... what?..
I have noticed that if I disable Mobile Network (3g/1x data), the thing lasts all day and some... If I turn mobile network ON, I can't see that I have any network traffic or any apps running in the background that are syncing data at all... I've had google account sync mess up on me before and have to reset my google account because it gets stuck in a syncing loop, but its not doing that, already checked. Very weird.
Anyone thing it could be something wrong in my ##PROGRAM#/##778# provisioning menu, maybe something got changed?.. Maybe it could be do to Alltel's AT&T merger that's happening right now, maybe some 3G tower's radios are turned off or something...
I was trying to search for an android app that can generate network traffic (UDP) for stress testing a network.
View 2 Replies View RelatedI have a specific 3G Simcard (specific APN) that can access to my network. I would like to share my 3G connection through wifi (for example)
After some tests, I can see that there is no network bridging between my 3G interface and my wlan0 interface.
So if I understand correctly, I need a rooted phone to do that ? ("route add" command line etc...)
Of is there an easiest way to bridge the traffic between two interfaces on an Android OS ?
I have set up the proxy(10.0.2.2) and port(8888) of Emulator and it can connect to the net. But the Fiddler can just get traffic of the Browser in Emulator, it can not get anything of the Market. i.e. if I open an page by the Browser, there will be some traffics in Fiddler and if I go into the Market to find some applications, then Fiddler will show nothing. How can I make it work?
View 3 Replies View RelatedWould this Android code be a correct way to test for http network availability during a phone call, or does it exclude networks that should be included or vice versa:
CODE:.....................
Is there an app or any way to find network traffic for an app at real time? They way Chrome/IE dev tools allow you to monitor network requests and response.
View 3 Replies View RelatedAnyone know an app that will tell me which apps/processes are responsible for the network traffic on my hero. I already have net counter for the overall amount, just looking for an app to track by process.
View 2 Replies View RelatedMy phone is Galaxy S2 Skyrocket on AT&T, not rooted or anything.
Google Search says "Unusual traffic from your computer network" and WON'T SEARCH. This happens even if I try type in the search or use voice command.
Here we go: Go to Home screen, get into "Settings", then "Applications", then "Manage Applications"In my list, I selected Gmail, then "Clear Data" (when this option is available) and "Uninstall updates" (may be only "Uninstall")I did the same thing for the following apps:Google Play BooksGoogle Play servicesGoogle Play StoreGoogle Search
Then I powered off the phone, waited 10 seconds and restarted. I let it reboot completely and then the 'update' notifications appeared on the Home screen. I updated each app carefully, and let it settle, then updated the next, until all were updated. Google 'Search' now works perfectly!!
I've read many postings about problems getting the Android emulator DNS to work properly in certain situations. I have a simple app that makes an HTTP connection to a server on the Internet. If I use an IP address using the latest version of the emulator it works fine. If I use the domain name it throws a java.net.UnknownHostException: Host is unresolved: exception. The identical code works fine on any actual device. Has anyone figured out how to fix this situation? I've spent days trying everything, from using proxy servers to setting up and running a DNS server on my development machine. This situation/experience is a shame, because the emulator seems like such an impressive and well thought out collection of tools for developing and testing apps. However, it is currently useless to me. Is there anyone who can help? A prior thread on the same issue-appears to be the same situation: http://groups.google.com/group/android-developers/browse_thread/threa...
View 3 Replies View RelatedI'm doing a distributed system using Android for my research project.In order to test it, I have connected two emulator instances in the same host machine. However, I need to put these two instances in separate host machines and make them connect through the local network (Wi-fi).I have seen that the emulator runs behind a virtual router, so it seems that I would have to somehow configure such virtual router, in order to forward my requests.
View 2 Replies View RelatedI've noticed very poor performance in the emulator (1.6 and 2.1) when trying to complete the forth statement below. It will take 5+ minutes running in the emulator. Interestingly, when I debug on my phone it's not nearly as bad at maybe a minute or so, but still not great. Running the app on my phone without debugging yields great performance (seconds). URL url = new URL(CommonProperties.BASE_SERVICE_URL + "param=1"); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document dom = builder.parse(url.openConnection(). getInputStream()); is there something I can do to speed up network access while using the emulator? Has anyone noticed anything similar?
View 2 Replies View RelatedI install sdk on centos.At first it works well. But I encounter a strange issue:One day my emulator can not access it's host os's network any more.
View 2 Replies View RelatedHow do I simulate a WiFi network using the Emulator?
View 2 Replies View RelatedI am developing an application for android based cell phone from emulator. The application i am developing requires ad hoc network. I do not own the phone or can't get it from anywhere else. So I want to create and establish ad hoc network in that emulator only. I am using standard ADK 2.2. I read somewhere that the information and settings of networks are read through a file called tiwlan.ini. Is this file available even for emulator? If it is, where is it located inside it? If its not, can i copy the file available on Internet and put it somewhere inside my emulator and change system path to read network information to that file's path? If even that is not possible, is there any solution available by which I can establish ad hoc network on emulator?
View 1 Replies View RelatedI am trying to test some udp networking between emulator and host and I have a problem with setup. I assigned address 10.0.2.14 to the host interface with 10.0.2.1 as gateway.. Can't ping 10.0.2.15 from my host, neither can i ping 10.0.2.14 from emulator. Ping from emulator to 10.0.2.2 works fine - I can capture that ICMP traffic on the loop back interface of my host, so ICMP works, but how can i create traffic from the host to emulator? Can someone point me how to make it work? Note: firewall on my host is disabled.
View 3 Replies View RelatedI wonder if anybody has ran into the issue where a running emulator would lose network connection all at a sudden for no obvious reason. And I am sure the computer running the JVM is still online.Restarting the emulator seems to fix the issue but it's been a major PITA for me as it interrupts the work flow.I am using 2.1 SDK 7.
View 5 Replies View RelatedI'm running some service on my android emulator. On android I bound it to 127.0.0.1:6100.
How can I access the service from my development machine? Do I have to redirect?
i am having difficulties to have my android app running in the emulator to connect to servers in my local network.i am getting a java.net.UnknownHostException but the servers are resolvable fine from the machine where the emulator is run.
View 2 Replies View RelatedI'm trying to write an application that needs to know when there is no IP network connection available. I am using the android.net.conn.CONNECTIVITY_CHANGE broadcast event along with ConnectivityManager to react to the changes in state to achieve this, but I'm having problems testing my set up in the emulator.I have tried both flight mode and pressing F8 to disable the "Cellular Network" but even with both of these engaged the application still "sees" the underlying network.Has anybody managed to find a way to simulate a total lack of network access?
View 3 Replies View RelatedIs it possible to activate the network location provider on the android emulator? Maybe with a fake cell id?
View 1 Replies View RelatedI only get a phone signal about a third of the times i start the emulator. I've read on these groups that you have to have an internet connection before starting the emulator. Since i'm connected to the internet 24/7 :) this is not the problem I've also read somewhere that you should try do disable all other network connections (which i've done) and the problem persists. I'm using Windows 7 and Android 2.1 + API's emulator. You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android
View 2 Replies View RelatedWhat are the settings required to access network for those who dont have ADSL connection?
View 1 Replies View RelatedI have an android application that parses some HTML, downloads an image, and displays it. I'm using an AsyncTask to do the HTML parsing and image downloading, but that shouldn't be relevant. I never have a problem when I'm on WiFi on my phone, when I'm using the Eclipse debugger on my phone, or when I'm using the emulator. When I have my phone on the cell network (even with pretty good reception), the image sometimes fails to display. I'm having a hard time figuring out what is wrong, since the problem cannot be reproduced in the debugger. Does anyone have any idea what could be wrong?
Update: I have narrowed it down to the image downloading function. This way my original code:.......................
I'm developing an App that sends keep-alive packets to its server to ensure the connection is still alive.
The server is java based and thus easily to run. I run the server on a virtual machine (Windows 7). After my App is connected and the first keep-alive packet is received (it displays a message in its console output) I disable the network interface in Windows. This step is very important because by disabling it, there is no way to send any packet back to the client informing it about network changes.
The clients are configured to send every 25 seconds a keep-alive packet, so you don't need to wait long.
When you use the sample JavaClient on Windows 7 it takes less than a minute after the keep-Alive packet and an exception is thrown which triggers reconnection (which currently can't occur). This is the expected behaviour.
When you use the sample Android App on an emulator (tested Android version 2 and 4) it is the same behaviour. So in less than a minute after the keep-alive packet it recognises that the connection is dead, throws an exception, this triggers reconnection.
Problem is now when this App runs on a real device (tested several, Xpearia Arc S, one Cyanogen Mod 4 on Galaxy S3 and my Galaxy S3). I've waited 5 minutes, but there was no exception. This behaviour is reproducable.
Since this is a sample App, it uses no wakelock or service, so to test it is important to have it in foreground all the time (don't switch to other Apps or homescreen) and increase your display timeout to a few minutes to ensure that it doesn't go off. Use Logcat-Output to get informed whats happening, because there is no output in the App itself.
Now Sample-Code is in the attachement. Something had gone wrong. The Code consists of 3 Eclipse projects which you can easily import.
I'm working on a Push Notifications library for Android (http://deaconproject.org/) that needs to take action if network connectivity is interrupted or changed - namely, it needs to re-initiate a server connection or pause its operation until network connectivity is available. This seems to work fine using and Android BroadcastReceiver for "android.net.ConnectivityManager.CONNECTIVITY_ACTION".
My problem is in testing the library - I would like to automatically test the library's response to a broken network connection, or a transition from 3G to WiFi, under various configuration conditions. The problem is, I don't want to sit with the emulator and hit F8 all day.
Is there a way to programmatically manipulate network connections on Android from within a jUnit test without resorting to toggling Airplane Mode? I've already tried issuing commands to the emulator via the console, manipulating the GSM mode, etc, but while the phone state changes on the display, the Internet connection remains up.
I'm trying out the network speed emulation as described in the following link: http://developer.android.com/guide/developing/tools/emulator.html#net...
But is doesn't work, although "network status" command shows the correct values... I know it doesn't work by writing code to monitor the eth0 device in /proc/self/dev/dev, whatever speed I set, it seems always use maximum speed available to the host machine.