BundleDecompiler
BundleDecompiler copied to clipboard
Recompilation of AAB with Target 31 or 32 is not working
Hi Periyasamy,
I'm using your solution for decompiling and recompiling AAB files for our automation tool.
I have noticed the Jar file is working well with Android target version up to 30.
When I tried building AAB with target 31 or 32 I'm getting bellow error.
It looks like you have tight dependency with build tools 30 on your Jar. Can you add option to use different build tools.
Thanks in advance . Looking forward to get access to the Jar source code as Open source and contribute in whatever way we can.
Error Traces :
build bundle Resources... build Decompiled Resources... /root/.tmp/BundleDecompiler//build-tools/30.0.3/linux/aapt2 compile --dir /app/deploy/zci/aabholder/fromcustomer/app-debug-31//base/res -o /app/deploy/zci/aabholder/fromcustomer/outputaabholder/tmp/build/res build bundle to proto.apk... cd /app/deploy/zci/aabholder/fromcustomer/outputaabholder/tmp/build; /root/.tmp/BundleDecompiler//build-tools/30.0.3/linux/aapt2 link --proto-format -o /app/deploy/zci/aabholder/fromcustomer/outputaabholder/tmp/proto.apk -I /root/.tmp/BundleDecompiler//platforms/android-30/android.jar -R ./res/*.flat --manifest /app/deploy/zci/aabholder/fromcustomer/app-debug-31//base/manifest/AndroidManifest.xml /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:3: error: resource android:color/system_neutral1_1000 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:4: error: resource android:color/system_neutral1_900 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:5: error: resource android:color/system_neutral1_0 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:6: error: resource android:color/system_neutral1_800 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:7: error: resource android:color/system_neutral1_700 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:8: error: resource android:color/system_neutral1_600 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:9: error: resource android:color/system_neutral1_500 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:10: error: resource android:color/system_neutral1_400 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:11: error: resource android:color/system_neutral1_300 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:12: error: resource android:color/system_neutral1_200 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:13: error: resource android:color/system_neutral1_100 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:14: error: resource android:color/system_neutral1_50 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:15: error: resource android:color/system_neutral1_10 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:16: error: resource android:color/system_neutral2_1000 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:17: error: resource android:color/system_neutral2_900 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:18: error: resource android:color/system_neutral2_0 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:19: error: resource android:color/system_neutral2_800 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:20: error: resource android:color/system_neutral2_700 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:21: error: resource android:color/system_neutral2_600 not found. /app/deploy/zci/aabholder/fromcustomer/app-debug-31/base/res/values-v31/colors.xml:22: error: resource android:color/system_neutral2_500 not found. Exception in thread "main" com.bundle.exception.EncodeDecodeException: 'BUILD_FAILED' at com.bundle.recompile.BuildManager.buildProtoFormatApk(BuildManager.java:354) at com.bundle.recompile.BuildManager.buildResourcesFiles(BuildManager.java:79) at com.bundle.recompile.BuildManager.buildResources(BuildManager.java:70) at com.bundle.recompile.BuildManager.buildAppBundle(BuildManager.java:37) at com.bundle.main.BundleDecompiler.doRunBundleDecompiler(BundleDecompiler.java:113) at com.bundle.main.BundleDecompiler.main(BundleDecompiler.java:35)
you can just replace the android.jar
file with the latest version in the .tmp/BundleDecompiler directory which will be located in your home directory