如何将Android APK转换为Java和XML文件? [重复]

时间:2023-02-08 21:47:58

This question already has an answer here:

这个问题在这里已有答案:

My friend and I are building an android app for an FBLA State Leadership Conference Competition.

我和我的朋友正在为FBLA国家*大会竞赛建立一个Android应用程序。

We used MockingBot to create a "blueprint" for our app, and planned on using Android Studio to replicate the design & make the app functional.

我们使用MockingBot为我们的应用程序创建“蓝图”,并计划使用Android Studio复制设计并使应用程序正常运行。

We downloaded the Android APK file from MockingBot. Instead of re-making it on Android Studio, is there a way that we can extract the Java & XML Files from the APK, and put them into Android Studio to complete most of the XML work, then tweak it from there?

我们从MockingBot下载了Android APK文件。有没有一种方法可以从APK中提取Java和XML文件,并将它们放入Android Studio以完成大部分XML工作,然后从那里进行调整,而不是在Android Studio上重新制作它?

THANKS

1 个解决方案

#1


1  

You'd normally be able to do something like this with a number of tools. apktool and dex2jar are good, jadx is a great all in one solution too. In this case, it looks like MockingBot uses Cordova to generate your app, meaning there is almost no real Java/Android code to decompile. It is essentially a web wrapper so you can build cross platform apps.

您通常可以使用许多工具执行此类操作。 apktool和dex2jar都不错,jadx也是一款出色的解决方案。在这种情况下,看起来MockingBot使用Cordova生成您的应用程序,这意味着几乎没有真正的Java / Android代码可以反编译。它本质上是一个Web包装器,因此您可以构建跨平台应用程序。

jadx will still allow you to extract everything from the application, but it might not be easy to reconstruct. I would suggest checking out Apache Cordova, or another project that implements it, such as Ionic if you intend on going this route. If you do, I also suggest using an IDE better for web developing. You can still use Android Studio, but vanilla Intellij might make your life a little easier.

jadx仍然允许您从应用程序中提取所有内容,但重建可能并不容易。我建议查看Apache Cordova或其他实现它的项目,如Ionic,如果你打算这条路线。如果您这样做,我还建议您更好地使用IDE进行Web开发。您仍然可以使用Android Studio,但香草Intellij可能会让您的生活更轻松。

Assuming MockingBot didn't use any Cordova plugins, you can simply unzip the APK and use what falls under the assets/www directory to start customizing your app using Cordova.

假设MockingBot没有使用任何Cordova插件,您只需解压缩APK并使用属于assets / www目录的内容开始使用Cordova自定义您的应用程序。

Edit: Because I can't comment without at least 50 points... This actually isn't a duplicate as was already suggested. The question might seem similar, but web wrapped applications are very different from those built using Java and much easier to decompile/reverse. The answer linked in your comments will very likely not help you.

编辑:因为我不能在没有至少50分的情况下发表评论......这实际上并不像已经建议的那样重复。这个问题可能看似相似,但Web包装的应用程序与使用Java构建的应用程序非常不同,并且更容易反编译/反向。您的评论中链接的答案很可能对您没有帮助。

#1


1  

You'd normally be able to do something like this with a number of tools. apktool and dex2jar are good, jadx is a great all in one solution too. In this case, it looks like MockingBot uses Cordova to generate your app, meaning there is almost no real Java/Android code to decompile. It is essentially a web wrapper so you can build cross platform apps.

您通常可以使用许多工具执行此类操作。 apktool和dex2jar都不错,jadx也是一款出色的解决方案。在这种情况下,看起来MockingBot使用Cordova生成您的应用程序,这意味着几乎没有真正的Java / Android代码可以反编译。它本质上是一个Web包装器,因此您可以构建跨平台应用程序。

jadx will still allow you to extract everything from the application, but it might not be easy to reconstruct. I would suggest checking out Apache Cordova, or another project that implements it, such as Ionic if you intend on going this route. If you do, I also suggest using an IDE better for web developing. You can still use Android Studio, but vanilla Intellij might make your life a little easier.

jadx仍然允许您从应用程序中提取所有内容,但重建可能并不容易。我建议查看Apache Cordova或其他实现它的项目,如Ionic,如果你打算这条路线。如果您这样做,我还建议您更好地使用IDE进行Web开发。您仍然可以使用Android Studio,但香草Intellij可能会让您的生活更轻松。

Assuming MockingBot didn't use any Cordova plugins, you can simply unzip the APK and use what falls under the assets/www directory to start customizing your app using Cordova.

假设MockingBot没有使用任何Cordova插件,您只需解压缩APK并使用属于assets / www目录的内容开始使用Cordova自定义您的应用程序。

Edit: Because I can't comment without at least 50 points... This actually isn't a duplicate as was already suggested. The question might seem similar, but web wrapped applications are very different from those built using Java and much easier to decompile/reverse. The answer linked in your comments will very likely not help you.

编辑:因为我不能在没有至少50分的情况下发表评论......这实际上并不像已经建议的那样重复。这个问题可能看似相似,但Web包装的应用程序与使用Java构建的应用程序非常不同,并且更容易反编译/反向。您的评论中链接的答案很可能对您没有帮助。