Computer Science ›› 2022, Vol. 49 ›› Issue (12): 136-145.doi: 10.11896/jsjkx.211100066

• Computer Software • Previous Articles     Next Articles

Automating Release of Android APIs Based on Computational Reflection

WANG Yi1,2, CHEN Ying-ren1,2, CHEN Xing1,2, LIN Bin2,3, MA Yun4   

  1. 1 College of Mathematics and Computer Science,Fuzhou University,Fuzhou 350116,China
    2 Fujian Key Laboratory of Network Computing and Intelligent Information Processing,Fuzhou 350116,China
    3 College of Physics and Energy,Fujian Normal University,Fuzhou 350117,China
    4 School of Electronics Engineering and Computer Science,Peking University,Beijing 100871,China
  • Received:2021-11-05 Revised:2022-07-28 Published:2022-12-14
  • About author:WANG Yi,born in 1996,postgraduate.His main research interests include Android application service generation and Android application service adaptation.CHEN Xing,born in 1985,Ph.D,professor,Ph.D supervisor,is a member of China Computer Federation.His main research interests include system software,software self-adaptation and cloud computing.
  • Supported by:
    National Key R & D Program of China(2018YFB1004800),Natural Science Foundation of Fujian Province for Distinguished Young Scholars(2020J06014) and Special Project on Science and Technology Development of Central Government Guiding Local Government(2019L3002).

Abstract: With the development of mobile hardware and 5G communication technologies,smart applications are booming,which has penetrated into all the aspects of our life and work.There are many functions in applications,which can not only satisfy the user’s requirements,but also be further released as APIs for external invocations.For instance,the APIs provided by applications can be invoked by the intelligent voice assistant.However,these functions must be released as APIs during the development phase,otherwise they cannot be used for external invocations.To address this problem,this paper proposes an approach to automatic release of APIs of Android applications based on computational reflection.It first rebuilds runtime software architecture for the activities of Android applications based on the reflection mechanism,without modifying the source code of application.Then,based on test cases of the specified function,it analyzes its user-behavior workflow and corresponding procedure calls.Finally,the function can be invoked by simulating the user behaviors,and then is released as the corresponding API.We evaluate our approach with 300 popular apps on Android app store Wandoujia,and the results show that our approach is effective for 280 of them.For the specified functions,APIs can be implemented by our approach in about 15 minutes,and their runtime performance is desirable.

Key words: API generation, Android app, Computational reflection, Runtime software architecture, Workflow

CLC Number: 

  • TP391
[1]Mobile Internet Use Passes Desktop[EB/OL].https://techcrunch.com/2016/11/01/mobile-internet-use-passes-desktop-for-the-first-time-study-finds.
[2]WANG H Y,LIU Z,GUO Y,et al.An Explorative Study of the Mobile App Ecosystem from App Developers’ Perspective[C]//Proceedings of the 26th International Conference on World Wide Web.Switzerland:WWW,2017:163-172.
[3]Activity[OL].https://developer.android.google.cn/guide/components/activities/intro-activities?hl=zh_cn.
[4]MA Y,HU Z N,LIU Y Z,et al.Aladdin:Automating Release of DeepLink APIs on Android[C]//Proceedings of the 2018 World Wide Web Conference.Switzerland:WWW,2018:1469-1478.
[5]Wandoujia [OL].https://www.wandoujia.com.
[6]Mobile deep linking[OL].https://en.wikipedia.org/wiki/Mobile_deep_linking.
[7]AZIM T,RIVA O,NATH S.ULink:Enabling User-DefinedDeep Linking to App Content[C]//Proceedings of the 14th Annual International Conference on Mobile Systems,Applications,and Services.New York:Association for Computing Machinery,2016:305-318.
[8]MAES P.Concepts and Experiments in Computational Reflection[C]//Proceedings of Object-oriented Programming Systems,Languages and Applications.New York:Association for Computing Machinery,1987:147-155.
[9]RODRÍGUEZ-ECHEVERRÍA R,MACÍAS F,PAVÓN V M,et al.Model-Driven Generation of A Rest API from A Legacy Web Application[C]//Proceedings of the 9th International Workshop on Model-Driven and Agile Engineering for the Web.Berlin:Springer-Verlag,2013:133-147.
[10]JIANG Y,ELENI S.Towards Reengineering Web Sites to Web-Services Providers[C]//Proceedings of the 8th European Conference on Software Maintenance and Reengineering.Piscataway,NJ:IEEE,2004:296-305.
[11]ZHANG S,CAI H Q,MA Y,et al.SmartPipe:Towards Inter-operability of Industrial Applications via Computational Reflection[J].Journal of Computer Science & Technology,2020,35(1):161-178.
[12]CANFORA G,FASOLINO A R,FRATTOLILLO G,et al.Migrating Interactive Legacy Systems to Web Services[C]//Proceedings of the 10th European Conference on Software Maintenance and Reengineering.Piscataway,NJ:IEEE,2006:24-36.
[13]CANFORA G,FASOLINO A R,FRATTOLILLO G,et al.A Wrapping Approach for Migrating Legacy System Interactive Functionalities to Service Oriented Architectures[J].Journal of Systems and Software,2008,81(4):463-480.
[14]LIU G G,HU C S M,CHEN S H,et al.Refactoring Java Code for Automatic API Generation[C]//Proceedings of the 2018 International Conference on Cloud Computing,Big Data and Blockchain.Piscataway,NJ:IEEE,2018:1-6.
[15]BENCOMO N,BLAIR G,FRANCE R.Summary of the Workshop Models@Run.Time at MoDELS 2006[C]//Proceedings of the 2006 International Conference on Models in Software Engineering.Berlin:Springer-Verlag,2006:227-231.
[16]BLAIR G,BENCOMO N,FRANCE R.Models@Run.Time[J].Computer,2009,42(10):22-27.
[17]SONG H,HUANG G,CHAUVEL F,et al.Supporting Runtime Software Architecture:A Bidirectional-Transformation-Based Approach[J].Journal of Systems & Software,2011,84(5):711-723.
[18]HUANG G,SONG H,MEI H.SM@RT:Applying Architec-ture-Based Runtime Management of Internetware Systems[J].International Journal of Software and Informatics,2009,3(4):439-464.
[19]SONG H,HUANG G,WU Y H,et al.Modeling and Maintaining Runtime Software Architectures[J].Ruan Jian Xue Bao/Journal of Software,2014,25(7):1731-1745.
[20]Peking University.SM@RT:Supporting Models at Run-time[OL].2009.http://code.google.com/p/smatrt/.
[21]OCTEAU D,LUCHAUP D,DERING M,et al.Composite Constant Propagation:Application to Android Inter-Component Communication Analysis[C]//Proc of the 37th IEEE/ACM International Conference on Software Engineering.Piscataway,NJ:IEEE,2015:77-88.
[22]ROUNTEV A,YAN D C,YANG S Q,et al.GATOR:Program Analysis Toolkit for Android [EB/OL].[2021-05-12].http://web.cse.ohio-state.edu/presto/software/gator/.
[23]Android API Reference.Android Developers[EB/OL].https://developer.android.google.cn/reference.
[24]HE X,XIE Z P.Structural Similarity Measurement of Web Pages Based on Simple Tree Matching Algorithm[J].Journal of Computer Research and Development,2007,44(Z3):1-6.
[25]Google App Indexing[EB/OL].https://developers.google.com/app-indexing/.
[26]Bing App Linking[EB/OL].https://msdn.microsoft.com/en-us/library/dn614167.
[27]Facebook App Links[EB/OL].https://developers.facebook.com/docs/applinks.
[28]GOMEZ L,NEAMTIU I,AZIM T,et al.RERAN:Timing-and Touch-Sensitive Record and Replay for Android[C]//Procee-dings of the 35th International Conference on Software Enginee-ring.Piscataway,NJ:IEEE,2013:72-81.
[29]HU Y J,AZIM T,NEAMTIU I.Versatileyet Lightweight Re-cord-and-Replay for Android[C]//Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming,Systems,Languages,and Applications.New York:Association for Computing Machinery,2015:349-366.
[30]ZHANG J H,SHEN L W,PENG X,et al.MashReDroid:enabling end-user creation of Android mashups based on record and replay[J].Journal of Science China Information Sciences,2020,63(10):50-69.
[31]KONG P,LI L,GAO J,et al.Automated Testing of Android Apps:A Systematic Literature Review[J].Journal of IEEE Transactions on Reliability,2019,68(1):45-66.
[32]LAI D,RUBIN J.Goal-Driven Exploration for Android Applications[C]//Proceedings of 34th IEEE/ACM International Conference on Automated Software Engineering.2019:115-127.
[1] WANG Yi, LI Zheng-hao, CHEN Xing. Recommendation of Android Application Services via User Scenarios [J]. Computer Science, 2022, 49(6A): 267-271.
[2] LIU Peng, LIU Bo, ZHOU Na-qin, PENG Xin-yi, LIN Wei-wei. Survey of Hybrid Cloud Workflow Scheduling [J]. Computer Science, 2022, 49(5): 235-243.
[3] LIN Chao-wei, LIN Bing, CHEN Xing. Study on Scientific Workflow Scheduling Based on Fuzzy Theory Under Edge Environment [J]. Computer Science, 2022, 49(2): 312-320.
[4] WANG Zi-jian, LU Zheng-hao, PAN Ji-kui, SUN Fu-quan. Workflow Scheduling Strategy for Deadline Constrained and Cost Optimization in Cloud [J]. Computer Science, 2022, 49(11A): 210800154-6.
[5] YU Hao-wen, LIU Bo, ZHOU Na-qin, LIN Wei-wei, LIU Peng. Survey of Multi-cloud Workflow Scheduling [J]. Computer Science, 2022, 49(11): 250-258.
[6] DOU Shuai, LI Zi-yang, ZHU Jia-jia, LI Xiao-hui, LI Xue-song, MI Lin, YANG Guang, LI Chuan-rong. Design and Implementation of Scientific Experiment Management System Based on jBPM [J]. Computer Science, 2021, 48(6A): 658-663.
[7] LIU Zhang-hui, ZHAO Xu, LIN Bing, CHEN Xing. Data Placement Strategy of Scientific Workflow Based on Fuzzy Theory in Hybrid Cloud [J]. Computer Science, 2021, 48(11): 199-207.
[8] MA Yu-yin, ZHENG Wan-bo, MA Yong, LIU Hang, XIA Yun-ni, GUO Kun-yin, CHEN Peng, LIU Cheng-wu. Multi-workflow Offloading Method Based on Deep Reinforcement Learning and ProbabilisticPerformance-awarein Edge Computing Environment [J]. Computer Science, 2021, 48(1): 40-48.
[9] ZHANG Long-xin, ZHOU Li-qian, WEN Hong, XIAO Man-sheng, DENG Xiao-jun. Energy Efficient Scheduling Algorithm of Workflows with Cost Constraint in Heterogeneous Cloud Computing Systems [J]. Computer Science, 2020, 47(8): 112-118.
[10] QI Bao-lian, ZHONG Kun-hua and CHEN Yu-wen. Semi-supervised Surgical Video Workflow Recognition Based on Convolution Neural Network [J]. Computer Science, 2020, 47(6A): 172-175.
[11] SUN Min, CHEN Zhong-xiong, YE Qiao-nan. Workflow Scheduling Strategy Based on HEDSM Under Cloud Environment [J]. Computer Science, 2020, 47(6): 252-259.
[12] ZHANG Zong-mei, GUI Sheng-lin, REN Fei. Android Malware Detection Based on N-gram [J]. Computer Science, 2019, 46(2): 145-151.
[13] XU Jun, XIANG Qian-hong, XIAO Gang. Load Balancing Scheduling Optimization of Cloud Workflow Using Improved Shuffled Frog Leaping Algorithm [J]. Computer Science, 2019, 46(11): 315-322.
[14] DU Yan-ming, XIAO Jian-hua. Workflow Scheduling Strategy with Multi-QoS Constraint Based on Priority in Cloud Environment [J]. Computer Science, 2019, 46(10): 128-134.
[15] XU Jian-rui, ZHU Hui-juan. Coevolutionary Genetic Algorithm of Cloud Workflow Scheduling Based on Adaptive Penalty Function [J]. Computer Science, 2018, 45(8): 105-112.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!