worawit / blutter

Flutter Mobile Application Reverse Engineering Tool
MIT License
760 stars 128 forks source link

error: expected: insn.id() == ARM64_INS_BL #11

Closed spr234 closed 8 months ago

spr234 commented 8 months ago

I am getting following error

Dart version: 3.1.0, Snapshot: 7dbbeeb8ef7b91338640dca3927636de, Target: android arm64 libapp is loaded at 0x1cb1b260000 Dart heap at 0x1cc00000000 Analyzing the application at ....\src\CodeAnalyzer_arm64.cpp: 984: error: expected: insn.id() == ARM64_INS_BL

I am using Windows

also tried on debian trixie, same error

How can I fix that?

worawit commented 8 months ago

I guess it is an unexpected generated code pattern from Dart compiler.

I pushed a patch to not stop the program if an error occurs in analysis step. You can rerun with "--rebuild" option. An error is still printed. Also, please give me an error message with printed assembly. I might be able to fix a bug.

spr234 commented 8 months ago

Here you go

Dart version: 3.1.0, Snapshot: 7dbbeeb8ef7b91338640dca3927636de, Target: android arm64 -- Configuring done (0.1s) -- Generating done (0.0s) -- Build files have been written to: /home/trixie/blutter/build/blutter_dartvm3.1.0_android_arm64 [10/10] Linking CXX executable blutter_dartvm3.1.0_android_arm64 -- Install configuration: "Release" -- Installing: /home/trixie/blutter/blutter/../bin/blutter_dartvm3.1.0_android_arm64 libapp is loaded at 0x7f9b91000000 Dart heap at 0x7f9a00000000 Analyzing the application Analysis error at line 1301 ILWBResult FunctionAnalyzer::processWriteBarrier(AsmInstruction): insn.id() == ARM64_INS_BL 0x8e3508: ldurb w17, [x0, #-1] 0x8e350c: and x16, x17, x16, lsr #2 0x8e3510: tst x16, x28, lsr #32 0x8e3514: b.eq #0x8e3520

worawit commented 8 months ago

Committed a fix.

I have no full assembly to check. So, it might be wrong. If there is still an error, can you send me a library?

spr234 commented 8 months ago

I am still getting

Analysis error at line 752 ILResult FunctionAnalyzer::processLoadFieldTableInstr(AsmInstruction): insn.id() == ARM64_INS_LDR 0x8e365c: b.ne #0x8e3674 0x8e3660: ldr x2, [x27, #0x900] 0x8e3664: add x24, x27, #0xc, lsl #12 0x8e3668: ldr x24, [x24, #0x660]

Where can I send you library?

By the way, apart from that error message, Blutter is working like a charm !!

worawit commented 8 months ago

I guess you don't have to send me a library anymore. Just fixed the last error. Thanks for a bug report.

spr234 commented 8 months ago

Yup, No more error Thankyou for making such tool.

mragonias commented 7 months ago

I have same error in dart 3.1.3