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: aux.xml #21

Closed
niklashigi opened this issue Aug 6, 2020 · 4 comments
Closed
Labels
windows Issues specific to Windows wontfix This will not be worked on

Comments

@niklashigi
Copy link
Owner

@FahmiRR is getting the following error (issue split off from this comment):


  ╭ apk-mitm v0.8.0
  ├ apktool v2.4.1
  ╰ uber-apk-signer v1.1.0

  Using temporary directory:
  C:\Users\FAHMI~1.RIZ\AppData\Local\Temp\831d017b5c621c8337f5b653ea760fc1

  √ Downloading tools
  × Decoding APK file
    → I: Copying unknown files...
    Modifying app manifest
    Modifying network security config
    Disabling certificate pinning
    Encoding patched APK file
    Signing patched APK file

   Failed!  An error occurred:

I: Using Apktool 2.4.1 on gojek.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\FAHMI~1.RIZ\AppData\Local\Temp\831d017b5c621c8337f5b653ea760fc1\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
[ --- 38 more lines like this --- ]
I: Baksmaling classes40.dex...
I: Copying assets and libs...
I: Copying unknown files...
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: Error copying file: aux.xml
        at brut.androlib.Androlib.decodeUnknownFiles(Androlib.java:214)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:180)
        at brut.apktool.Main.cmdDecode(Main.java:170)
        at brut.apktool.Main.main(Main.java:76)
Caused by: brut.directory.DirectoryException: Error copying file: aux.xml
        at brut.directory.DirUtil.copyToDir(DirUtil.java:91)
        at brut.directory.AbstractDirectory.copyToDir(AbstractDirectory.java:208)
        at brut.androlib.Androlib.decodeUnknownFiles(Androlib.java:207)
        ... 3 more
Caused by: java.io.FileNotFoundException: C:\Users\FAHMI~1.RIZ\AppData\Local\Temp\831d017b5c621c8337f5b653ea760fc1\decode\unknown\aux (The system cannot find the file specified)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at brut.directory.DirUtil.copyToDir(DirUtil.java:87)
        ... 5 more
@niklashigi niklashigi mentioned this issue Aug 6, 2020
@FahmiRR
Copy link

FahmiRR commented Aug 6, 2020

Thanks for starting new issue

So is there anyway to overcome this one?

@niklashigi
Copy link
Owner Author

niklashigi commented Aug 6, 2020

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: Error copying file: aux.xml

This error occurs because one of the files in the APK is called aux and that's one of the reserved device names in DOS (and now Windows). In other words: It's impossible to name a file aux (or any other reserved name) on a Windows system, it just doesn't work. In order to fix this you could try using another operating system like Linux which doesn't have this annoying limitation.

@FahmiRR
Copy link

FahmiRR commented Aug 24, 2020

Hi, sorry for late reply, already installed linux but facing another issues here #23

@niklashigi
Copy link
Owner Author

I'm closing this issue as there's no real way to fix this apart from not using Windows.

@niklashigi niklashigi added windows Issues specific to Windows wontfix This will not be worked on labels Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Issues specific to Windows wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants