Background :google android SDK platform provide emulator & ADB utility tools,it's very useful to

decompile the apk file to dump byte readable file.

Summary:

if you are ready for it, the sequences as following,

- create/launch emulator from command line

- launch the ADB utility toolfrom command line

- install apk file from local directory from command line

- list all system application apk file from command line

- dexdump selected.dex file from emulator

- pull dump file to local directory

Detail Section:

step 1: create your own emulator if you still not create one and then launch the emulator

launch the windows command line console, then chnage root directory to your android

SDK Platform/tools directory, for me

C:/>cd /d D:/android-sdk-windows/tools

D:/android-sdk-windows/tools>android create -avd -n my_android1.5 -t 2

D:/android-sdk-windows/tools>emulator -avd my_android1.5

step 2: after emulator launched, go to windowns console to start ADB Shell utility tool

make sure your emulator is running before you start ADB. if it's successful

D:/android-sdk-windows/tools>adb shell
# cd /system/app
cd /system/app
# ls
ls
Mms.apk
ApplicationsProvider.apk
GlobalSearch.apk
Calculator.apk
SpareParts.apk
GestureBuilder.apk
Music.apk
SdkSetup.apk
PackageInstaller.apk
Fallback.apk
SettingsProvider.apk
DrmProvider.apk
Development.apk
TelephonyProvider.apk
PinyinIME.apk
HTMLViewer.apk
Settings.apk
NetSpeed.apk

if you want to see how many user applications have beeninstalled on your emulator, just

cd /data/app,and then ls

step 3: install your apk file using adb shell commands, if you still not install your application

on emulator

D:/android-sdk-windows/tools>adb install D:/android-sdk-windows/tools/a.apk

after install successfully, you will see your apk file using above command line

step 4: get the cached dex file from your emulator, we have to enter dalvik VM cache using command

# cd /data/dalvik-cache

# ls

..........

data@app@a.apk@classes.dex

step 5: use dexdump file to generate the dump file then use pull command to copy to local directory

#dexdump -d -f -h data@app@a.apk@classes.dex >> a.apk.dump

finally you will get a bit-readable dump file, based on dalvik class format knowledge, the more you dig

the more you get. normally *.apk file is a .zip file, could be open by any winzip tool.

Reference: SDK platform documentation

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android(安卓)创建与解析XML(二)—— Dom方
  2. Android:Android学习路线图
  3. Android 各种实现Tab效果的实现方式
  4. Android系统移植与调试之------->如何修
  5. Android ART 垃圾回收机制
  6. Android 开发笔记 —— AndroidStudio 中
  7. android的一些开源项目
  8. Android(安卓)开发绕不过的坑:你的 Bitmap
  9. Android(安卓)实现微信聊天一样的布局
  10. 为数不多的人知道的AndroidStudio快捷键(