Question

When I try to extract apk file through apktool api, related extract process never finishes. Same code works well for Java projects. But when I use it inside Android application through virtual device, extract process never finishes.

Here is the code that I use:

ApkDecoder decoder = new ApkDecoder();
decoder.setApkFile(apkFile);
decoder.setOutDir(outputPath);
decoder.decode();
Was it helpful?

Solution

As I said on IRC.

It won't work. There are 2 dependencies in Apktool that won't work on Android. Yaml and some java 7 code.

Thats why it works fine on Java, but not in Android environment. Bug for java7 code, and the bug for Yaml.

Yaml is only used for parsing out the apktool.yml file, which is needed for recompile. Java 7 features were introduced for SmaliDebugging and NIO2 aids. If neither are needed, you could recompile the apktool binary without those two. (Of course then missing those features)

OTHER TIPS

It may be useful for you: online version of the apktool is available here: www.javadecompilers.com/apktool

Hope, it would help you to decompile the application without installation of the numerous prerequisites.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top