BundleDecompiler
BundleDecompiler copied to clipboard
Unable to Decompile AAB
Hi, I've been trying to get this to work but each time I get an error saying Invalid Arguments. I've included the extract from our build process below so you can see the stack trace.
Are you able to publish the source code for this so the community can assist with issues like this?
2020-01-20T20:43:26.2940000Z java -jar /Users/runner/runners/2.163.1/work/r1/a/sample-app/Android_output/BundleDecompiler.jar decompile -in='/Users/runner/runners/2.163.1/work/r1/a/sample-app/Android_output/com.companyname.appname.aab' -out='/Users/runner/runners/2.163.1/work/r1/a/extractPath' 2020-01-20T20:43:26.2940290Z ========================== Starting Command Output =========================== 2020-01-20T20:43:26.3583000Z [command]/bin/bash --noprofile --norc /Users/runner/runners/2.163.1/work/_temp/6d5c9fd3-6c0e-4565-a0f4-51af876288f6.sh 2020-01-20T20:43:27.1950450Z Exception in thread "main" com.bundle.exception.EncodeDecodeException: 'INVALID ARGUMENTS' 2020-01-20T20:43:27.1952040Z at com.bundle.main.BundleDecompiler.doRunBundleDecompiler(BundleDecompiler.java:65) 2020-01-20T20:43:27.1952150Z at com.bundle.main.BundleDecompiler.main(BundleDecompiler.java:38)
Arguments is invalid please use "--in=" in place of "-in=" same for out "--out="
Argh... thank you - somehow the -- got auto-replaced with - in my editor. I'll give that a shot. Would you be interested in open sourcing the source code for this work? Asking because if we're going to take a dependency on this, we'd prefer to know that we can access the source code if needed.
It got further before failing:
2020-01-22T00:58:33.6852560Z java -jar /Users/runner/runners/2.163.1/work/r1/a/inspector-build/Android_output/BundleDecompiler.jar decompile --in='/Users/runner/runners/2.163.1/work/r1/a/inspector-build/Android_output/com.companyname.appname.aab' --out='/Users/runner/runners/2.163.1/work/r1/a/extractPath'
2020-01-22T00:58:33.6853020Z ========================== Starting Command Output ===========================
2020-01-22T00:58:33.7401010Z [command]/bin/bash --noprofile --norc /Users/runner/runners/2.163.1/work/_temp/bbe107fa-8649-4099-ad70-4b1c4f68c7a9.sh
2020-01-22T00:58:34.5480010Z Input AppBundle path: /Users/runner/runners/2.163.1/work/r1/a/inspector-build/Android_output/com.companyname.appname.aab
2020-01-22T00:58:34.5502680Z tools installing..,/Users/runner/.tmp/BundleDecompiler
2020-01-22T00:58:47.6344200Z Failed...,
2020-01-22T00:58:47.6362700Z decompile Smali sources...
2020-01-22T00:58:50.7334860Z decompile bundle Resources...
2020-01-22T00:58:50.7498140Z load framework table...
2020-01-22T00:58:50.7607310Z Build failed...,
2020-01-22T00:58:50.7638430Z load application table...
2020-01-22T00:58:50.7735600Z Build failed...,
2020-01-22T00:58:50.7759770Z decode AndroidManifest.xml...
2020-01-22T00:58:51.0487410Z decode resources xmls...
2020-01-22T00:58:53.6331210Z decode values xmls...
2020-01-22T00:58:53.6437230Z Exception in thread "main" javax.xml.transform.TransformerException: java.io.FileNotFoundException: /Users/runner/runners/2.163.1/work/r1/a/extractPath/base/res/values/public.xml (No such file or directory)
2020-01-22T00:58:53.6538500Z at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:513)
2020-01-22T00:58:53.6640040Z at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:328)
2020-01-22T00:58:53.6640970Z at com.bundle.xmlbuilder.XMLBuilder.createXMLFile(XMLBuilder.java:62)
2020-01-22T00:58:53.6641350Z at com.bundle.resources.comman.ApplicationResources.parsePublicXmlFile(ApplicationResources.java:223)
2020-01-22T00:58:53.6641850Z at com.bundle.resources.comman.ApplicationResources.parseValuesXmlResources(ApplicationResources.java:136)
2020-01-22T00:58:53.6642210Z at com.bundle.decompile.DecompileManger.decompileResources(DecompileManger.java:49)
2020-01-22T00:58:53.6642600Z at com.bundle.decompile.DecompileManger.decompile(DecompileManger.java:21)
2020-01-22T00:58:53.6643040Z at com.bundle.main.BundleDecompiler.doRunBundleDecompiler(BundleDecompiler.java:94)
2020-01-22T00:58:53.6643390Z at com.bundle.main.BundleDecompiler.main(BundleDecompiler.java:38)
2020-01-22T00:58:53.6643740Z Caused by: java.io.FileNotFoundException: /Users/runner/runners/2.163.1/work/r1/a/extractPath/base/res/values/public.xml (No such file or directory)
2020-01-22T00:58:53.6644200Z at java.io.FileOutputStream.open0(Native Method)
2020-01-22T00:58:53.6644550Z at java.io.FileOutputStream.open(FileOutputStream.java:270)
2020-01-22T00:58:53.6651650Z at java.io.FileOutputStream.
- which OS you are using?
- Attach failed .aab file here in zip format.
@TamilanPeriyasamy I've tried running on both Windows (local dev machine) and MacOS (Azure DevOps build agent). What's best email for me to send the .aab too? You can DM me on Twitter at https://twitter.com/thenickrandolph
java -jar /Users//chengcl/Downloads/appbundle/BundleDecompiler.jar d --in=Downloads/appbundle/debug.aab --out=/Users//chengcl/Downloads/appbundle/debug
Input AppBundle path: Downloads/appbundle/debug.aab
Failed...,
decompile Smali sources...
decompile bundle Resources...
load framework table...
Build failed...,
load application table...
Build failed...,
decode AndroidManifest.xml...
decode resources xmls...
decode values xmls...
Exception in thread "main" javax.xml.transform.TransformerException: java.io.FileNotFoundException: /Users/chengcl/Downloads/appbundle/debug/base/res/values/public.xml (No such file or directory)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:521)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:336)
at com.bundle.xmlbuilder.XMLBuilder.createXMLFile(XMLBuilder.java:62)
at com.bundle.resources.comman.ApplicationResources.parsePublicXmlFile(ApplicationResources.java:223)
at com.bundle.resources.comman.ApplicationResources.parseValuesXmlResources(ApplicationResources.java:136)
at com.bundle.decompile.DecompileManger.decompileResources(DecompileManger.java:49)
at com.bundle.decompile.DecompileManger.decompile(DecompileManger.java:21)
at com.bundle.main.BundleDecompiler.doRunBundleDecompiler(BundleDecompiler.java:94)
at com.bundle.main.BundleDecompiler.main(BundleDecompiler.java:38)
Caused by: java.io.FileNotFoundException: /Users/chengcl/Downloads/appbundle/debug/base/res/values/public.xml (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:101)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:494)
... 8 more
java.io.FileNotFoundException: /Users/chengcl/Downloads/appbundle/debug/base/res/values/public.xml (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.
@nickrandolph you can decompile success now? i get the same issue with you now.
Latest version published, check now. BundleDecompiler-0.0.2.jar.