apktool 2.0beta7 - copying unknown files/dirs failed when rebuilding

752 views
Skip to first unread message

Tomáš Koloušek

unread,
Jan 22, 2014, 3:52:24 AM1/22/14
to apk...@googlegroups.com
Hi.
I tried to use v2.0 beta to llamalabs timesheet 1.2.7 (fc after update with apktool 1.5.2) . When rebuilding the apk without any changes, I got 'NoSuchFile exception altough the folder is normally presentunder 'unknown' folder of extracted application.

This was on Windows7, I noted the forward slash in the exception. The .apk file was build in dist folder, after manually including content of uknown folder and resigning the apk seems to be working.

Error displayed:

INFO: Copying unknown files/dir...
Exception in thread "main" brut.androlib.AndrolibException: java.nio.file.NoSuch
FileException: jsr305_annotations/
        at brut.androlib.Androlib.buildUnknownFiles(Androlib.java:570)
        at brut.androlib.Androlib.build(Androlib.java:293)
        at brut.androlib.Androlib.build(Androlib.java:258)
        at brut.apktool.Main.cmdBuild(Main.java:233)
        at brut.apktool.Main.main(Main.java:88)
Caused by: java.nio.file.NoSuchFileException: jsr305_annotations/
        at com.sun.nio.zipfs.ZipFileSystem.checkParents(ZipFileSystem.java:856)
        at com.sun.nio.zipfs.ZipFileSystem.newOutputStream(ZipFileSystem.java:52
5)
        at com.sun.nio.zipfs.ZipPath.newOutputStream(ZipPath.java:792)
        at com.sun.nio.zipfs.ZipFileSystemProvider.newOutputStream(ZipFileSystem
Provider.java:285)
        at java.nio.file.Files.newOutputStream(Unknown Source)
        at java.nio.file.Files.copy(Unknown Source)
        at java.nio.file.CopyMoveHelper.copyToForeignTarget(Unknown Source)
        at java.nio.file.Files.copy(Unknown Source)
        at brut.androlib.Androlib.insertFile(Androlib.java:590)
        at brut.androlib.Androlib.buildUnknownFiles(Androlib.java:566)
        ... 4 more

I can attach the original .apk file if needed for testing.

Connor Tumbleson

unread,
Jan 22, 2014, 4:23:05 PM1/22/14
to apk...@googlegroups.com
This was fixed a few days after the release of Beta 7. See this on-going bug for a similar discussion: https://code.google.com/p/android-apktool/issues/detail?id=527

Antonio Blescia

unread,
Mar 12, 2015, 6:22:48 AM3/12/15
to apk...@googlegroups.com
I solve this problem using the force parameter:

java -jar apktool_2.0.0rc4.jar b -f -o test.apk

My JVM:
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)
Best Regards 
Reply all
Reply to author
Forward
0 new messages