在android studio中导入反编译的apk源码作为android项目

问题描述

公司没有我分配的项目源代码
以前该项目是在科尔多瓦构建的,我是一名 android studio 人员。

因此,为了获取代码,我安装了 Apk Studio 并提供了所需的二进制文件,如下所示:

enter image description here



我已经成功反编译了 apk,如图:

enter image description here



反编译后得到如下所示的文件夹:

enter image description here



现在,我想在 android studio 中找到这个源。 我尝试按如下方式导入此源:

enter image description here



然后

enter image description here



当我点击完成时,项目被导入但不是作为 android 项目:

enter image description here

如何将其更改为android项目。
最终目标是在android studio获取这个cordova APK的源码作为android项目。
因此,如果您建议使用任何其他反编译技术,也可以这样做。

解决方法

您也可以使用apktool反编译和重新编译APK。使用以下步骤反编译

apktool d <apk>

并编译回来

apktool b <apk>

当您的 APK 被反编译时,它不是确切的源代码形式。你会看到很多 dex 钩子,通常它不是一个 IDE 可以识别和导入的确切 android 项目。您可以使用任何普通编辑器阅读代码并理解进行更改。

下载链接:https://ibotpeaches.github.io/Apktool/