I found a problem while unpacking a apk named by “xxx .apk” --- with the blank space at the end of the apk name. #1145

Closed
zhaoya188 opened this Issue Jan 26, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@zhaoya188

hi, I found a problem while unpacking a apk named by “xxx .apk” --- with the blank space at the end of the apk name. (apktool V2.0.3 on Win7 )

F:\test>apktool.bat d -f "test  .apk"
I: Using Apktool 2.1.0-a64a03-SNAPSHOT on test  .apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.Direc
toryException: java.io.FileNotFoundException: test  \AndroidManifest.xml (系统找
不到指定的路径。)
        at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecode
r.java:142)
        at brut.androlib.res.AndrolibResources.decodeManifestWithResources(Andro
libResources.java:199)
        at brut.androlib.Androlib.decodeManifestWithResources(Androlib.java:142)

        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:100)
        at brut.apktool.Main.cmdDecode(Main.java:165)
        at brut.apktool.Main.main(Main.java:81)
Caused by: brut.directory.DirectoryException: java.io.FileNotFoundException: tes
t  \AndroidManifest.xml (系统找不到指定的路径。)
        at brut.directory.FileDirectory.getFileOutputLocal(FileDirectory.java:64
)
        at brut.directory.AbstractDirectory.getFileOutput(AbstractDirectory.java
:115)
        at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecode
r.java:138)
        ... 5 more
Caused by: java.io.FileNotFoundException: test  \AndroidManifest.xml (系统找不到
指定的路径。)
        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.FileDirectory.getFileOutputLocal(FileDirectory.java:62
)
        ... 7 more

But, It is OK with the param "-o"

F:\test>apktool.bat d -f "test .apk" -o test

so, Apktool do not handle the path correctly ?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Jan 26, 2016

Owner

Can't say I've ever seen a use case with a trailing space in file name. Either way, I see a pull request is already in.

Owner

iBotPeaches commented Jan 26, 2016

Can't say I've ever seen a use case with a trailing space in file name. Either way, I see a pull request is already in.

@iBotPeaches iBotPeaches closed this in #1147 Jan 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment