CalebFenton / simplify

Android virtual machine and deobfuscator
Other
4.45k stars 438 forks source link

Exception in thread "main" java.lang.NullPointerException #145

Open ghost opened 4 years ago

ghost commented 4 years ago

Provide specific APK, DEX, or file hash CameraGo.apk (Parrot043, 2020-04-13)

Describe the bug `Microsoft Windows [Version 10.0.18362.959] (c) 2019 Microsoft Corporation. All rights reserved.

E:\Android Reverse Engineering Tools\Deobfuscator>java -jar simplify.jar "E:\Android Reverse Engineering Tools\Deobfuscator\deobfuscateme.dex" [1 / 6321] Processing top level class Lige; (1 / 3) Executing top level method: Lige;->()V Simplifying: Lige;->()V Optimizations: constantized ifs = 0 constantized ops = 0 dead assignments removed = 0 dead ops removed = 0 dead results removed = 0 nops removed = 0 peephole optmizations = 0 unreflected fields = 0 unreflected methods = 0 useless gotos removed = 0 (2 / 3) Executing top level method: Lige;->()V Simplifying: Lige;->()V Optimizations: constantized ifs = 0 constantized ops = 0 dead assignments removed = 1 dead ops removed = 0 dead results removed = 0 nops removed = 0 peephole optmizations = 0 unreflected fields = 0 unreflected methods = 0 useless gotos removed = 0 (3 / 3) Executing top level method: Lige;->a(ILjava/lang/Object;)Ljava/lang/Object; Simplifying: Lige;->a(ILjava/lang/Object;)Ljava/lang/Object; Exception in thread "main" java.lang.NullPointerException at org.cf.smalivm.context.HeapItem.getValueType(HeapItem.java:93) at org.cf.simplify.strategy.ConstantPropagationStrategy.canConstantizeAddress(ConstantPropagationStrategy.java:97) at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at java.util.stream.IntPipeline$4$1.accept(Unknown Source) at java.util.Spliterators$IntArraySpliterator.forEachRemaining(Unknown Source) at java.util.Spliterator$OfInt.forEachRemaining(Unknown Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.util.stream.ReferencePipeline.collect(Unknown Source) at org.cf.simplify.strategy.ConstantPropagationStrategy.getValidAddresses(ConstantPropagationStrategy.java:107) at org.cf.simplify.strategy.ConstantPropagationStrategy.perform(ConstantPropagationStrategy.java:48) at org.cf.simplify.Optimizer.simplify(Optimizer.java:109) at org.cf.simplify.Launcher.executeMethods(Launcher.java:221) at org.cf.simplify.Launcher.run(Launcher.java:141) at org.cf.simplify.Main.main(Main.java:14)

E:\Android Reverse Engineering Tools\Deobfuscator>`

To Reproduce Took the classes.dex and tried to decompile java -jar simplify.jar "E:\Android Reverse Engineering Tools\Deobfuscator\deobfuscateme.dex"

Attempted work-arounds Did you try any work-arounds? Did you read the README? Didnt found any workarounds, yes!

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

CalebFenton commented 4 years ago

Thanks for filling out the issue template, but I don't have the sample so I can't reproduce.

What version of simplify are you using?

apkunpacker commented 4 years ago

as per as he given detail binary should be https://f.celsoazevedo.com/file/cfiles/gcm1/CameraGo.apk

from page https://www.celsoazevedo.com/files/android/google-camera/dev-parrot043/#apk1520

ghost commented 4 years ago

@CalebFenton any version of Google Camera Go should throw the given Nullpointer exception in title.

CalebFenton commented 4 years ago

I'll take a look at this specific bug, but if you're trying to deobfuscate an entire, large, commercial APK, you're going to see bugs. Simplify works best on 1.) actually obfuscated code (not just proguarded, which is usually malware) and 2.) specific classes or methods. Try excluding problematic classes or, better yet, only including the classes you care about.

On Wed, Jul 29, 2020 at 1:23 AM Stefan notifications@github.com wrote:

@CalebFenton https://github.com/CalebFenton any version of Google Camera Go should throw the given Nullpointer exception in title.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CalebFenton/simplify/issues/145#issuecomment-665515006, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKLG4RLA5DR345YHRZCLETR57L7FANCNFSM4PF67MQA .

ghost commented 4 years ago

I'll take a look at this specific bug, but if you're trying to deobfuscate an entire, large, commercial APK, you're going to see bugs. Simplify works best on 1.) actually obfuscated code (not just proguarded, which is usually malware) and 2.) specific classes or methods. Try excluding problematic classes or, better yet, only including the classes you care about. On Wed, Jul 29, 2020 at 1:23 AM Stefan @.***> wrote: @CalebFenton https://github.com/CalebFenton any version of Google Camera Go should throw the given Nullpointer exception in title. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#145 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKLG4RLA5DR345YHRZCLETR57L7FANCNFSM4PF67MQA .

I picked this apk because it is modified by a community member I wanted to see if there is some malware in it.But yeah you are right I should try other apk.