Commits

congzheng committed c079b11

Almost every feature has been finished! 2011.08.22.

Comments (0)

Files changed (48)

  
 import androguard, analysis, androlyze
 import bytecode
+from dvm import *
 
 class APK:
     filename = None
     def __init__(self, filename):
         self.filename = filename
         self.apk = androlyze.APK(filename)
-    
+
     def isVaildAPK(self):
         return self.apk.is_valid_APK()
     

APKInfo.pyc

Binary file modified.
 import os
 import sys
+import Global
 
 from startQT import SYSPATH
 
-class APKtool:
-    
-    # succesFlag == 1: It calls the apktool to decompile the apk to smali codes successfully
-    successFlag = None
+
+# use the apktool to get the smali codes and AndroidManifest.xml
+# return 1: success ; return 0: fail
+def callAPKtool(filename):
+    outputPath = SYSPATH + "/temp/ApktoolOutput"
+    cmd = "apktool d -d -f " + filename + " " + outputPath
+    if os.system(cmd) !=0:
+        return  0
+    else:
+        return  1
+
+
+class APKtool:    
     firstFlag = None
     lastClassName = None
     
-    
-    
-    def __init__(self, filename):
-        self.successFlag = 0
+    def __init__(self):
+        self.successFlag = Global.FLAG_APKTOOL
         self.firstFlag = 0
         self.lastClassName = ""
-        self.callAPKtool(filename)
-        
-    
-    # use the apktool to get the smali codes and AndroidManifest.xml
-    # return 1: success ; return 0: fail
-    def callAPKtool(self, filename):
-        outputPath = SYSPATH + "/temp/ApktoolOutput"
-        cmd = "apktool d -d " + filename + " " + outputPath
-        if os.system(cmd) !=0:
-            self.successFlag = 0
-        else:
-            self.successFlag = 1
-
 
     def getManifest(self):
         if self.successFlag == 0:
             return [0, ""]
         
         className = className[1:-1] + ".java"
-        # the first time to call method "getSmaliCode"
+        
+        # this is the first time to call method "getSmaliCode"
         if self.firstFlag == 0:
             self.firstFlag ==1
             self.lastClassName = className

APKtool.pyc

Binary file modified.
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE Project SYSTEM "Project-4.6.dtd">
 <!-- eric4 project file for project AndroidGui -->
-<!-- Saved: 2011-08-18, 18:21:23 -->
+<!-- Saved: 2011-08-22, 01:17:28 -->
 <!-- Copyright (C) 2011 ,  -->
 <Project version="4.6">
   <Language></Language>
   <Author></Author>
   <Email></Email>
   <Sources>
-    <Source>Ui_MainWindow.py</Source>
     <Source>startQT.py</Source>
     <Source>APKInfo.py</Source>
     <Source>GetMethods.py</Source>
     <Source>Graph.py</Source>
     <Source>xdotParser.py</Source>
     <Source>InputDialog.py</Source>
-    <Source>Ui_InputDialog.py</Source>
     <Source>newMessageBox.py</Source>
     <Source>CodeEditor.py</Source>
     <Source>SyntaxHighter.py</Source>
     <Source>SearchFilter.py</Source>
     <Source>RenamingDialog.py</Source>
-    <Source>Ui_RenamingDialog.py</Source>
-    <Source>Ui_FindDialog.py</Source>
     <Source>FindDialog.py</Source>
     <Source>Global.py</Source>
     <Source>CallInOut.py</Source>
-    <Source>Ui_CallInOutDialog.py</Source>
     <Source>CallInOutDialog.py</Source>
     <Source>JAD.py</Source>
     <Source>APKtool.py</Source>
+    <Source>ConfigurationDialog.py</Source>
+    <Source>MyThread.py</Source>
+    <Source>ProgressDialog.py</Source>
+    <Source>UI/Ui_RenamingDialog.py</Source>
+    <Source>UI/Ui_InputDialog.py</Source>
+    <Source>UI/Ui_FindDialog.py</Source>
+    <Source>UI/Ui_CallInOutDialog.py</Source>
+    <Source>UI/Ui_ConfigurationDialog.py</Source>
+    <Source>UI/Ui_MainWindow.py</Source>
   </Sources>
   <Forms>
-    <Form>MainWindow.ui</Form>
-    <Form>InputDialog.ui</Form>
-    <Form>RenamingDialog.ui</Form>
-    <Form>FindDialog.ui</Form>
-    <Form>CallInOutDialog.ui</Form>
+    <Form>UI/RenamingDialog.ui</Form>
+    <Form>UI/InputDialog.ui</Form>
+    <Form>UI/FindDialog.ui</Form>
+    <Form>UI/CallInOutDialog.ui</Form>
+    <Form>UI/ConfigurationDialog.ui</Form>
+    <Form>UI/MainWindow.ui</Form>
   </Forms>
   <Translations>
   </Translations>
 import copy
 import sys
 
-class CallInOut:
-    # the global dict
-    # idDir:{id ---> method}
-    # idDir2:{method ---> id}
-    # invokeDir:{the invoked method id---> the invoking method id}
-    # invokeDir2:{the invoking method id---> the invoked method id}
-    idDir={}
-    idDir2={}
-    invokeDir={}
-    invokeDir2 = {}
+
+class CallInOut:    
+    invokeDir={}        # invokeDir:{the invoked method ---> the invoking method}
+    invokeDir2 = {}     # invokeDir2:{the invoking method ---> the invoked method}
 
     def __init__(self, methodInvokeList):
         self.preprocess(methodInvokeList)
     
-
-    # This function is to pre-process the invoke relations.
-    # I just want to add indexes for querying fastly.
     def preprocess(self, methodInvokeList):
+        """
+            This function is to pre-process the invoke relations.
+            @param methodInvokeList: the list of method ---> method
+        """
         pattern="(.*) ---> (.*)"
-        id=0
-        ID0=0
-        ID1=0
     
         for line in methodInvokeList:
             li=re.search(pattern,line).groups()
             # if the recursion exists, the detect loop will not be end
             if li[0] == li[1]:
                 continue		
-        
-            if li[0] not in list(self.idDir.values()):
-                self.idDir[id]=li[0]
-                self.idDir2[li[0]]=id
-                ID0=id
-                id=id+1
+           
+            m0 = li[1].split("^")[0]
+            m1 = li[1].split("^")[1]
+            
+            if m0 not in list(self.invokeDir.keys()):
+                self.invokeDir[m0]=[li[0]+"^" +m1]
             else:
-                ID0=self.idDir2[li[0]]
+                if li[0] not in self.invokeDir[m0]:
+                    self.invokeDir[m0].append(li[0]+"^" +m1)
+
+            if li[0] not in list(self.invokeDir2.keys()):
+                self.invokeDir2[li[0]]=[li[1]]
+            else:
+                if li[1] not in self.invokeDir2[li[0]]:
+                    self.invokeDir2[li[0]].append(li[1])
     
-            if li[1] not in list(self.idDir.values()):
-                self.idDir[id]=li[1]
-                self.idDir2[li[1]]=id
-                ID1=id
-                id=id+1
-            else:
-                ID1=self.idDir2[li[1]]
-            
-            if ID1 not in list(self.invokeDir.keys()):
-                self.invokeDir[ID1]=[ID0]
-            else:
-                if ID0 not in self.invokeDir[ID1]:
-                    self.invokeDir[ID1].append(ID0)
-
-            if ID0 not in list(self.invokeDir2.keys()):
-                self.invokeDir2[ID0]=[ID1]
-            else:
-                if ID1 not in self.invokeDir2[ID0]:
-                    self.invokeDir2[ID0].append(ID1)
-    
-    
-    # This function is to search the "call out" methods
     def searchCallOut(self, method):
+        """
+            This function is to search the "call out" methods
+        """
         callOutIdList = []
-        if method in list(self.idDir.values()):
-            if self.idDir2[method] not in self.invokeDir2.keys():
-                return []
-            else:
-                for i in self.invokeDir2[self.idDir2[method]]:
-                    callOutIdList.append(self.idDir[i])
-        
+        if method not in self.invokeDir2.keys():
+            return []
+        else:
+            callOutIdList = self.invokeDir2[method]        
         return callOutIdList
                 
-                
-                
-    # This function is to search the "call in" methods            
     def searchCallIn(self, method):
+        """
+            This function is to search the "call in" methods
+        """
         callInIdList = []
-        idDirList = list(self.idDir.values())
-        idDir2List = []
-        for m in idDirList:
-            if m.find("^") == -1:
-                continue
-            m0 = m.split("^")[0]
-            m1 = m.split("^")[1]
-
-            if m0 == method:
-                if self.idDir2[m] not in self.invokeDir.keys():
-                    pass
-                else:
-                    for i in self.invokeDir[self.idDir2[m]]:
-                        callInIdList.append(self.idDir[i] + "^" +m1)
+        if method not in self.invokeDir.keys():
+            return []
+        else:
+            callInIdList =  self.invokeDir[method]        
         return callInIdList
-                
-    
-    
-    
-    
-    

CallInOut.pyc

Binary file modified.

CallInOutDialog.py

 from Ui_CallInOutDialog import Ui_CallInOutDialog
 
 class CallInOutDialog(QDialog, Ui_CallInOutDialog):
-    """
-    Class documentation goes here.
-    """
+
     callInFlag = 0
     callOutFlag = 0
     callMethod = None

CallInOutDialog.pyc

Binary file modified.
 
 class CodeEditor(QPlainTextEdit):
     lineNumberArea = None
-    
-    # allLineNumber is the number of rows of dalvik code editor
-    allLineNumber = None
-    
-    # annotation is the content in annotation editor
-    annotation = None
+    allLineNumber = None        # allLineNumber is the number of rows of dalvik code editor
+    annotation = None           # annotation is the content in annotation editor
+
     
     # this is the flag for annotation editor.
     # flag == 0 : it never open/create the annotaion editor
     flag = None
     
     annotationDockWidget = None
-    
-    # firstOpenFlag == 1: the annotation editor has been opened once.
-    firstOpenFlag = None
+    firstOpenFlag = None            # firstOpenFlag == 1: the annotation editor has been opened once.
     
     # this a flag for each opened method.
     # flag == 0: there is no annotation for this method
     # flag == 1: there is a annotation for this method
     methodOpened2AnnotationFlag = None
     
-    # this the annotation content for each opened method
-    method2annotation = None
-    
-    # this is the current method which is being opened and viewed.
-    currentMethod = None
-    
+    method2annotation = None        # this the annotation content for each opened method
+    currentMethod = None            # this is the current method which is being opened and viewed.
     renamingDockWidget = None
     
     # this is a flag for each opened method
     # flag == 1: there is a renaming table for this method
     methodOpened2RenamingFlag = None
     
-    # this is the renaming table for each opened method 
-    method2renaming = None
-    
-    # this is the new codes after renaming
-    method2NewCodes = None
-    
-    # renamingTable is the content in renaming table
-    renamingTable = None
-    
+    method2renaming = None          # this is the renaming table for each opened method 
+    method2NewCodes = None          # this is the new codes after renaming
+    renamingTable = None            # renamingTable is the content in renaming table
+
     # this is the flag for the renaming table.
     # flag == 0 : it never open/create the renaming table
     # flag == 1 : the renaming table has been created.  
     #             After the user click the "Renaming" item firstly, the renaming table is created
     flagRenaming = None   
    
-    # firstRenameFlag == 1: the renaming table editor has been opened once.
-    firstRenameFlag = None
+    firstRenameFlag = None          # firstRenameFlag == 1: the renaming table editor has been opened once.
+    class2annotaion = None          # this the annotation content for each opened class(smali tab)
+
+    # this a flag for each opened class.
+    # flag == 0: there is no annotation for this class
+    # flag == 1: there is a annotation for this class    
+    classOpened2AnnotationFlag = None
+    
+    currentClass = None    # this is the current class which is being opened and viewed.    
+
     
     def __init__(self, parent = None):
         QPlainTextEdit.__init__(self, parent)
         self.flagRenaming = 0
         self.firstRenameFlag = 0
         
+        self.class2annotation = {}
+        self.classOpened2AnnotationFlag = {}
+
         self.lineNumberArea = LineNumberArea(self)
         self.connect(self, SIGNAL("blockCountChanged(int )"), self.updateLineNumberAreaWidth)
         self.connect(self, SIGNAL("updateRequest(QRect, int)"), self.updateLineNumberArea)
         self.highlightCurrentLine()
         
         highlighter = Highlighter(self.document())
-
-    
-
-
-    
+   
     # get the line number area's width
     def lineNumberAreaWidth(self):
         digits = 1
             
     def resizeEvent(self, e):
         QPlainTextEdit.resizeEvent(self, e)
-        
         cr = self.contentsRect()
         self.lineNumberArea.setGeometry(QRect(cr.left(), cr.top(), self.lineNumberAreaWidth(), cr.height()))
 
             bottom = top + self.blockBoundingRect(block).height()
             blockNumber = blockNumber + 1
             
-
-
     # this contextMenuEvent method is to build a mouse menu
     def contextMenuEvent(self, event):
+        import Global
+        mainwindow = Global.MAINWINDOW        
+        index = mainwindow.tabWidget.currentIndex()   
+        
         menu = self.createStandardContextMenu()
         menu.addSeparator()
-        actionGotoCFG = menu.addAction("Goto CFG")
-        actionAnnotation = menu.addAction("Add Annotation")
-        actionRenaming = menu.addAction("Renaming")
-        self.connect(actionGotoCFG, SIGNAL("triggered()"), self.gotoCFG)
-        self.connect(actionAnnotation, SIGNAL("triggered()"), self.addAnnotation)
-        self.connect(actionRenaming, SIGNAL("triggered()"), self.renaming)
+        if index == 1:
+            actionGotoCFG = menu.addAction("Goto CFG")
+            actionRenaming = menu.addAction("Renaming")
+            self.connect(actionGotoCFG, SIGNAL("triggered()"), self.gotoCFG)
+            self.connect(actionRenaming, SIGNAL("triggered()"), self.renaming)
+        if index == 1 or index ==2:
+            actionAnnotation = menu.addAction("Add Annotation")
+            self.connect(actionAnnotation, SIGNAL("triggered()"), self.addAnnotation)
+        if index == 3:
+            actionAnnotationSmali = menu.addAction("Add Annotation")
+            self.connect(actionAnnotationSmali, SIGNAL("triggered()"), self.addAnnotationSmali)
         menu.exec_(event.globalPos())
-    
-
 
     # overload the method for calculating the all line numbers
     def setPlainText(self, plainText):
         self.method2renaming.clear()
         self.method2NewCodes.clear()
         self.flagRenaming = 0
-        self.firstRenameFlag = 0       
+        self.firstRenameFlag = 0     
+      
+        self.class2annotation.clear()
+        self.classOpened2AnnotationFlag.clear()
+        self.currentClass = None
  
-   
     # save the annotation
     def saveAnnotation(self):
         self.method2annotation[self.currentMethod] = self.annotationDockWidget.widget().toPlainText()
-        
+
+    # save the annotation for smali tab
+    def saveAnnotationSmali(self):
+        self.class2annotation[self.currentClass] = self.annotationDockWidget.widget().toPlainText()
+    
+
     # update the annotation in the annotation editor
     def updateAnnotation(self):
         self.annotationDockWidget.widget().setPlainText(self.annotation)
+        
     
     # add an opened method
     def addOpenedMethod(self, method):
             self.method2renaming[method] = self.renamingTable
             
             
+    # add an opened class
+    def addOpenedClass(self, classname):
+        self.currentClass = classname
+        if classname in self.classOpened2AnnotationFlag.keys():
+            return
+        else:
+            # if it creates a class firstly, the flag is set to 0. 
+            # That is to say, there's no annotation for the class when it's create at the first time.
+            self.classOpened2AnnotationFlag[self.currentClass] = 0
+         
+            # set the inital annotation for this class to be used next time.
+            content = ""
+            for i in range(0, self.allLineNumber):
+                content += "\n"
+            self.class2annotation[classname] = content
+            self.annotation = content
+        
 
-
-    # goto the CFG when the user click the GotoCFG
+    # goto the CFG when the user click the Goto CFG
     def gotoCFG(self):
+        import Global
+        if Global.CONFIG["CFG"] == 0:
+            return
+        
         currentCursor = self.textCursor()
         currentCursor.select(QTextCursor.LineUnderCursor)
         text = currentCursor.selectedText()
         # change the string type to hex type
         offset = int(lineOffset, 16)
         
-        import Global
         graph = Global.GRAPH
         tabWidget = Global.TABWIDGET
         for node in graph.nodeList:
          
         # there's no annotation editor now and it will create the editor. 
         if self.flag == 0:
-            index2title = {1:"Annotation--Dalvik", 2:"Annotation--Java", 3:"Annotation--Bytecode"}
-            index2layout = {1:mainwindow.gridLayout_12, 2:mainwindow.gridLayout_13, 3:mainwindow.gridLayout_14}
-            index2widget = {1:mainwindow.plainTextEdit_dalvik, 2:mainwindow.plainTextEdit_java, 3:mainwindow.plainTextEdit_bytecode}
+            index2title = {1:"Annotation--Dalvik", 2:"Annotation--Bytecode"}
+            index2layout = {1:mainwindow.gridLayout_12, 2:mainwindow.gridLayout_13}
+            index2widget = {1:mainwindow.plainTextEdit_dalvik, 2:mainwindow.plainTextEdit_bytecode}
             
             index = mainwindow.tabWidget.currentIndex()
             
+            if index not in index2title.keys():
+                return
+                
             title = index2title[index]
             layout = index2layout[index]
             widget = index2widget[index]        
                 self.annotationDockWidget.widget().moveCursor(QTextCursor.Down, QTextCursor.MoveAnchor)
 
 
+    # open the Annotation view for smali tab, which is implemented by a QDockWidget
+    def addAnnotationSmali(self):
+        import Global
+        mainwindow = Global.MAINWINDOW
+        
+        # set the flag to 1 for the openning class.
+        # the flag ==1 means that the current class has a annotation.
+        if self.currentClass == None:
+            return
+        if self.classOpened2AnnotationFlag[self.currentClass] == 0:
+            self.classOpened2AnnotationFlag[self.currentClass] = 1
+            
+        # get the current line number of the cursor
+        cursorLineNumber = self.textCursor().blockNumber()
+         
+        # there's no annotation editor now and it will create the editor. 
+        if self.flag == 0:
+            title = "Annotation--Smali"
+            layout = mainwindow.gridLayout_14
+            
+            plainTextEdit  = CodeEditor()
+            sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
+            sizePolicy.setHorizontalStretch(0)
+            sizePolicy.setVerticalStretch(0)
+            sizePolicy.setHeightForWidth(plainTextEdit.sizePolicy().hasHeightForWidth())
+            plainTextEdit.setSizePolicy(sizePolicy)
+            plainTextEdit.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
+            plainTextEdit.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
+            plainTextEdit.setLineWrapMode(QPlainTextEdit.NoWrap)
+            plainTextEdit.setCenterOnScroll(False)
+            plainTextEdit.setMinimumHeight(100)
+            plainTextEdit.setMaximumHeight(100)
+            
+            self.annotationDockWidget = QDockWidget(title)
+            self.annotationDockWidget.setFeatures(QDockWidget.DockWidgetClosable)
+            self.annotationDockWidget.setWidget(plainTextEdit)
+            self.annotationDockWidget.setAllowedAreas(Qt.AllDockWidgetAreas)
+            self.annotationDockWidget.setVisible(1)
+            self.annotationDockWidget.setFloating(1)
+            mainwindow.addDockWidget(Qt.BottomDockWidgetArea, self.annotationDockWidget)
+            layout.addWidget(self.annotationDockWidget, 1, 0, 1, 1)
+
+            # update a annotation
+            self.updateAnnotation()
+            
+            # set the curosr
+            for i in range(0, cursorLineNumber):
+                self.annotationDockWidget.widget().moveCursor(QTextCursor.Down, QTextCursor.MoveAnchor)
+            
+            # set the annotation editor's flag to 1 
+            self.flag = 1
+            
+            # It means the annotation editor has been opened once
+            self.firstOpenFlag = 1
+            
+        elif self.flag == 1:
+            if self.firstOpenFlag == 1:
+                self.annotationDockWidget.setVisible(1)
+            elif self.firstOpenFlag == 0:
+                self.annotationDockWidget.setVisible(1)
+                self.annotation = self.class2annotation[self.currentClass]
+                self.updateAnnotation()
+                self.firstOpenFlag = 1
+            self.annotationDockWidget.widget().moveCursor(QTextCursor.Start, QTextCursor.MoveAnchor)
+            # set the curosr
+            for i in range(0, cursorLineNumber):
+                self.annotationDockWidget.widget().moveCursor(QTextCursor.Down, QTextCursor.MoveAnchor)
+
 
     # update the renaming table
     def updateRenamingTable(self):
          
         # there's no renaming table now and it will create the renaming table. 
         if self.flagRenaming == 0:
-            index2title = {1:"RenamingTable--Dalvik", 2:"RenamingTable--Java", 3:"RenamingTable--Bytecode"}
-            index2layout = {1:mainwindow.gridLayout_12, 2:mainwindow.gridLayout_13, 3:mainwindow.gridLayout_14}
+            index2title = {1:"RenamingTable--Dalvik"}
+            index2layout = {1:mainwindow.gridLayout_12}
             
             index = mainwindow.tabWidget.currentIndex()
             
+            if index not in index2title.keys():
+                return
+            
             title = index2title[index]
             layout = index2layout[index]
             
             # set the curosr in renaming table
             self.renamingDockWidget.widget().setCurrentItem(self.renamingDockWidget.widget().item(cursorLineNumber, 0))
 
-        
-        
+
         # pop a dialog to rename the selected string
         selectedText = cursor.selectedText()
         if len(selectedText.split(" ")) != 1 or selectedText == QString(""):

CodeEditor.pyc

Binary file modified.

ConfigurationDialog.py

+# -*- coding: utf-8 -*-
+
+"""
+Module implementing ConfigurationDialog.
+"""
+
+from PyQt4.QtGui import QDialog
+from PyQt4.QtCore import pyqtSignature
+
+from Ui_ConfigurationDialog import Ui_ConfigurationDialog
+
+
+
+class ConfigurationDialog(QDialog, Ui_ConfigurationDialog):
+
+    def __init__(self, parent = None):
+        """
+        Constructor
+        """
+        QDialog.__init__(self, parent)
+        self.setupUi(self)
+        
+        import Global
+        
+        if Global.CONFIG["CFG"] == 1:
+            self.checkBox_cfg.setChecked(1)
+        else:
+            self.checkBox_cfg.setChecked(0)
+            
+        if Global.CONFIG["Dalvik"] == 1:
+            self.checkBox_dalvik.setChecked(1)
+        else:
+            self.checkBox_dalvik.setChecked(0)
+
+        if Global.CONFIG["Java"] == 1:
+            self.checkBox_javacode.setChecked(1)
+        else:
+            self.checkBox_javacode.setChecked(0)
+
+
+        if Global.CONFIG["Bytecode"] == 1:
+            self.checkBox_bytecode.setChecked(1)
+        else:
+            self.checkBox_bytecode.setChecked(0)
+            
+            
+        if Global.CONFIG["Smali"] == 1:
+            self.checkBox_smalicode.setChecked(1)
+        else:
+            self.checkBox_smalicode.setChecked(0)
+
+
+        if Global.CONFIG["CallIn"] == 1:
+            self.checkBox_callin.setChecked(1)
+        else:
+            self.checkBox_callin.setChecked(0)
+ 
+ 
+        if Global.CONFIG["CallOut"] == 1:
+            self.checkBox_callout.setChecked(1)
+        else:
+            self.checkBox_callout.setChecked(0)
+            
+        if Global.CONFIG["Permission"] == 1:
+            self.checkBox_permission.setChecked(1)
+        else:
+            self.checkBox_permission.setChecked(0)
+            
+            
+        if Global.CONFIG["Manifest"] == 1:
+            self.checkBox_manifest.setChecked(1)
+        else:
+            self.checkBox_manifest.setChecked(0)
+    
+    @pyqtSignature("bool")
+    def on_pushButton_ok_clicked(self, checked):
+        """
+        Slot documentation goes here.
+        """
+        import Global
+
+        if self.checkBox_cfg.isChecked():
+            Global.CONFIG["CFG"] = 1
+        else:
+            Global.CONFIG["CFG"] = 0
+            
+        if self.checkBox_dalvik.isChecked():
+            Global.CONFIG["Dalvik"] = 1
+        else:
+            Global.CONFIG["Dalvik"] = 0
+            
+        if self.checkBox_javacode.isChecked():
+            Global.CONFIG["Java"] = 1
+        else:
+            Global.CONFIG["Java"] = 0
+
+        if self.checkBox_bytecode.isChecked():
+            Global.CONFIG["Bytecode"] = 1
+        else:
+            Global.CONFIG["Bytecode"] = 0            
+            
+        if self.checkBox_smalicode.isChecked():
+            Global.CONFIG["Smali"] = 1
+        else:
+            Global.CONFIG["Smali"] = 0
+
+        if self.checkBox_callin.isChecked():
+            Global.CONFIG["CallIn"] = 1
+        else:
+            Global.CONFIG["CallIn"] = 0 
+ 
+        if self.checkBox_callout.isChecked():
+            Global.CONFIG["CallOut"] = 1
+        else:
+            Global.CONFIG["CallOut"] = 0
+            
+        if self.checkBox_permission.isChecked():
+            Global.CONFIG["Permission"] = 1
+        else:
+            Global.CONFIG["Permission"] = 0            
+            
+        if self.checkBox_manifest.isChecked():
+            Global.CONFIG["Manifest"] = 1
+        else:
+            Global.CONFIG["Manifest"] = 0

ConfigurationDialog.pyc

Binary file added.
     apk = None
     vm = None
     vmx = None
-    def __init__(self, apk):
+    
+    def __init__(self, apk, vm, vmx):
         self.apk = apk
-        self.vm = DalvikVMFormat(apk.getDex())
+        self.vm = vm
+        self.vmx = vmx
     
     def get_class(self):
         return self.vm.get_classes()
     #get where a permission is used
     def get_permission(self):
         pathDict = {}
-        self.vmx = analysis.VMAnalysis(self.vm)
         perms_access = self.vmx.tainted_packages.get_permissions([])
         for perm in perms_access:
             pathDict[perm] = self.show_path(perms_access[perm])

GetMethods.pyc

Binary file modified.
 global DALVIKEDIT
 global GRAPH
 global MAINWINDOW
+global CONFIG
+global APK
+global VM
+global VMX
+global FLAG_JAD
+global FLAG_APKTOOL

Global.pyc

Binary file modified.
 from PyQt4.QtCore import *
 import sys
 from Ui_MainWindow import Ui_mainWindow
-
-
-
 from  InputDialog import *
 from Ui_InputDialog import Ui_inputDialog_dalvik
 
 
-
 class GraphicsView(QGraphicsView):
     scene = None
     view = None
 
         # set the drag mode
         self.setDragMode(QGraphicsView.ScrollHandDrag)
-    
+           
     def wheelEvent(self, event):
         factor = 1.41 ** (event.delta()/240.0)
         self.scale(factor, factor)
         inputDialog_dalvik.exec_()
 
     def hoverEnterEvent(self, event):
-        pos = event.pos()
+        scene = self.scene()
+        pos = event.scenePos()
         self.hint = Hint(pos.x(), pos.y(), self.width, self.height, self.myText)
-        scene = self.scene()
+        print self.width, self.height
         scene.addItem(self.hint)
     
     def hoverLeaveEvent(self, event):
         scene = self.scene()
         scene.removeItem(self.hint)
+        del self.hint
     
     def keyPressEvent(self, event):
         # If the user press the space key, the view will change to Dalvik from CFG.
         painter.setFont(QFont("Courier", 5, -1, 0))
         painter.drawText(rect, Qt.AlignLeft | Qt.AlignVCenter, self.text)    
     
+    
+

Graph.pyc

Binary file modified.
     cmd = "rm -rf " + SYSPATH + "/temp/*"
     return os.system(cmd)
 
-
-
 # use the dex2jar to generate the .jar file.
 # Then move .jar file to the "./temp/" dictionary
 # At last, unzip the .jar file to "./temp/" dictionary
         return 0
     
     return 1
-    
-
 
 # unzip the .jar file
 # return 0: success;
     cmd = "unzip -o " + filename + " -d" + SYSPATH + "/temp/unzip"
     return os.system(cmd)
 
-
-
 # decompile the apk to the Javacodes
 # parameter:
 #       filename: the full absolute path of the apk file

JAD.pyc

Binary file modified.
+from PyQt4.QtGui import *
+from PyQt4.QtCore import *
+
+import Global
+import JAD
+import APKtool
+from APKInfo import *
+
+
+class MyThread(QThread):
+    progress = None
+    filename = None
+    
+    def __init__(self,progress, filename):
+        super(MyThread, self).__init__()
+        self.progress = progress
+        self.filename = filename
+        
+    def run(self):
+        Global.APK = APK(self.filename)
+        if not Global.APK.isVaildAPK():
+            self.progress.step = 599900
+        else:
+            Global.VM = DalvikVMFormat(Global.APK.getDex())
+            Global.VMX = analysis.VMAnalysis(Global.VM)
+        
+            if self.progress.step <= 500000:
+                self.progress.step = 500000
+        
+            if Global.CONFIG["Java"] == 1:
+                Global.FLAG_JAD = JAD.decompile(self.filename)
+            if self.progress.step <= 800000:
+                self.progress.step = 800000
+            
+            if Global.CONFIG["Smali"] ==1 or Global.CONFIG["Manifest"] ==1:
+                Global.FLAG_APKTOOL = APKtool.callAPKtool(self.filename)
+            if self.progress.step <= 990000:
+                self.progress.step = 990000
+            

MyThread.pyc

Binary file added.

ProgressDialog.py

+from PyQt4.QtGui import *
+from PyQt4.QtCore import *
+
+
+class ProgressDialog(QProgressDialog):
+    step = 0
+    
+    def __init__(self):
+        super(ProgressDialog, self).__init__()
+        self.setRange(0, 1000000)
+        self.setModal(1)
+        self.setLabelText("Please wait a moment! Don't cancel it!")
+        
+    def run(self):
+        while self.step <= 1000000:
+            self.setValue(self.step)
+            self.step += 1
+             
+    def setStep(self, value):
+        self.step = value
+        

ProgressDialog.pyc

Binary file added.
 	(2) make
 	(3) make install
 
-6. Run this tool:
+6. Install apktool
+	(http://code.google.com/p/android-apktool/)
+
+	# Linux:
+   	(1). Download apktool-install-linux-* file
+   	(2). Download apktool-* file
+   	(3). Unpack both to /usr/local/bin directory (you must have root permissions) 
+
+
+7. Run this tool:
 
 	python startQT.py
 

UI/CallInOutDialog.ui

+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CallInOutDialog</class>
+ <widget class="QDialog" name="CallInOutDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>601</width>
+    <height>332</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Call in/out Dialog</string>
+  </property>
+  <widget class="QLabel" name="label">
+   <property name="geometry">
+    <rect>
+     <x>120</x>
+     <y>20</y>
+     <width>351</width>
+     <height>17</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Please input the method to get the call in/out methods</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_5">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>50</y>
+     <width>531</width>
+     <height>17</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Example:Lcom/dlp/SMSReplicatorSecret/ShadyDB; (Landroid/content/Context;)V,&lt;init&gt;</string>
+   </property>
+  </widget>
+  <widget class="QWidget" name="">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>90</y>
+     <width>551</width>
+     <height>29</height>
+    </rect>
+   </property>
+   <layout class="QHBoxLayout" name="horizontalLayout">
+    <item>
+     <widget class="QLabel" name="label_2">
+      <property name="text">
+       <string>Class Name:  </string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QLineEdit" name="lineEdit_class">
+      <property name="text">
+       <string>Lcom/dlp/SMSReplicatorSecret/ShadyDB;</string>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QWidget" name="">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>140</y>
+     <width>551</width>
+     <height>29</height>
+    </rect>
+   </property>
+   <layout class="QHBoxLayout" name="horizontalLayout_2">
+    <item>
+     <widget class="QLabel" name="label_3">
+      <property name="text">
+       <string>Method Name:</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QLineEdit" name="lineEdit_method">
+      <property name="text">
+       <string>&lt;init&gt;</string>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QWidget" name="">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>190</y>
+     <width>551</width>
+     <height>29</height>
+    </rect>
+   </property>
+   <layout class="QHBoxLayout" name="horizontalLayout_3">
+    <item>
+     <widget class="QLabel" name="label_4">
+      <property name="text">
+       <string>Descriptor:    </string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QLineEdit" name="lineEdit_descriptor">
+      <property name="text">
+       <string>(Landroid/content/Context;)V</string>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QWidget" name="">
+   <property name="geometry">
+    <rect>
+     <x>200</x>
+     <y>240</y>
+     <width>231</width>
+     <height>24</height>
+    </rect>
+   </property>
+   <layout class="QHBoxLayout" name="horizontalLayout_4">
+    <item>
+     <widget class="QCheckBox" name="checkBox_in">
+      <property name="text">
+       <string>Call in</string>
+      </property>
+      <property name="checked">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QCheckBox" name="checkBox_out">
+      <property name="text">
+       <string>Call out</string>
+      </property>
+      <property name="checked">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QWidget" name="">
+   <property name="geometry">
+    <rect>
+     <x>50</x>
+     <y>290</y>
+     <width>461</width>
+     <height>29</height>
+    </rect>
+   </property>
+   <layout class="QHBoxLayout" name="horizontalLayout_5">
+    <item>
+     <widget class="QPushButton" name="pushButton_ok">
+      <property name="maximumSize">
+       <size>
+        <width>85</width>
+        <height>27</height>
+       </size>
+      </property>
+      <property name="text">
+       <string>OK</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QPushButton" name="pushButton_cancel">
+      <property name="maximumSize">
+       <size>
+        <width>85</width>
+        <height>27</height>
+       </size>
+      </property>
+      <property name="text">
+       <string>Cancel</string>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>pushButton_cancel</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>CallInOutDialog</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>409</x>
+     <y>302</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>485</x>
+     <y>288</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>pushButton_ok</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>CallInOutDialog</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>167</x>
+     <y>294</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>78</x>
+     <y>276</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>

UI/ConfigurationDialog.ui

+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ConfigurationDialog</class>
+ <widget class="QDialog" name="ConfigurationDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>422</width>
+    <height>431</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Configuration Dialog</string>
+  </property>
+  <widget class="QWidget" name="layoutWidget">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>370</y>
+     <width>331</width>
+     <height>29</height>
+    </rect>
+   </property>
+   <layout class="QHBoxLayout" name="horizontalLayout">
+    <item>
+     <widget class="QPushButton" name="pushButton_ok">
+      <property name="maximumSize">
+       <size>
+        <width>85</width>
+        <height>27</height>
+       </size>
+      </property>
+      <property name="text">
+       <string>OK</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QPushButton" name="pushButton_cancel">
+      <property name="maximumSize">
+       <size>
+        <width>85</width>
+        <height>27</height>
+       </size>
+      </property>
+      <property name="text">
+       <string>Cancel</string>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QWidget" name="">
+   <property name="geometry">
+    <rect>
+     <x>77</x>
+     <y>31</y>
+     <width>271</width>
+     <height>311</height>
+    </rect>
+   </property>
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="0" column="0">
+     <widget class="QLabel" name="label">
+      <property name="text">
+       <string>CFG</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="1">
+     <widget class="QCheckBox" name="checkBox_cfg">
+      <property name="text">
+       <string>open</string>
+      </property>
+      <property name="checked">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </item>
+    <item row="1" column="0">
+     <widget class="QLabel" name="label_2">
+      <property name="text">
+       <string>Dalvik code</string>
+      </property>
+     </widget>
+    </item>
+    <item row="1" column="1">
+     <widget class="QCheckBox" name="checkBox_dalvik">
+      <property name="text">
+       <string>open</string>
+      </property>
+      <property name="checked">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </item>
+    <item row="2" column="0">
+     <widget class="QLabel" name="label_3">
+      <property name="text">
+       <string>Java code</string>
+      </property>
+     </widget>
+    </item>
+    <item row="2" column="1">
+     <widget class="QCheckBox" name="checkBox_javacode">
+      <property name="text">
+       <string>open</string>
+      </property>
+      <property name="checked">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </item>
+    <item row="3" column="0">
+     <widget class="QLabel" name="label_4">
+      <property name="text">
+       <string>Bytecode</string>
+      </property>
+     </widget>
+    </item>
+    <item row="3" column="1">
+     <widget class="QCheckBox" name="checkBox_bytecode">
+      <property name="text">
+       <string>open</string>
+      </property>
+      <property name="checked">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </item>
+    <item row="4" column="0">
+     <widget class="QLabel" name="label_5">
+      <property name="text">
+       <string>Smali code</string>
+      </property>
+     </widget>
+    </item>
+    <item row="4" column="1">
+     <widget class="QCheckBox" name="checkBox_smalicode">
+      <property name="text">
+       <string>open</string>
+      </property>
+      <property name="checked">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </item>
+    <item row="5" column="0">
+     <widget class="QLabel" name="label_6">
+      <property name="text">
+       <string>Call in</string>
+      </property>
+     </widget>
+    </item>
+    <item row="5" column="1">
+     <widget class="QCheckBox" name="checkBox_callin">
+      <property name="text">
+       <string>open</string>
+      </property>
+      <property name="checked">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </item>
+    <item row="6" column="0">
+     <widget class="QLabel" name="label_9">
+      <property name="text">
+       <string>Call out</string>
+      </property>
+     </widget>
+    </item>
+    <item row="6" column="1">
+     <widget class="QCheckBox" name="checkBox_callout">
+      <property name="text">
+       <string>open</string>
+      </property>
+      <property name="checked">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </item>
+    <item row="7" column="0">
+     <widget class="QLabel" name="label_7">
+      <property name="text">
+       <string>Permission</string>
+      </property>
+     </widget>
+    </item>
+    <item row="7" column="1">
+     <widget class="QCheckBox" name="checkBox_permission">
+      <property name="text">
+       <string>open</string>
+      </property>
+      <property name="checked">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </item>
+    <item row="8" column="0">
+     <widget class="QLabel" name="label_8">
+      <property name="text">
+       <string>Manifest</string>
+      </property>
+     </widget>
+    </item>
+    <item row="8" column="1">
+     <widget class="QCheckBox" name="checkBox_manifest">
+      <property name="text">
+       <string>open</string>
+      </property>
+      <property name="checked">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>pushButton_ok</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>ConfigurationDialog</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>103</x>
+     <y>384</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>45</x>
+     <y>393</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>pushButton_cancel</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>ConfigurationDialog</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>339</x>
+     <y>381</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>373</x>
+     <y>383</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>FindDialog</class>
+ <widget class="QDialog" name="FindDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Find</string>
+  </property>
+  <property name="sizeGripEnabled">
+   <bool>false</bool>
+  </property>
+  <property name="modal">
+   <bool>false</bool>
+  </property>
+  <widget class="QLabel" name="label">
+   <property name="geometry">
+    <rect>
+     <x>30</x>
+     <y>30</y>
+     <width>64</width>
+     <height>17</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Search for</string>
+   </property>
+  </widget>
+  <widget class="QCheckBox" name="checkBox_1">
+   <property name="geometry">
+    <rect>
+     <x>30</x>
+     <y>100</y>
+     <width>94</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Match case</string>
+   </property>
+  </widget>
+  <widget class="QCheckBox" name="checkBox_2">
+   <property name="geometry">
+    <rect>
+     <x>30</x>
+     <y>130</y>
+     <width>169</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Match entire word only</string>
+   </property>
+  </widget>
+  <widget class="QCheckBox" name="checkBox_3">
+   <property name="geometry">
+    <rect>
+     <x>30</x>
+     <y>160</y>
+     <width>134</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Search backwards</string>
+   </property>
+   <property name="checked">
+    <bool>false</bool>
+   </property>
+  </widget>
+  <widget class="QCheckBox" name="checkBox_4">
+   <property name="geometry">
+    <rect>
+     <x>30</x>
+     <y>190</y>
+     <width>106</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Wrap around</string>
+   </property>
+   <property name="checked">
+    <bool>true</bool>
+   </property>
+   <property name="tristate">
+    <bool>false</bool>
+   </property>
+  </widget>
+  <widget class="QComboBox" name="comboBox">
+   <property name="geometry">
+    <rect>
+     <x>30</x>
+     <y>50</y>
+     <width>341</width>
+     <height>31</height>
+    </rect>
+   </property>
+   <property name="editable">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="pushButton_close">
+   <property name="geometry">
+    <rect>
+     <x>230</x>
+     <y>240</y>
+     <width>85</width>
+     <height>27</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Close</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="pushButton_find">
+   <property name="geometry">
+    <rect>
+     <x>80</x>
+     <y>240</y>
+     <width>85</width>
+     <height>27</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Find</string>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>pushButton_close</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>FindDialog</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>303</x>
+     <y>257</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>352</x>
+     <y>256</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>

UI/InputDialog.ui

+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>inputDialog_dalvik</class>
+ <widget class="QDialog" name="inputDialog_dalvik">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>612</width>
+    <height>538</height>
+   </rect>
+  </property>
+  <property name="contextMenuPolicy">
+   <enum>Qt::NoContextMenu</enum>
+  </property>
+  <property name="windowTitle">
+   <string>Modify the dalvik code</string>
+  </property>
+  <property name="sizeGripEnabled">
+   <bool>false</bool>
+  </property>
+  <property name="modal">
+   <bool>false</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_2">
+   <item row="0" column="0">
+    <layout class="QGridLayout" name="gridLayout">
+     <item row="0" column="0">
+      <widget class="QPlainTextEdit" name="plainTextEdit_dalvik">
+       <property name="lineWrapMode">
+        <enum>QPlainTextEdit::NoWrap</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0">
+      <layout class="QHBoxLayout" name="horizontalLayout_dalvik">
+       <item>
+        <widget class="QPushButton" name="pushButton_ok_dalvik">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string>OK</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="pushButton_cancel_dalvik">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string>Cancel</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>pushButton_ok_dalvik</sender>
+   <signal>clicked()</signal>
+   <receiver>inputDialog_dalvik</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>188</x>
+     <y>514</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>98</x>
+     <y>514</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>pushButton_cancel_dalvik</sender>
+   <signal>clicked()</signal>
+   <receiver>inputDialog_dalvik</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>455</x>
+     <y>513</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>520</x>
+     <y>509</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>mainWindow</class>
+ <widget class="QMainWindow" name="mainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1052</width>
+    <height>629</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>100</width>
+    <height>100</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>APKinspector</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="../src/images/mainwindow.qrc">
+    <normaloff>:/src/images/logo2.png</normaloff>
+    <normalon>:/src/images/logo2.png</normalon>
+    <activeoff>:/src/images/logo2.png</activeoff>
+    <activeon>:/src/images/logo2.png</activeon>
+    <selectedoff>:/src/images/logo2.png</selectedoff>
+    <selectedon>:/src/images/logo2.png</selectedon>:/src/images/logo2.png</iconset>
+  </property>
+  <property name="locale">
+   <locale language="Chinese" country="China"/>
+  </property>
+  <property name="iconSize">
+   <size>
+    <width>24</width>
+    <height>24</height>
+   </size>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="0" column="0">
+     <widget class="QMdiArea" name="mdiArea">
+      <widget class="QWidget" name="win1">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>720</width>
+         <height>524</height>
+        </size>
+       </property>
+       <property name="windowTitle">
+        <string>MainView</string>
+       </property>
+       <layout class="QGridLayout" name="gridLayout_1">
+        <item row="0" column="0">
+         <widget class="QTabWidget" name="tabWidget">
+          <property name="currentIndex">
+           <number>0</number>
+          </property>
+          <property name="documentMode">
+           <bool>false</bool>
+          </property>
+          <widget class="QWidget" name="tab_cfg">
+           <attribute name="title">
+            <string>CFG</string>
+           </attribute>
+           <layout class="QGridLayout" name="gridLayout_11"/>
+          </widget>
+          <widget class="QWidget" name="tab_dalvik">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <attribute name="title">
+            <string>Dalvik</string>
+           </attribute>
+           <layout class="QGridLayout" name="gridLayout_12"/>
+          </widget>
+          <widget class="QWidget" name="tab_bytecode">
+           <attribute name="title">
+            <string>ByteCode</string>
+           </attribute>
+           <layout class="QGridLayout" name="gridLayout_13"/>
+          </widget>
+          <widget class="QWidget" name="tab_smali">
+           <attribute name="title">
+            <string>Smali</string>
+           </attribute>
+           <layout class="QGridLayout" name="gridLayout_14"/>
+          </widget>
+          <widget class="QWidget" name="tab_java">
+           <attribute name="title">
+            <string>Java</string>
+           </attribute>
+           <layout class="QGridLayout" name="gridLayout_15">
+            <item row="0" column="0">
+             <widget class="QPlainTextEdit" name="plainTextEdit_java"/>
+            </item>
+           </layout>
+          </widget>
+          <widget class="QWidget" name="tab_callinout">
+           <attribute name="title">
+            <string>Call in/out</string>
+           </attribute>
+           <layout class="QGridLayout" name="gridLayout_16">
+            <item row="0" column="0">
+             <widget class="QTextEdit" name="textEdit_call"/>
+            </item>
+           </layout>
+          </widget>
+          <widget class="QWidget" name="tab_permission">
+           <attribute name="title">
+            <string>Permission</string>
+           </attribute>
+           <layout class="QGridLayout" name="gridLayout_17">
+            <item row="0" column="0">
+             <widget class="QTextEdit" name="textEdit_permission"/>
+            </item>
+           </layout>
+          </widget>
+          <widget class="QWidget" name="tab_manifest">
+           <attribute name="title">
+            <string>AndroidManifest.xml</string>
+           </attribute>
+           <layout class="QGridLayout" name="gridLayout_18">
+            <item row="0" column="0">
+             <widget class="QTextBrowser" name="textBrowser"/>
+            </item>
+           </layout>
+          </widget>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="win2">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>298</width>
+         <height>524</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>16777215</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="windowTitle">
+        <string>SideView</string>
+       </property>
+       <layout class="QGridLayout" name="gridLayout_2">
+        <item row="0" column="0">
+         <layout class="QGridLayout" name="gridLayout_21">
+          <item row="1" column="0">
+           <layout class="QGridLayout" name="gridLayout_211">
+            <item row="0" column="0" colspan="2">
+             <widget class="QLineEdit" name="lineEdit">
+              <property name="text">
+               <string>Please input the strings</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="0">
+             <widget class="QRadioButton" name="radioButton_filter">
+              <property name="text">
+               <string>Filter</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1">
+             <widget class="QRadioButton" name="radioButton_search">
+              <property name="text">
+               <string>Search</string>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="0">
+             <widget class="QPushButton" name="pushButton">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="minimumSize">
+               <size>
+                <width>100</width>
+                <height>0</height>
+               </size>
+              </property>
+              <property name="text">
+               <string>OK</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item row="0" column="0">
+           <widget class="QTabWidget" name="tabWidget_2">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="currentIndex">
+             <number>3</number>
+            </property>
+            <widget class="QWidget" name="tab_file">
+             <attribute name="title">
+              <string>Files</string>
+             </attribute>
+             <layout class="QGridLayout" name="gridLayout_2121">
+              <item row="0" column="1">
+               <widget class="QTreeWidget" name="treeWidget_files">
+                <attribute name="headerVisible">
+                 <bool>false</bool>
+                </attribute>
+                <column>
+                 <property name="text">
+                  <string notr="true">1</string>
+                 </property>
+                </column>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+            <widget class="QWidget" name="tab_strings">
+             <attribute name="title">
+              <string>Strings</string>
+             </attribute>
+             <layout class="QGridLayout" name="gridLayout_2122">
+              <item row="0" column="0">
+               <widget class="QListWidget" name="listWidget_strings">
+                <property name="editTriggers">
+                 <set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed</set>
+                </property>
+                <property name="movement">
+                 <enum>QListView::Static</enum>
+                </property>
+                <property name="isWrapping" stdset="0">
+                 <bool>false</bool>
+                </property>
+                <property name="resizeMode">
+                 <enum>QListView::Fixed</enum>
+                </property>
+                <property name="layoutMode">
+                 <enum>QListView::SinglePass</enum>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+            <widget class="QWidget" name="tab_classes">
+             <attribute name="title">
+              <string>Classes</string>
+             </attribute>
+             <layout class="QGridLayout" name="gridLayout_2123">
+              <item row="0" column="0">
+               <widget class="QListWidget" name="listWidget_classes"/>
+              </item>
+             </layout>
+            </widget>
+            <widget class="QWidget" name="tab_methods">
+             <attribute name="title">
+              <string>Methods</string>
+             </attribute>
+             <layout class="QGridLayout" name="gridLayout_2124">
+              <item row="0" column="0">
+               <widget class="QTreeWidget" name="treeWidget_methods">
+                <property name="styleSheet">
+                 <string notr="true"/>
+                </property>
+                <property name="verticalScrollBarPolicy">
+                 <enum>Qt::ScrollBarAsNeeded</enum>
+                </property>
+                <property name="horizontalScrollBarPolicy">
+                 <enum>Qt::ScrollBarAsNeeded</enum>
+                </property>
+                <property name="autoScrollMargin">
+                 <number>16</number>
+                </property>
+                <property name="editTriggers">
+                 <set>QAbstractItemView::CurrentChanged|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
+                </property>
+                <property name="verticalScrollMode">
+                 <enum>QAbstractItemView::ScrollPerPixel</enum>
+                </property>
+                <property name="horizontalScrollMode">
+                 <enum>QAbstractItemView::ScrollPerPixel</enum>
+                </property>
+                <property name="rootIsDecorated">
+                 <bool>true</bool>
+                </property>
+                <property name="uniformRowHeights">
+                 <bool>false</bool>
+                </property>
+                <property name="animated">
+                 <bool>false</bool>
+                </property>
+                <property name="headerHidden">
+                 <bool>true</bool>
+                </property>
+                <attribute name="headerCascadingSectionResizes">
+                 <bool>true</bool>
+                </attribute>
+                <attribute name="headerHighlightSections">
+                 <bool>false</bool>
+                </attribute>
+                <column>
+                 <property name="text">
+                  <string notr="true">1</string>
+                 </property>
+                </column>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+            <widget class="QWidget" name="tab_apkinfo">
+             <attribute name="title">
+              <string>APKInfo</string>
+             </attribute>
+             <layout class="QGridLayout" name="gridLayout_3">
+              <item row="0" column="0">
+               <widget class="QTableWidget" name="tableWidget_apkinfo">
+                <attribute name="horizontalHeaderVisible">
+                 <bool>false</bool>