adb shell getevent -l | python airtest_recorder.py > main.pypython main.pymonkey_record.py and monkey_playback from https://github.com/miracle2k/android-platform_sdk/tree/master/monkeyrunner/scripts
python-androguard: https://code.google.com/p/androguard/wiki/Usage#Androaxml