'How to see the bandwidth consumed on different devices?
I need to check for a streaming app that the different video quality levels are respected. After searching, the easiest way to check the video quality is to switch to cellular mode (4G) and make a setting on the application (Low, Standard, High) and stay on a video stream for 1 hour. Depending on the setting an approximate amount of data must have been consumed.
I have to test this feature on several devices:
- Desktop
- iOS
- Android
- tvOS
- Android tv
- Smart tv
On Android I found the "Network Speed" application which does the job. I can't find for other devices.
My questions :
Is there any other solution that would check the video quality?
If solution 1 is the best, are there applications for other devices that allow me to analyze the bandwidth and reset it after each use ?
I have also searched by connecting my devices with adb connect but I can't find a solution.
Solution 1:[1]
The best way to measure this information is external to the device. Then, you can be absolutely sure what's happening over the wire, and you won't need to measure differently from device to device. There are two methods I use:
Method A: Network Packet Capture
Using a tool such as Wireshark, you can monitor all the traffic on the network.
However, you will need to need to capture traffic at a point in the network where data will actually pass through. One easy way to do this is to add another Ethernet adapter to your computer, and connect the device through it. Then use your operating system's network config to route internet traffic through.
I have a bit more permanent setup where I use a cheap Ubiquity router. It has a shell with tcpdump
that I can access over SSH. Within Wireshark, it's possible to set up remote capture this way. That way, I can monitor network traffic on those devices, even if I'm set up over WiFi.
Method B: Proxy
I often use a tool called Fiddler, which is great for debugging HTTP servers, modifying traffic, replaying HTTP(S) requests, etc. It can actually decrypt HTTPS traffic if you allow it to man-in-the-middle the requests and accept its fake TLS certificate.
If you could use this tool, you could see right away what requests the applications are making.
The downside is that many devices these days will not allow you to install the Fiddler root certificate, which means that you won't be able to intercept the HTTPS traffic. And, some apps ignore proxy configuration. Also, non-HTTP(S) traffic still can go out over the network. None the less, it's a very helpful tool if it works for your specific use case.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Brad |