How can I solve the brut.androlib.AndrolibException problem

I get the following exception after decoding apk in debug mode and trying to create a new apk in debug mode. I am confused, and I have nothing to do. when I try to do the following, I get exactly the same result.

$java -jar ./apktool.jar d -d meet.apk out $java -jar ./apktool.jar b -d out meet.apk 

or

 $./apktool d -d meet.apk out $./apktool b -d out meet.apk 

I get the following output

 I: Checking whether sources has changed... I: Smaling... I: Checking whether resources has changed... I: Building resources... Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL4160944918573250929.tmp, -I, /root/apktool/framework/1.apk, -S, /home/lab2alex/Documents/out/res, -M, /home/lab2alex/Documents/out/AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301) at brut.androlib.Androlib.buildResources(Androlib.java:248) at brut.androlib.Androlib.build(Androlib.java:171) at brut.androlib.Androlib.build(Androlib.java:154) at brut.apktool.Main.cmdBuild(Main.java:174) at brut.apktool.Main.main(Main.java:59) Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL4160944918573250929.tmp, -I, /root/apktool/framework/1.apk, -S, /home/lab2alex/Documents/out/res, -M, /home/lab2alex/Documents/out/AndroidManifest.xml] at brut.util.OS.exec(OS.java:87) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191) ... 6 more Caused by: java.io.IOException: Cannot run program "aapt": java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:488) at java.lang.Runtime.exec(Runtime.java:610) at java.lang.Runtime.exec(Runtime.java:483) at brut.util.OS.exec(OS.java:78) ... 7 more Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(UNIXProcess.java:164) at java.lang.ProcessImpl.start(ProcessImpl.java:81) at java.lang.ProcessBuilder.start(ProcessBuilder.java:470) ... 10 more 

what should I do

+6
source share
3 answers

If you are using v1 and are now upgraded to v2, try manually deleting the framework file.

In windows 8, it is usually located in C:\Users\YourName\apktool\framework\1.apk .

The file must be restored after trying to create something.

+1
source

It was first check that you are using the latest version of aapt. The second check that you are using the latest version of apktool, this beta version is completely perfect http://connortumbleson.com/2013/10/apktool-2-0-0-beta-7-released/ The third check that you are using the correct version java. Fourth, and perhaps the solution to your problem on some Distros Linux you will need these libraries: Glibc Zlib libstdc ++ 47

FIVE ALWAYS put the -frame path and set it for something where you have the correct resolution.

0
source

Try using the latest apktool. Sometimes opening a command line with running as administrator can do the job. But later I got stuck with this code

 protected void onCreate(android.os.Bundle paramBundle) { // Byte code: // 0: iconst_0 // 1: istore_2 // 2: aload_0 // 3: aload_1 // 4: invokespecial 755 ****/***/***/c:onCreate (Landroid/os/Bundle;)V // 7: aload_0 // 8: invokevirtual 759 ****/***/***/:getApplicationContext ()Landroid/content/Context; // 11: invokestatic 764 com/facebook/accountkit/AccountKit:initialize (Landroid/content/Context;)V // 14: invokestatic 201 ****/***/***/e:a ()****/***/***/e; // 17: invokevirtual 766 ****/***/***/e:b ()I // 20: istore 14 // 22: iload 14 // 24: ifle +13 -> 37 // 27: iload 14 .............. } 

***/***/** is a path to a package that can reveal what I'm trying to decode :)

0
source

Source: https://habr.com/ru/post/951242/


All Articles