Failed on special apk with Chinese name. #716

Closed
iBotPeaches opened this Issue Mar 18, 2015 · 8 comments

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 606 created by yoyokko on 2014-02-20T10:50:53.000Z:

What steps will reproduce the problem?

  1. apktool d -r -o outpack 印象笔记.apk
  2. apktool d -o outpack 印象笔记.apk
  3. cd outpack && apktool b .

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

  1. expected apktool.yml with unknown files, but nothing instead
  2. expected apktool.yml with unknown files, Good
  3. expected a apk file with unknown files, but a excaption:Exception in thread "main" java.nio.file.FileSystemNotFoundException: ./dist/%E5%8D%B0%E8%B1%A1%E7%AC%94%E8%AE%B0.apk

What version of the product are you using? On what operating system?
2.0beta9, Mac OS X 10.9

Please provide any additional information below.
apk file located http://pan.baidu.com/s/1kTFjrQB

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by connor.tumbleson on 2014-02-20T14:16:43.000Z:

I don't have Mac OS X.
I can't duplicate on Windows or Ubuntu.

Could you please provide a full stack-trace of the error?

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by connor.tumbleson on 2014-02-20T14:16:43.000Z:

I don't have Mac OS X.
I can't duplicate on Windows or Ubuntu.

Could you please provide a full stack-trace of the error?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by yoyokko on 2014-02-21T01:11:07.000Z:

Here u are

I: Using Apktool 2.0.0-Beta9 on .
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs...
I: Building apk file...
I: Copying unknown files/dir...
Exception in thread "main" java.nio.file.FileSystemNotFoundException: /Volumes/Data/APK/everpack/./dist/%E5%8D%B0%E8%B1%A1%E7%AC%94%E8%AE%B0.apk
at com.sun.nio.zipfs.ZipFileSystem.(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)

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by yoyokko on 2014-02-21T01:11:07.000Z:

Here u are

I: Using Apktool 2.0.0-Beta9 on .
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs...
I: Building apk file...
I: Copying unknown files/dir...
Exception in thread "main" java.nio.file.FileSystemNotFoundException: /Volumes/Data/APK/everpack/./dist/%E5%8D%B0%E8%B1%A1%E7%AC%94%E8%AE%B0.apk
at com.sun.nio.zipfs.ZipFileSystem.(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)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by yoyokko on 2014-02-21T06:17:59.000Z:

seems that the exception was fixed in 2.0.0-65b1880SNAPSHOT

I: Using Apktool 2.0.0-65b188-SNAPSHOT on everpack
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs...
I: Building apk file...
I: Copying unknown files/dir...
Cleaning up unclosed ZipFile for archive /var/folders/8_/ccjjst6x1k5gwhmhr16pww7w0000gn/T/APKTOOL5025587084431922226.tmp

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by yoyokko on 2014-02-21T06:17:59.000Z:

seems that the exception was fixed in 2.0.0-65b1880SNAPSHOT

I: Using Apktool 2.0.0-65b188-SNAPSHOT on everpack
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs...
I: Building apk file...
I: Copying unknown files/dir...
Cleaning up unclosed ZipFile for archive /var/folders/8_/ccjjst6x1k5gwhmhr16pww7w0000gn/T/APKTOOL5025587084431922226.tmp

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by yoyokko on 2014-02-21T06:20:06.000Z:

but with command apktool d -r -o outpack 印象笔记.apk
there is still no unknow files in apktool.yml

contents of apktool.ymal

version: 2.0.0-65b188-SNAPSHOT
apkFileName: 印象笔记.apk

log of command:
I: Using Apktool 2.0.0-65b188-SNAPSHOT on 印象笔记.apk
I: Loading resource table...
I: Loading resource table...
I: Copying raw resources...
I: Baksmaling...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

Owner

iBotPeaches commented Mar 18, 2015

Comment #4 originally posted by yoyokko on 2014-02-21T06:20:06.000Z:

but with command apktool d -r -o outpack 印象笔记.apk
there is still no unknow files in apktool.yml

contents of apktool.ymal

version: 2.0.0-65b188-SNAPSHOT
apkFileName: 印象笔记.apk

log of command:
I: Using Apktool 2.0.0-65b188-SNAPSHOT on 印象笔记.apk
I: Loading resource table...
I: Loading resource table...
I: Copying raw resources...
I: Baksmaling...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #5 originally posted by yoyokko on 2014-02-21T06:39:48.000Z:

in brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkDecoder.java @ line270

if (mDecodeResources != DECODE_RESOURCES_NONE ........)

if specified -r option, mDecodeResources = DECODE_RESOURCES_NONE, the putUnknownFile(meta) doesn't executed
I move putUnknownFile(meta) out of the if section, compile and build the apk correctly.

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by yoyokko on 2014-02-21T06:39:48.000Z:

in brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkDecoder.java @ line270

if (mDecodeResources != DECODE_RESOURCES_NONE ........)

if specified -r option, mDecodeResources = DECODE_RESOURCES_NONE, the putUnknownFile(meta) doesn't executed
I move putUnknownFile(meta) out of the if section, compile and build the apk correctly.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #6 originally posted by connor.tumbleson on 2014-02-21T12:43:27.000Z:

This commit must have fixed it: f85dc47

I will fix the other problem shortly.

Owner

iBotPeaches commented Mar 18, 2015

Comment #6 originally posted by connor.tumbleson on 2014-02-21T12:43:27.000Z:

This commit must have fixed it: f85dc47

I will fix the other problem shortly.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #7 originally posted by connor.tumbleson on 2014-02-22T20:00:07.000Z:

0736aac

Owner

iBotPeaches commented Mar 18, 2015

Comment #7 originally posted by connor.tumbleson on 2014-02-22T20:00:07.000Z:

0736aac

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #8 originally posted by umaresuresh on 2014-04-23T18:43:25.000Z:

I have also facing similar problem. I read your commit on above both link. But I do not found the path and file you mentioned in above link. I am using apktool 4.4(android). Please clarify properly. Thank you.

Owner

iBotPeaches commented Mar 18, 2015

Comment #8 originally posted by umaresuresh on 2014-04-23T18:43:25.000Z:

I have also facing similar problem. I read your commit on above both link. But I do not found the path and file you mentioned in above link. I am using apktool 4.4(android). Please clarify properly. Thank you.

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