Android’s Dex Decompiler: Type Inference Part

碩士 === 國立臺灣大學 === 資訊工程學研究所 === 99 === Currently, Android applications are mainly written in Java language. After using javac to compile these Java source files into Java class files, we use Android dx compiler to convert these Java class files to dex files furthermore. Dex file is a kind of register...

Full description

Bibliographic Details
Main Authors: Wei-Yu Hsieh, 謝韋佑
Other Authors: 陳俊良
Format: Others
Language:zh-TW
Published: 2011
Online Access:http://ndltd.ncl.edu.tw/handle/61637654605397700984
Description
Summary:碩士 === 國立臺灣大學 === 資訊工程學研究所 === 99 === Currently, Android applications are mainly written in Java language. After using javac to compile these Java source files into Java class files, we use Android dx compiler to convert these Java class files to dex files furthermore. Dex file is a kind of register-based instruction set and optimized for mobile devices. At present, the binary transformations for dex are not rich, but the binary transformation for Java are developed for many years. Therefore, our main target is joining dex file to Java binary transformations. Dx compiler would not write local variable type information into dex file in codegen step. If we want to join dex file to Java binary transformation family, the main problem is that we need to infer the local variable type. Furthermore, Android system takes a lazy attitude about type. It causes type inference in dex more difficult. In this thesis, we provide and implement a type inferencer which can read dex file, transform it to the intermediate representation, and infer the local variable type. We also successfully decompile program from dex file format to the java file format by our experimentation.