How to decompile Google Android .apk file as readable dump【原创】

简介: How to decompile Google Android .apk file as readable dump【原创】

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 tool from 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 been installed 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

相关文章
|
3天前
|
Android开发
Android Gradle开发—脚本实现自动打包后复制一份APK文件,并修改APK名称,到指定目录作备份
Android Gradle开发—脚本实现自动打包后复制一份APK文件,并修改APK名称,到指定目录作备份
10 0
|
1月前
|
设计模式 缓存 Java
补齐Android技能树——从AGP构建过程到APK打包过程,安卓rxjava面试
补齐Android技能树——从AGP构建过程到APK打包过程,安卓rxjava面试
|
27天前
|
XML 存储 开发工具
Android Studio如何将APK下载
【5月更文挑战第16天】
|
1月前
|
JSON Android开发 数据格式
Android框架-Google官方Gson解析,android开发实验报告总结
Android框架-Google官方Gson解析,android开发实验报告总结
|
1月前
|
XML Dart Java
Flutter插件开发之APK自动安装,字节跳动Android岗面试题
Flutter插件开发之APK自动安装,字节跳动Android岗面试题
|
Java Android开发
安卓apk包反编译
拿到安卓的apk包如何,如何反编译呢。流程如下
400 0
安卓apk包反编译
|
安全 Java Android开发
安卓APK及framework代码反编译过程
本文仅是实验使用,并不支持商业用途! 最近想做一下反编译。
153 0
Android APK反编译就这么简单 详解(附图)
Android APK反编译就这么简单 详解(附图)
1180 0
Android APK反编译就这么简单 详解(附图)
|
XML Java Android开发
9.5.3 Android Apk 反编译 & 9.5.4 Android Apk 加密
首先说一下,何为反编译,简单地说,从源码开始,经过集成开发环境编译以及签名之后得到apk文件的这个过程,我们称之为“编译”;“反编译”的话,顾名思义,粗略地说就是与“编译”相反的过程咯,也就是从apk文件开始,经过一系列工具解压最后得到源码的过程。
1000 0
|
Android开发 数据安全/隐私保护 Java

热门文章

最新文章