CFP last date
20 January 2025
Reseach Article

Design an Optimized Compiler to Enhance Performance of Android Applications

by Marwa Dahdouh, Mouhamad Ayman Naal, Souheil Khawatmi, Amer Bouchi
International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
Volume 177 - Number 24
Year of Publication: 2019
Authors: Marwa Dahdouh, Mouhamad Ayman Naal, Souheil Khawatmi, Amer Bouchi
10.5120/ijca2019919709

Marwa Dahdouh, Mouhamad Ayman Naal, Souheil Khawatmi, Amer Bouchi . Design an Optimized Compiler to Enhance Performance of Android Applications. International Journal of Computer Applications. 177, 24 ( Dec 2019), 42-50. DOI=10.5120/ijca2019919709

@article{ 10.5120/ijca2019919709,
author = { Marwa Dahdouh, Mouhamad Ayman Naal, Souheil Khawatmi, Amer Bouchi },
title = { Design an Optimized Compiler to Enhance Performance of Android Applications },
journal = { International Journal of Computer Applications },
issue_date = { Dec 2019 },
volume = { 177 },
number = { 24 },
month = { Dec },
year = { 2019 },
issn = { 0975-8887 },
pages = { 42-50 },
numpages = {9},
url = { https://ijcaonline.org/archives/volume177/number24/31047-2019919709/ },
doi = { 10.5120/ijca2019919709 },
publisher = {Foundation of Computer Science (FCS), NY, USA},
address = {New York, USA}
}
%0 Journal Article
%1 2024-02-07T00:46:49.789989+05:30
%A Marwa Dahdouh
%A Mouhamad Ayman Naal
%A Souheil Khawatmi
%A Amer Bouchi
%T Design an Optimized Compiler to Enhance Performance of Android Applications
%J International Journal of Computer Applications
%@ 0975-8887
%V 177
%N 24
%P 42-50
%D 2019
%I Foundation of Computer Science (FCS), NY, USA
Abstract

This paper presents a detailed study of the mechanism to design a compiler of Smali language to generate optimized Android applications. Smali language; which includes the dex bytecode; is the assembly language under Android OS, it is generated from the Java source code. The phases of designing the target compiler are described and the structure of files that are the input and output of the compiler are explained. The structure of the input files of ART (Android RunTime) compiler is explained, with the focus on the dex file (Dalvik EXecutable) and its corresponding Smali language file, that includes dex bytecode code. The proposed compiler, Which is called MySMALI compiler, generates optimized Smali code by replacing some blocks in the Smali code by other blocks more efficient in performance and equivalent in behavior with original blocks. Reverse Engineering techniques are used to decompile and verify the correctness of the generated optimized APKs. As result, an optimized compiler is designed and the experimental evaluation shows that the compiler is able to save from 4.8% to 12.9% of the overall execution time in various application scenarios. This ratio of improvements increases up with the size and complexity of the optimized code.

References
  1. Ms. Debosmita Sen Purkayastha, Mr. Nitin Singhla, June 2013, "Android Optimization: A Survey, International Journal of Computer Science and Mobile Computing", IJCSMC, Vol. 2, Issue. 6, pg.46 – 52.
  2. Jeehong Kim, Inhyeok Kim, Changwoo Min, Hyung Kook Jun, Soo Hyung Lee, Won-Tae Kim, and Young Ik Eom, 2015, "Static Dalvik Bytecode Optimization for Android Applications", Institute for Information & Communications Technology Promotion (IITP), ETRI Journal.
  3. Chih-Sheng Wang, Guillermo A. Perez, Yeh-Ching Chung, Wei-Chung Hsu, Wei-Kuan Shih, 2011, "A Method-Based Ahead-of-Time Compiler for Android Applications", ACM 978-1-4503-0713.
  4. Chung-Min Kao, Wei-Chung Hsu, Yeh-Ching Chung, Guillermo A. Pérez, 2012, "A Hybrid Just-In-Time Compiler for Android, Comparing JIT Types and the Result of Cooperation", ACM.
  5. Abhishek Vasisht Bhaskar, 2016, "Automated code extraction from packed android applications", Syracuse University.
  6. CENSUS S.A, 2015, "Fuzzing Objects d’ART Digging Into the New Android L Runtime Internals".
  7. Aleksandr Pilgun, Olga Gadyatskaya, Stanislav Dashevskyi, and all, 2018, “Fine-grained Code Coverage Measurement in Automated Black-box Android Testing”, University of Luxembourg, Luxembourg, arXiv:1812.10729v1 [cs.CR].
  8. Tim Lindholm, Frank Yellin, Gilad Bracha, Alex Buckley, 2014, "The Java Virtual Machine Specification". Addison.Wesley, Java SE 8 Ed. 600p.
  9. Google Inc.dex, 2007, "Dalvik Executable Format".
  10. Lei Xue, Xiapu Luo, Le Yu, Shuai Wang, Dinghao Wu, , 2016, "Adaptive Unpacking of Android Apps", The Hong Kong Polytechnic University, et al.
  11. Alexandre Bartel, Jacques Klein, Yves Le Traon, Martin Monperrus, 2012, "Dexpler: Converting Android Dalvik Bytecode to Jimple for Static Analysis with Soot", ACM, ISBN 978-1-4503-1490.
  12. Pooja Singh, Dr. Santosh Singh, Pankaj Tiwari, 2015, "Discovering Persuaded Risk of Permission in Android Applications for Malicious Application Detection", AMET University.
  13. Quan Qian, Jing Cai, Mengbo Xie, Rui Zhang, 2016, "Malicious Behavior Analysis for Android Applications", International Journal of Network Security, Vol.18, No.1, PP.182-192.
  14. Patrick Schulz, Daniel Plohmann, 2012, "Code Protection in Android", Institute of Computer Science, university of Communication and Distributed Systems.
  15. Geonbae Na, Jongsu Lim, Kyoungmin Kim, and Jeong Hyun Yi, "Comparative Analysis of Mobile App Reverse Engineering Methods on Dalvik and ART", Journal of Internet Services and Information Security, 2016.
  16. Yang Wenbo, Zhang Yuanyuan, Li Juanru, Shu Junliang, Li Bodong, Hu Wenjun, Gu Dawu, 2015, "AppSpear: Bytecode Decrypting and DEX Reassembling for Packed Android Malware", National Science and Technology Major Projects of China.
  17. Yi-Ping You, Jian-Ru Chen, 2015, "A static region-based compiler for the Dalvik virtual machine", National Chiao Tung University.
  18. Xueliang Li, John P. Gallagher, 2016, "A Source-level Energy Optimization Framework for Mobile Applications", arXiv:1608.05248v1 (cs.SE).
  19. Michael Backes, Sven Bugiel, Oliver Schranz, Philipp von Styp-Rekowsky, Sebastian Weisgerber, 2017, "ARTist:The Android Runtime Instrumentation and Security Toolkit", IEEE.
  20. Paul Sabanal, 2015, "Hiding Behind ART", IBM Security Systems, IBM X Force.
  21. https://forum.xda-developers.com/android/software-hacking/tool-apk-easy-tool-v1-02-windows-gui-t3333960. [Accessed 14/5/ 2019].
  22. Dewashish Upadhyay, et al, 2016, "Detecting Malicious Behavior of Android Applications", IJSTE, International Journal of Science Technology & Engineering , Volume 2, Issue 10, ISSN (online): 2349-784X.
  23. Chit La Pyae Myo Hein, 2014, "Permission Based Malware Protection Model for Android Application", International Conference on Advances in Engineering and Technology.
  24. Evgeniy Ilyushin, Dmitry Namiot, 2016,"On source-to-source compilers", International Journal of Open Information Technologies ISSN: 2307-8162.
  25. Malaga, Spain, 2018, "Model Checking Software", 25th International Symposium, SPIN.
  26. Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman, 2007, "Compilers principles, Techniques, & Tools", Second Edition, QA76.76.C65A37.
  27. https://github.com/JetBrains/android/tree/master/smali. [Accessed 14/2/ 2019].
  28. Lu CHEN, Xing LIU, Yuan-yuan MA, Cong-cong SHI and Ni-ge LI, 2016, "Research on Static Analysis Technology of Android Application Security Defects", International Conference on Electrical Engineering and Automation, ISBN: 978-1-60595-407-3.
  29. Annal Ezhil Selvi S, J . Persis Jessintha, 2018, "Compiler Design Concepts, Worked out Examples and MCQs for NET/SET",https://www.researchgate.net/publication/316560022.
  30. Yauhen Leanidavich Arnatovicha, et al, 2018, "Comparison of Android Reverse Engineering Tools via Program Behaviors Validation Based on Intermediate Languages Transformation", IEEE Aceess, Digital Object Identifier 10.1109/ACCESS.2018.2808340.
Index Terms

Computer Science
Information Sciences

Keywords

Design Compiler lex and yacc Lexical analyses Smali language bytecode optimization APK Decompiler