desword / android-apktool

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

FileSystemNotFoundException when building #626

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  ./apktool d Pound#Test.apk
2.  ./apktool b Pound#Test
3.  Must use an apt that has unknown files/dirs ("Copying unknown files/dir...")

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

This should work fine.  Instead it gets an exception.  The problem seems to be 
that the filename was converted in the unknown files/dir case, so now the '#' 
has been changed to '%23' which causes a path that isn't found.

I: Using Apktool 2.0.0-Beta9 on Pound#Test
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building apk file...
I: Copying unknown files/dir...
Exception in thread "main" java.nio.file.FileSystemNotFoundException: 
/Users/dang/Downloads/apktool2/Pound%23Test/dist/Pound%23Test.apk
        at com.sun.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:120)
        at com.sun.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:117)
        at java.nio.file.FileSystems.newFileSystem(FileSystems.java:322)
        at java.nio.file.FileSystems.newFileSystem(FileSystems.java:272)
        at brut.androlib.Androlib.insertFolder(Androlib.java:599)
        at brut.androlib.Androlib.buildUnknownFiles(Androlib.java:566)
        at brut.androlib.Androlib.build(Androlib.java:294)
        at brut.androlib.Androlib.build(Androlib.java:258)
        at brut.apktool.Main.cmdBuild(Main.java:236)
        at brut.apktool.Main.main(Main.java:88)

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

2.0.0-Beta9 on OSX Mavericks

Please provide any additional information below.

Original issue reported on code.google.com by dan.gul...@gmail.com on 24 Apr 2014 at 11:36

GoogleCodeExporter commented 9 years ago
People using strange characters -_-

Original comment by connor.tumbleson on 25 Apr 2014 at 3:12

GoogleCodeExporter commented 9 years ago
Okay, I fixed using Paths instead of URIs

The only reason we moved to URIs though was to fix some Chinese problems. 
Pushing them to patches to confirm before committing. 

Original comment by connor.tumbleson on 30 Apr 2014 at 2:02

GoogleCodeExporter commented 9 years ago
Guess I forgot to attach the patch.

Original comment by connor.tumbleson on 1 May 2014 at 12:42

Attachments:

GoogleCodeExporter commented 9 years ago
https://github.com/iBotPeaches/Apktool/commit/a031787eced0bc6b17ef8bd98d0b0cc7b7
55b0a9

Original comment by connor.tumbleson on 3 May 2014 at 12:44