문제

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();
도움이 되었습니까?

해결책

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)

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top