desword / android-apktool

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

java.nio.file.ReadOnlyFileSystemException while Copying unknown files/dir in building apk #622

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. download google maps apk from play store (it is also crashing on many other 
apps which i am developing but in all of them I am using maps api.)
2. java -jar apktool.jar decode --no-src --force maps.apk
3. java -jar apktool.jar build maps --output mapsrebuilt.apk --aapt 
"C:\Android\android-sdk\build-tools\19.0.3\aapt.exe"

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

E:\java -jar apktool.jar build maps --output mapsrebuilt.apk --aapt 
"C:\Android\android-sdk\build-tools\19.0.3\aapt.exe"
I: Using Apktool 2.0.0-625d04-SNAPSHOT on maps
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
I: Copying unknown files/dir...
Exception in thread "main" java.nio.file.FileSystemNotFoundException: 
E:\maps.apk
        at com.sun.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:120)
        at com.sun.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemPr
ovider.java:117)
        at java.nio.file.FileSystems.newFileSystem(Unknown Source)
        at java.nio.file.FileSystems.newFileSystem(Unknown Source)
        at brut.androlib.Androlib.insertFolder(Androlib.java:603)
        at brut.androlib.Androlib.buildUnknownFiles(Androlib.java:570)
        at brut.androlib.Androlib.build(Androlib.java:298)
        at brut.androlib.Androlib.build(Androlib.java:262)
        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?

Apktool 2.0.0-625d04-SNAPSHOT

Please provide any additional information below.

Original issue reported on code.google.com by a.shahza...@gmail.com on 19 Apr 2014 at 7:42

GoogleCodeExporter commented 9 years ago
A typo in the message subject it is "java.nio.file.FileSystemNotFoundException: 
" instead of "java.nio.file.ReadOnlyFileSystemException". Tried to update the 
subject but unable to find update option.

Original comment by a.shahza...@gmail.com on 19 Apr 2014 at 9:22

GoogleCodeExporter commented 9 years ago
http://pastebin.com/RBKT6rpB

Could not duplicate.

Original comment by connor.tumbleson on 20 Apr 2014 at 10:23

GoogleCodeExporter commented 9 years ago
Could you tell me from where i can get the jar file or source code of apktool 
2.0.0-94b90a-SNAPSHOT as latest committed code which i can access is 
2.0.0-625d04-SNAPSHOT and by using that jar file i am getting the above 
mentioned error.

Original comment by a.shahza...@gmail.com on 20 Apr 2014 at 10:29

GoogleCodeExporter commented 9 years ago
635d04 is the latest commit. I just built it and used that version and tested 
your exact commands on Windows & Linux.

My guess is thats its a permission thing in your setup, but can't be sure. If 
you have any more information to help me replicate, include it.

Original comment by connor.tumbleson on 20 Apr 2014 at 10:31

GoogleCodeExporter commented 9 years ago
I just download a new version of maps.apk and tried the tool on the apk and it 
is still giving me same error. I am using Windows 7 and samsung galaxy tab 2.

E:\>java -jar apktool.jar decode --no-src --force maps.apk
I: Using Apktool 2.0.0-625d04-SNAPSHOT on maps.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Shahzad\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying raw classes.dex file...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

E:\java -jar apktool.jar build maps --output mapst.apk --aapt 
"C:\Android\android-sdk\build-tools\19.0.3\aapt.exe"
I: Using Apktool 2.0.0-625d04-SNAPSHOT on maps
I: Copying classes.dex file...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
I: Copying unknown files/dir...
Exception in thread "main" java.nio.file.FileSystemNotFoundException: 
E:\mapst.apk
        at com.sun.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:120)
        at com.sun.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemPr
ovider.java:117)
        at java.nio.file.FileSystems.newFileSystem(Unknown Source)
        at java.nio.file.FileSystems.newFileSystem(Unknown Source)
        at brut.androlib.Androlib.insertFolder(Androlib.java:603)
        at brut.androlib.Androlib.buildUnknownFiles(Androlib.java:570)
        at brut.androlib.Androlib.build(Androlib.java:298)
        at brut.androlib.Androlib.build(Androlib.java:262)
        at brut.apktool.Main.cmdBuild(Main.java:236)
        at brut.apktool.Main.main(Main.java:88)

Original comment by a.shahza...@gmail.com on 20 Apr 2014 at 10:42

GoogleCodeExporter commented 9 years ago
To be precise i am facing the issue on almost all apk's in which external 
resources are added. on my machine i am using jdk 1.8.0. But i tried it with 
jdk.1.7 too, and i am getting same above mentioned exception.
Can someone guide me on this that what i am missing or what could be the 
problem?

Original comment by a.shahza...@gmail.com on 21 Apr 2014 at 10:19