Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brut.directory.DirectoryException: Error copying file: ? .xml #1314

Closed
ikoutone opened this issue Sep 8, 2016 · 6 comments
Closed

brut.directory.DirectoryException: Error copying file: ? .xml #1314

ikoutone opened this issue Sep 8, 2016 · 6 comments
Labels

Comments

@ikoutone
Copy link

ikoutone commented Sep 8, 2016

Information

  1. Apktool Version (apktool -version) - 2.2.0
  2. Operating System (Mac, Linux, Windows) - Windows 10 64bit
  3. APK From? (Playstore, ROM, Other) - Playstore (App is called Pivo)

Stacktrace/Logcat

D:\Zipit>java -jar apktool.jar d -rf base.apk
I: Using Apktool 2.2.0 on base.apk
I: Copying raw resources...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: Error copying file: ?� .xml
at brut.androlib.Androlib.decodeUnknownFiles(Androlib.java:217)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:158)
at brut.apktool.Main.cmdDecode(Main.java:163)
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:210)
... 3 more
Caused by: java.io.FileNotFoundException: base\unknown?� .xml (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(Unknown Source)
at java.io.FileOutputStream.(Unknown Source)
at java.io.FileOutputStream.(Unknown Source)
at brut.directory.DirUtil.copyToDir(DirUtil.java:84)
... 5 more

Frameworks

If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(.apks that live in /system/framework or /system/priv-app)

APK

If this APK can be freely shared, please upload/attach a link to it.

base.zip

@pjakubczyk
Copy link

Does it happen when you use dexguard ?

@ikoutone
Copy link
Author

Not really sure how to do that, I was just following this article http://bertonjulian.github.io/2015/01/30/root-detection-bypass.html to see if I can bypass the root detection of the Pivo app.

@iBotPeaches
Copy link
Owner

This seems to be a Windows problem with non standard characters. Unix can't even visualize them, but it doesn't crash here.

-rw-rw-r-- 1 ibotpeaches ibotpeaches    420 Sep 18 17:41 ? .xml
-rw-rw-r-- 1 ibotpeaches ibotpeaches    864 Sep 18 17:41 ? .xml
-rw-rw-r-- 1 ibotpeaches ibotpeaches   1376 Sep 18 17:41 ??.xml
-rw-rw-r-- 1 ibotpeaches ibotpeaches    516 Sep 18 17:41 ??.xml

This is Windows problem. I'm not sure if there is any easy fix I have for this, unless I write a hashed file name out and convert back.

@dejanberic
Copy link

So is this fixed or not?
I use 2.2.2 and get the same error.
One way I would go about it is create a mapping between old names and new names so I could use old names when building back apk file.
New names could be generated like: "APK_HEX_FILE{HEX_VALUES_OF_FILENAME_CHARACTERS}"

@burma69
Copy link

burma69 commented Mar 18, 2017

Same error here with 2.2.2 @Windows 10 and Windows 7

I: Copying unknown files...
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: Error copying file: ?.xml
at brut.androlib.Androlib.decodeUnknownFiles(Androlib.java:217)

@maxerbox
Copy link

maxerbox commented Mar 19, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants