Apktool: brut.directory.DirectoryException: Error copying file: ♂? .xml

Apktool version: 2.0.3 Sample.apk is obfuscated by Dexguard and multidex enabled.

Error output while decompiling (source or resource only doesn’t make any difference)

C:\>apktool d Sample.apk -s
I: Using Apktool 2.0.3 on Sample.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\devrimtu\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying raw classes.dex file...
I: Copying assets and libs...
I: Copying unknown files...
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.Direc
toryException: Error copying file: ♂?   .xml
        at brut.androlib.Androlib.decodeUnknownFiles(Androlib.java:214)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:158)
        at brut.apktool.Main.cmdDecode(Main.java:165)
        at brut.apktool.Main.main(Main.java:81)
Caused by: brut.directory.DirectoryException: Error copying file: ♂?    .xml
        at brut.directory.DirUtil.copyToDir(DirUtil.java:88)
        at brut.directory.AbstractDirectory.copyToDir(AbstractDirectory.java:207
)
        at brut.androlib.Androlib.decodeUnknownFiles(Androlib.java:207)
        ... 3 more
Caused by: java.io.FileNotFoundException: C:\Users\devrimtu\Documents\Programs\A
pkTool\b\unknown\♂?     .xml (The filename, directory name, or volume label synt
ax is incorrect)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at brut.directory.DirUtil.copyToDir(DirUtil.java:84)
        ... 5 more

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 24 (5 by maintainers)

Most upvoted comments

@kirit12 This is not the same issue. You don’t have permission to create the folder app-release. Apktool by default decodes from app-release.apk to app-release folder. You can override this folder by using -o folder.

Hello @iBotPeaches

thanks for the answer. Actually, my computer has no permission to create any folder in C:\windows\ directory. so I just put into the other directory and then now it’s work fine. Thank you again.

I have the same problem but only on Windows system. On Linux works perfect. This file https://drive.google.com/file/d/0B0hFfYwwa3TfR051bXFkVWFsbE0/view?usp=sharing apktool is decoded with no issues on Ubuntu.