Cannot invoke "com.reandroid.arsc.value.Entry.isScalar()" because "item" is null
Describe the bug
Running APKEditor with any of the options in any modes besides info generates a NullPointerException in the main thread almost immediately.
To Reproduce Steps to reproduce the behavior:
- Used version 'APKEditor-1.4.1.'
- Operating system 'Windows 10'
- Command 'java -jar APKEditor-1.4.1.jar d -i .\myapp.apk' However using all options this still fails
Log/Stacktrace
java.lang.NullPointerException: Cannot invoke "com.reandroid.arsc.value.Entry.isScalar()" because "item" is null
at com.reandroid.apk.ApkModule.lambda$filterResFileEntries$1(ApkModule.java:648)
at com.reandroid.arsc.item.StringItem.lambda$getUsers$0(StringItem.java:77)
at com.reandroid.utils.collection.ComputeIterator.getNext(ComputeIterator.java:52)
at com.reandroid.utils.collection.ComputeIterator.hasNext(ComputeIterator.java:38)
at com.reandroid.utils.collection.CollectionUtil.toList(CollectionUtil.java:180)
at com.reandroid.apk.ApkModule.filterResFileEntries(ApkModule.java:657)
at com.reandroid.apk.ApkModule.listResFiles(ApkModule.java:595)
at com.reandroid.apk.ApkModule.listResFiles(ApkModule.java:581)
at com.reandroid.apkeditor.protect.DirectoryConfuser.confuse(DirectoryConfuser.java:44)
at com.reandroid.apkeditor.protect.Protector.runCommand(Protector.java:59)
at com.reandroid.apkeditor.Options.runCommand(Options.java:59)
at com.reandroid.apkeditor.Main.run(Main.java:136)
at com.reandroid.apkeditor.Main.execute(Main.java:72)
at com.reandroid.apkeditor.Main.main(Main.java:57)
Used apk file I Cannot disclose the name of the app due to NDA contract. but this app is a real piece of work with multiple layers of obfuscation.
Additional context
apktool can decompile this but fails to recompile because of the DUMMY VALUE in the assets and the obfuscated resources. (this is my best guess so far).
Thanks a lot, using the new commit I was able to both decompile and recompile the app. Can you summarize how you bypass the resource obfuscation issue? I have tried everything and failed.