Disassembling Android Applications
Disassembling Android Applications
Workshop
Passage en Seine III
June 17
th
2011
Pierre Pronchery <[email protected]
Android: about
Seen on http://www.dalvikvm.com/
Android programs are compiled into .dex (Dalvik
Executable) files, wic are in turn !ipped into a
single .apk (Android "ackage) file on te device. .dex
files can be created b# automaticall# translating
compiled applications written in te $ava programming
language%
+n http://en.wikipedia.or&/wiki/Dalvik,virtual,machine :
Dalvik &is' a clean(room implementation rater tan a
development on top of a standard $ava runtime, &and'
does not inerit cop#rigt(based license restrictions
from eiter te standard(edition or open(source(edition
$ava runtimes.%
Dalvik does not align to $ava )E nor $ava *E class
librar# profiles (e.g., $ava *E classes, A+, or )wing
are not supported). -nstead it uses its own librar# built
on a subset of te Apace .armon# $ava
implementation.%
Android: to be or not to be !ava #2
+n http://en.wikipedia.or&/wiki/Dalvik,virtual,machine :
/nlike $ava 0*s, wic are stack macines, te
Dalvik 0* is a register(based arcitecture1
http://www.defora.or&/os/download/download/78/./li'System20.-.9.tar.&:
http://www.defora.or&/os/download/download/78;//cpp20.0.-.tar.&:
http://www.defora.or&/os/download/download/78;8/asm20./.0.tar.&:
Simple as pie hopefully:
$ ake 01!&$234'usr'local4 install
[...]
)may install a conflictin& cpp 'inary< 4ust remove it*
(une -.th /0-- 1SES III 2 /0-- --
$et the code: compilation
$ ake 5ootstrap
[...]
"he source tree is no6 confi*ured for (our
environent. !ssential li5raries and tools 6ill
no6 5e installed in this folder: 7'usr'local7
8ou can still exit this script 6ith the ,"19:,
ke( co5ination.
/ther6ise, press !%"!1 to proceed.
,"19:,
$ ;cd .(ste'src'li5.(ste << ake install=
$ ;cd Apps'+evel'src'cpp << ake install << r #f
'usr'local'cpp=
$ ;cd Apps'+evel'src'as << ake install=
(une -.th /0-- 1SES III 2 /0-- -/
'se the code: disassemble
$ deas
>sa*e: deas [#a arch][#f forat] filenae
deas [#a arch][#f forat] #s strin*
deas #l
$ deas classes.dex
classes.dex: dex#dalvik
+isasse5l( of section .text:
[...]
(une -.th /0-- 1SES III 2 /0-- -7
(odi&# the code: contributing
=hrou&h Defora+S:
Send patches
5ommit directly :=
(une -.th /0-- 1SES III 2 /0-- -;
Android: $oogle did it
Some links to share:
http://mylifewithandroid.'lo&spot.com/
http://paller&a'or.uw.hu/android'lo&/
http://developer.android.com/reference/dalvik/'ytecode/+pcodes.html
http://:easter.'lo&spot.com//00./--/how2to2decompile2de@2file2on2android,/A.html
http://www.dalvikvm.com/
(une -.th /0-- 1SES III 2 /0-- -8
)uggestions