Liu et al. / Automatic UI Interaction Script Generator
3178
rate seems to stay low at the start. About forty-five second, AndroAutoScript enters another part of the program
which concentrated on Activity usage. The visit count, then, increases steadily when triggering nearby new
Activities one-by-one.
At the same time, monkey encounter the bottleneck and visit rate stops growing. Monkey generates random
stream that may be trapped inside a loop calling structure and hardly trigger each UI in a multiple-component
interface. Although we set command to reduce the system-key-event in monkey, it would sometimes distracted by
BACK key or other system event. In other words, we can say random trigger stream calls Activities by fortune. On
the contrary, AndroAutoScript follows the calling structure and it can steadily and sequentially go through every
part of a program.
According to our experiment, our approach can efficiently reach most parts of an application. Monkey,
however, would take a lot of time trapped in some calling structure that may slow down the automation
progression.
CONCLUSION
In this work, we propose an approach to Android application UI automation. Our motivation is to reduce the
human resource cost while execution dynamic analysis on Android applications. Our method combines the
information of disassembled code and XML resources file in Apk to build up an automation script. And we choose
Android SDK tool, monkeyrunner, as our script executor.
There are other excellent approaches to Android UI automation such as DroidTrace (Zhen et al., 2014) deploy a
method called “forward execution”. They utilize Apk repackaging technique, insert UI event trigger code after
every UI listener setting to fulfill automation. SmartDroid (Zheng et al., 2012) take a mixed approach with both
static and dynamic method. Unless analyze ACG with static Apk data, they further make modification on Android
emulator to catch implicit call inside Android OS.
The advantage of our approach is that it takes low effort in implementation. We do not need to modify Apk and
repackage it neither need to modify Android emulator. Also, we include monkeyrunner in our framework, so this
approach can easily transmit in between different version. Our approach takes exception in UI automation into
consideration. The alter step setting can increase the integrity of script execution.
Author Contributions: Yining Liu and Hung-Min Sun conceived and designed the experiments; Shih-Chi Wang
performed the experiments; Yang Yang analyzed the data; Yeh-Cheng Chen contributed
reagents/materials/analysis tools; Shih-Chi Wang wrote the paper; Yining Liu revised the paper.
Conflicts of Interest: The authors declare no conflict of interest. The founding sponsors had no role in the design
of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, and in the decision
to publish the results.
REFERENCES
Androguard. (n.d.). Retrieved from https://code.google.com/p/androguard/
Android – Wikipedia. (n.d.). Retrieved from https://en.wikipedia.org/wiki/Android (operating system)
Android monkey. (n.d.). Retrieved from https://developer.android.com/studio/test/monkey.html
Android monkeyrunner. (n.d.). Retrieved from
https://developer.android.com/studio/test/monkeyrunner/index.html
Apktool. (2017). A tool for reverse engineering Android apk files. Retrieved from
https://ibotpeaches.github.io/Apktool/
Baskaran, B., & Ralescu, A. (2016). A Study of Android Malware Detection Techniques and Machine Learning. In Master
of Arts in Intercultural Studies (MAICS), pp. 15-23.
Faruki, P., Bharmal, A., Laxmi, V., Ganmoor, V., Gaur, M. S., Conti, M., & Rajarajan, M. (2014). Android security: A
survey of issues, malware penetration and defences. Communications Surveys & Tutorials, IEEE, 17(2), 998 –
1022. https://doi.org/10.1109/COMST.2014.2386139
Genymotion emulators. (n.d.). Retrieved from https://www.genymotion.com
Google Play: number of available apps 2009-2017. (2017). Retrieved from
https://www.statista.com/statistics/266210/number-of-527-available-applications-in-the-google-play-
store/528
Hou, O. (2012). A look at google bouncer. Retrieved from http://blog.trendmicro.com/trendlabs-security-
intelligence/a-look-at-google-bouncer/