desword / android-apktool

Automatically exported from code.google.com/p/android-apktool
Other
1 stars 0 forks source link

Cannot recompile apk - Building exception aapt #637

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Decompile myapplication.apk 
2. Make few modifications
3. Recompile the application

What is the expected output? What do you see instead?

I: Smaling...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: 
brut.androlib.AndrolibException: brut.common.BrutException: could not exec 
command: [aapt, p, --min-sdk-version, 8, -F, 
/tmp/APKTOOL4790937180796466601.tmp, -0, arsc, -I, 
/homez.547/happybar/apktool/framework/1.apk, -S, 
/homez.547/happybar/www/applis/6/87/apktemplatetemp/res, -M, 
/homez.547/happybar/www/applis/6/87/apktemplatetemp/AndroidManifest.xml]
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
        at brut.androlib.Androlib.buildResources(Androlib.java:283)
        at brut.androlib.Androlib.build(Androlib.java:206)
        at brut.androlib.Androlib.build(Androlib.java:176)
        at brut.apktool.Main.cmdBuild(Main.java:228)
        at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could 
not exec command: [aapt, p, --min-sdk-version, 8, -F, 
/tmp/APKTOOL4790937180796466601.tmp, -0, arsc, -I, 
/homez.547/happybar/apktool/framework/1.apk, -S, 
/homez.547/happybar/www/applis/6/87/apktemplatetemp/res, -M, 
/homez.547/happybar/www/applis/6/87/apktemplatetemp/AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
        ... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, 
--min-sdk-version, 8, -F, /tmp/APKTOOL4790937180796466601.tmp, -0, arsc, -I, 
/homez.547/happybar/apktool/framework/1.apk, -S, 
/homez.547/happybar/www/applis/6/87/apktemplatetemp/res, -M, 
/homez.547/happybar/www/applis/6/87/apktemplatetemp/AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:89)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
        ... 6 more

What version of the product are you using? On what operating system?

I'm using apktool 1.5.2 for linux.

Linux 3.10.23-grsec-mutu-grs-64+ x86_64 GNU/Linux

Please provide any additional information below.

I don't have root access so i will not able to install apktool in 
/usr/local/bin/, i did it in an other directory.

decompilation works fine, recompilation don't..

Original issue reported on code.google.com by quentin....@gmail.com on 25 May 2014 at 4:15

GoogleCodeExporter commented 9 years ago
Do you have the application? There is nothing in the log that points to 
anything.

Original comment by connor.tumbleson on 25 May 2014 at 4:22

GoogleCodeExporter commented 9 years ago
Hi,

I tried with a few applications and it did work with none of them.

I used this command :

./apktool build -f myapplication myapplication2.apk

then the log above appeared to me.

Just for you to know, i'm not familiar with linux. So i first tried on windows 
and it perfectly worked.
But i would need to make it work on linux.

So i first downloaded the apktool package for linux, then i installed on my 
linux in a directory (/repository?) to which i have access. Then i modified the 
rights (chmod 777)

happybar ~/www/applis/tools/apktool1.5.2$ ls -l
-rwxrwxrwx  1 happybar users  854016 25 mai   18:27 aapt.exe
-rwxrwxrwx  1 happybar users    2320 26 mars  20:54 apktool
-rw-rw-rw-+ 1 happybar users 2655843 26 mars  22:25 apktool.jar

After getting to that point, i obtained the same configuration on my linux that 
on my windows.

But i got the error above.

Does it help you in understanding where the problem is ?

Thx a lot in advance

Original comment by quentin....@gmail.com on 25 May 2014 at 5:38

GoogleCodeExporter commented 9 years ago
1.5.2 is like 18 months old now.

http://connortumbleson.com/apktool/test_versions/apktool_2.0.0rc1.jar

Use this, no aapt is required. This isn't a bug, but support so im closing it.

Original comment by connor.tumbleson on 25 May 2014 at 5:41

GoogleCodeExporter commented 9 years ago
Ok, i'm going to try with this version.
However, thx for your help.

Original comment by quentin....@gmail.com on 25 May 2014 at 8:17