Apktool: Bugs during apktool.jar compieltion from sources

Created on 8 Mar 2018  路  8Comments  路  Source: iBotPeaches/Apktool

@iBotPeaches

With latest updates on source code (3 days ago) I got this error during compilation on final tests

 [MENTION=292510]brut[/MENTION].androlib.aapt1.BuildAndDecodeTest > classMethod FAILED
    java.lang.NullPointerException
        at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:132)
        at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:115)
        at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:258)
        at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:124)
        at brut.androlib.aapt1.BuildAndDecodeTest.beforeClass(BuildAndDecodeTest.java:61)

brut.androlib.aapt1.LargeIntsInManifestTest > checkIfLargeIntsAreHandledTest FAILED
    java.lang.NullPointerException
        at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:132)
        at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:115)
        at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:258)
        at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:124)
        at brut.androlib.aapt1.LargeIntsInManifestTest.checkIfLargeIntsAreHandledTest(LargeIntsInManifestTest.java:66)

brut.androlib.aapt1.ProviderAttributeTest > isProviderStringReplacementWorking FAILED
    java.lang.NullPointerException
        at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:132)
        at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:115)
        at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:258)
        at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:124)
        at brut.androlib.aapt1.ProviderAttributeTest.isProviderStringReplacementWorking(ProviderAttributeTest.java:70)

brut.androlib.aapt1.UnknownCompressionTest > doubleExtensionStoredTest FAILED
    brut.directory.PathNotExist: Entry not found: assets/bin/Data/two.extension.file
        at brut.directory.ZipRODirectory.getCompressionLevel(ZipRODirectory.java:108)
        at brut.androlib.aapt1.UnknownCompressionTest.doubleExtensionStoredTest(UnknownCompressionTest.java:80)

brut.androlib.aapt1.UnknownCompressionTest > pkmExtensionDeflatedTest FAILED
    brut.directory.PathNotExist: Entry not found: assets/bin/Data/test.pkm
        at brut.directory.ZipRODirectory.getCompressionLevel(ZipRODirectory.java:108)
        at brut.androlib.aapt1.UnknownCompressionTest.pkmExtensionDeflatedTest(UnknownCompressionTest.java:69)

59 tests completed, 5 failed
Bug Windows

Most helpful comment

screen shot 2018-04-05 at 2 46 09 pm

Discovered issue. ZipPackage isn't aware of proper directory separator

All 8 comments

I meet the same problem too.Has anyone solved it?

I won't have a Windows computer till March 23, waiting on a part to arrive. I cannot investigate this until then. Any fixes are welcome in the meantime.

@bovirus @lxjump Any of you had a chance to look into this? I still don't have a Windows computer that works.

@iBotPeaches
Tests failing, but i can't figure out why. Here is normal log and debug log - maybe this can help you. If you need i can make any tests or give any additional info.
normal.log
debug.log
full_debug.log

Thanks. The full_debug one helps. I'll throw up a PR later tonight and let you guys test.

I identified a few issues. Some are not really fixable and more work-arounds. I will adjust documentation and list the requirements when building on Windows to work around these issues.

A few were real issues, should have some commits up later today/tomorrow and will close this.

screen shot 2018-04-05 at 2 46 09 pm

Discovered issue. ZipPackage isn't aware of proper directory separator

Was this page helpful?
0 / 5 - 0 ratings