290 likes | 503 Views
Amel LIMAM Wafa BEN ALI Olivier MARTY Sahar SOULAIH Benjamin BRUSA Imededdine HOSNI. Supervisors Jean-Rémy FALLERI Xavier BLANC. Android Applications Reverse Engineering. AndroCheck. Outline. Overview. 1. Specifications. 2. Tools. 3. Application’s architecture. 4.
E N D
Amel LIMAM • Wafa BEN ALI • Olivier MARTY • Sahar SOULAIH • Benjamin BRUSA • Imededdine HOSNI Supervisors Jean-Rémy FALLERI Xavier BLANC Android Applications Reverse Engineering AndroCheck
Outline Overview 1 Specifications 2 Tools 3 Application’s architecture 4 Implementation 5 Results 6 Project management 7
Overview • Increasingnumber of applications available in AndroidMarkets • There is no assumption about the developer’sprogrammingskills • Android applications contain more and more differentartifacts and coherenceisneeded
Specifications Main objectives • Static code analyzer to check requirements • Modular software to easeevolution and addingfeatures • Software compatible with Eclipse environment and ADT
Android Platform Generatedat compilation R.java Java Resources XML descriptors
Android Platform myActivity.java setContentView(R.layout.myLayout); ObjectTypeobj = (ObjectType)findViewById(R.id.ObjectId) myLayout.xml <ObjectTypeandroid:id="@+id/ObjectId"> </ObjectType>
Specifications • First requirement • A Java object instantiated in the main code must be declared in its corresponding XML layout. • Second requirement • The cast type of a Java object at its instantiation must be compatible with the type of the object declared in the XML layout. • Thirdrequirement • Any useless XML layout must be reported to the developer
Eclipse Modeling Framework Modeling framework and code generation facility • To develop and manage the whole application life cycle • To focus on the model. • The model itself is described in a meta-model.
Eclipse Modeling Framework Metamodeling ? • The construction of a collection of concepts within a certain domain • Meta-Model • Another abstraction • Model structure • Model • An abstraction of phenomena in the real world Application
Typical EMF usage scenario UML Java code XML Schema Ecore Model (.ecore) Gen Model (.genmodel) Import …
Java Parser • JDT (Java DevelopmentTooling) parserprovides APIs to manipulate Java source code • Tree Structure based API : AST (Abstract SyntaxTree) • Use an AST parser • Visit a specificelement Exemple : method invocation, Type, function, class … The AST representationdefines an API to modify, create, read and delete source code. • Example publicbooleanvisit(MethodInvocationmethod){ if(method.getName().getIdentifier().equals("findViewById")){ Processing1(); } if(method.getName().getIdentifier().equals("setContentView")){ Processing2(); } returntrue; }
XML Parser • DOM (Document Object Model ) parser - Tree Structure based API The Dom parser implements the DOM API and it creates a DOM tree in memory for a XML document • When to use DOM parser • Manipulate the document • Traverse the document back and forth • Small XML files • Drawbacks of DOM parser Consumes lot of memory
XML Parser XML Document Document Object Tree
Model instance and properties check • XML Elements • Java Elements • Using androidElementsFactory in order to create model elements. • Instantiate EMF model with java and XML elements. • Comparison between java and XML elements properties. • Identifier • Type • File • Id • Cast • File
Plugin’s Architecture Java code describing the interface describing the plug-in and its dependencies
Plugin’s Architecture Point Extension Extension Eclipse Platform User Interface Plugin A Workbench JDT Java Development Tools JFace SWT Plugin B PDE Plugin Development Environment Core Workspace Runtime
Creating a Plugin • Create a new plug-in • Create a plug-in project • Define a plugin.xml file: contains a declaration of the plug-in id, name, pre-requisites,... • XML code added to the plugin.xml file • Id: a unique name that will be used to identify the view • name : a translatable name that will be used in the UI for the view • Icon: a relative name of the icon that will be associated with the view • Class: a fully qualified name of the class that implements • Add a View Extension to the plugin.xml file • Define a View Class for the Extension within the Plug-in graphical elements of the interface
Update site Feature a list of plugins and other features which can be understood as a logical separate unit Update Site • Contains all required components for the plugin to funtion. • supports installation over the web via an installation url to avoid a separate download. feature.xml file • maintain the properties • Modify feature name • Add new plugins Plugins directory feature.xml file Features directory update site components
Wiki centralise project information http://projets9androidapps.wiki-site.com/index.php/Accueil SVN Problems List Listing bugs and problems with date of detection, gravity and status • Handle collaborative work on project’s source code Google documents • Requirements • Gantt diagram • Division of labour • Short and frequent meetings • Roadmap • Sprints of 1 to 2 weeks • Objectifs’ evaluation Project Management • Tools • Organizational method
Thankyou Do You Have Any Questions ?