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.

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运行出现NDK at /Library/Android/sdk/ndk-bundle did not have a source.properties file
解决Android运行出现NDK at /Library/Android/sdk/ndk-bundle did not have a source.properties file
164 4
解决Android运行出现NDK at /Library/Android/sdk/ndk-bundle did not have a source.properties file
|
3月前
|
Java Android开发 Windows
使用keytool查看Android APK签名
本文介绍了如何使用Windows命令行工具和keytool查看APK的签名信息,并提供了使用AOSP环境中的signapk.jar工具对APK进行系统签名的方法。
306 0
使用keytool查看Android APK签名
|
3月前
|
Android开发
将AAB(Android App Bundle)转换为APK
将AAB(Android App Bundle)转换为APK
227 1
|
3月前
|
开发工具 Android开发
上架Google Play报错:For new apps, Android App Bundles must be signed with an RSA key.
上架Google Play报错:For new apps, Android App Bundles must be signed with an RSA key.
108 1
|
3月前
|
Android开发 开发者
Android、Flutter为不同的CPU架构包打包APK(v7a、v8a、x86)
Android、Flutter为不同的CPU架构包打包APK(v7a、v8a、x86)
220 1
|
3月前
|
Android开发
解决android apk安装后出现2个相同的应用图标
解决android apk安装后出现2个相同的应用图标
313 2
|
4月前
|
存储 数据库 Android开发
🔥Android Jetpack全解析!拥抱Google官方库,让你的开发之旅更加顺畅无阻!🚀
【7月更文挑战第28天】在Android开发中追求高效稳定的路径?Android Jetpack作为Google官方库集合,是你的理想选择。它包含多个独立又协同工作的库,覆盖UI到安全性等多个领域,旨在减少样板代码,提高开发效率与应用质量。Jetpack核心组件如LiveData、ViewModel、Room等简化了数据绑定、状态保存及数据库操作。引入Jetpack只需在`build.gradle`中添加依赖。例如,使用Room进行数据库操作变得异常简单,从定义实体到实现CRUD操作,一切尽在掌握之中。拥抱Jetpack,提升开发效率,构建高质量应用!
66 4
|
3月前
|
安全 Java Android开发
Android 14适配Google play截止时间临近,适配注意点和经验
本文介绍了Android 14带来的关键更新,包括性能优化、定制化体验、多语言支持、多媒体与图形增强等功能。此外,还强调了适配时的重要事项,如targetSdkVersion升级、前台服务类型声明、蓝牙权限变更等,以及安全性与用户体验方面的改进。开发者需按官方指南更新应用,以充分利用新特性并确保兼容性和安全性。
255 0
|
4月前
AndroidStudio 3.1 The APK file app-debug.apk does not exist on disk.
AndroidStudio 3.1 The APK file app-debug.apk does not exist on disk.
24 0
|
4月前
|
Android开发
【亲测,安卓版】快速将网页网址打包成安卓app,一键将网页打包成app,免安装纯绿色版本,快速将网页网址打包成安卓apk
【亲测,安卓版】快速将网页网址打包成安卓app,一键将网页打包成app,免安装纯绿色版本,快速将网页网址打包成安卓apk
125 0