honeynet / droidbot

A lightweight test input generator for Android. Similar to Monkey, but with more intelligence and cool features!
MIT License
812 stars 234 forks source link

Fixes in processing viewclient structures and profiling events on old Android versions #28

Closed nastya closed 8 years ago

nastya commented 8 years ago

I've faced the same problem with processing viewclient structures (that they can return None in unexpected places).

Another problem was in saving profiler info on old Android versions (specifically Android 4.1.2 which is the only one working with droidbox). There is no --sampling key in am commands until Android 5.0 and we should use command without it otherwise the profiler does not start. Without sampling profiler traces get quite large and so we face another problem with obtaining them after 'am profile stop'. This command seems to be asyncronous and if we pull the profiler trace file from device immediately after 'am profile stop' we get it empty. I did not find a proper solution for this and put a sleep for 3 seconds here which is enough at least on my machine.