lnln1111 / android-apktool

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

error while recompiling a apk #286

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Decompile coyote.apk
2.No change in coyote folder
3.Recompile (Error: Exception in thread "main"...)

What is the expected output? What do you see instead?
C:\Documents and Settings\<myname>\Bureau\APKTool>apktool b coy
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Documents and Settings\<my 
name>\Bureau\APKTool\coy\res/values-xlarge
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\DOCUME~1\GNERAU~1.SIT\LOCALS~1\T
emp\APKTOOL2919497202175988327.tmp, -I, C:\Documents and Settings\<My 
name>\apktool\framework\1.apk, -S, C:\Documents and Settings\<My 
name>\Bureau\APKTool\coy\res, -M, C:\Documents and Settings\<my 
name>\Bureau\APKTool\coy\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a: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:182)
        at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\D
OCUME~1\GNERAU~1.SIT\LOCALS~1\Temp\APKTOOL2919497202175988327.tmp, -I, C:\Docume
nts and Settings\<my name>\apktool\framework\1.apk, -S, C:\Documen
ts and Settings\<my name>\Bureau\APKTool\coy\res, -M, C:\Documents
 and Settings\<my name>\Bureau\APKTool\coy\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:83)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
        ... 6 more

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

APKTool 1.4.3 with Windows XP SP3

Please provide any additional information below.

I didn't touch APK file, i have just decompile and recompile. APK in build\apk 
is not built i just have a "classes.dex" file

Thank you in advance

Original issue reported on code.google.com by adresse....@gmail.com on 6 Jan 2012 at 3:30

Attachments:

GoogleCodeExporter commented 9 years ago
I got the same error.
The slash in the resource directory name should be "\" instead of "/".

Original comment by jayxon on 9 Jan 2012 at 2:59

GoogleCodeExporter commented 9 years ago
Hi, thank you very much for your answer. I'm working on Windows XP, how could i 
change / in the directory. Is there a command in MS-DOS? Should i use an other 
OS?
Thank in advance

Original comment by adresse....@gmail.com on 9 Jan 2012 at 7:30

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
According to Issue 277 comment 17, I replaced aapt.exe, and it worked. You can 
have a try.

Original comment by jayxon on 9 Jan 2012 at 11:02

GoogleCodeExporter commented 9 years ago
Thank you very much I just replaced aapt.exe from news version of SDK android 
and it worked! Thank you very much 

Original comment by adresse....@gmail.com on 11 Jan 2012 at 1:12

GoogleCodeExporter commented 9 years ago
As was said, "aapt was out of date"

Original comment by connor.tumbleson on 17 Nov 2012 at 6:45

GoogleCodeExporter commented 9 years ago
help me i have same issue when i compliling
i'm installed java and framework-res.apk
i can decompli file .apk but can't recompli

[QUOTE]
Easy Apk Disassembler by:
   ___  ____  _       _   _
  / _ \|  _ \(_) ___ | \ | |
 | | | | |_) | |/ _ \|  \| |
 | |_| |  _  | | (_) | |\  |
  \___/|_| \_\_|\___/|_| \_|

(0) Apktool Dissasembly
(1) Apktool Assembly AND Sign it
(2) DISASSEMBLY a classes.dex with smali
(3) ASSEMBLY a classes.dex with baksmali
(4) Sign an APK
(5) Convert an Xml Binairy to Xml
(6) Launch CMD
(7) Launch Notepad++
(8) About
(9) EXIT

Please enter the number of your choice: 1
Enter the name of the folder to assembly (ex: dis_Name.apk) : dis_commod.apk
FICHIER
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: D:\documents\ANDROID\tool mod android\easy apk\
dis_commod.apk\res/drawable-xxhdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 9, --target-sdk-version, 18, -F, C:\Users\Finish\AppData\Local\Temp
\APKTOOL2014611683841755200.tmp, -0, arsc, -I, C:\Users\Finish\apktool\framework
\1.apk, -S, D:\documents\ANDROID\tool mod android\easy apk\dis_commod.apk\res, -
M, D:\documents\ANDROID\tool mod android\easy apk\dis_commod.apk\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, 9, --target-sdk-version, 18, -F, C:\
Users\Finish\AppData\Local\Temp\APKTOOL2014611683841755200.tmp, -0, arsc, -I, C:
\Users\Finish\apktool\framework\1.apk, -S, D:\documents\ANDROID\tool mod android
\easy apk\dis_commod.apk\res, -M, D:\documents\ANDROID\tool mod android\easy apk
\dis_commod.apk\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
        ... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 9, --target-sdk-version, 18, -F, C:\Users\Finish\AppData\Local\Temp\A
PKTOOL2014611683841755200.tmp, -0, arsc, -I, C:\Users\Finish\apktool\framework\1
.apk, -S, D:\documents\ANDROID\tool mod android\easy apk\dis_commod.apk\res, -M,
 D:\documents\ANDROID\tool mod android\easy apk\dis_commod.apk\AndroidManifest.x
ml]
        at brut.util.OS.exec(OS.java:89)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
        ... 6 more
java.io.FileNotFoundException: dis_commod.apk\dist\commod.apk (The system cannot
 find the path specified)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at com.android.signapk.SignApk.main(SignApk.java:320)
Press any key to continue . . .[/QUOTE]

Original comment by vina.boy...@gmail.com on 25 Apr 2014 at 5:25