tweaselORG / experiments

Smaller one-off experiments/research projects that don't warrant their own repo.
Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

Traffic collection for TrackHAR adapter work #1

Closed baltpeter closed 1 year ago

baltpeter commented 1 year ago

For writing new adapters for TrackHAR and properly documenting the old ones (https://github.com/tweaselORG/TrackHAR/issues/9), we need to run a new traffic collection as the most recent ones we have are now quite outdated.

Unfortunately, I hadn't thought of that yet when working on https://github.com/tweaselORG/meta/issues/16, and just threw the traffic away for that run. Oh well, I'll just run a new one. But I do also want to do a run with iOS apps.

baltpeter commented 1 year ago

Since the goal here isn't to actually to analyze apps' behaviour (especially not with regards to consent dialogs) but only to collect as many tracking requests as possible, I think it makes sense to use monkey testing.

baltpeter commented 1 year ago

On Android, that's pretty easy with a command like this:

adb shell monkey -p de.hafas.android.db --throttle 50 --pct-syskeys 0 100000

However, from my testing, this is very prone to toggling system settings (like the airplane mode) through the quick settings thingy at the top of the screen, even though I used -p to limit the package and --pct-syskeys 0 to prevent system key events. I don't know how to avoid this, so I guess I can only use this in an emulator that I can reset after each run.

baltpeter commented 1 year ago

On iOS, we could use https://github.com/testableapple/xcmonkey but that requires macOS and I can't be bothered with that right now.

baltpeter commented 1 year ago

This has now finished running. The source code is in https://github.com/tweaselORG/experiments/tree/main/monkey-july-2023. The data will be published through https://github.com/tweaselORG/meta/issues/33.

I analysed 804 apps on Android and 1062 apps on iOS. There were 126,161 requests in total.

image