mildsunrise / darter

:detective: Dart / Flutter VM snapshot analyzer
GNU Affero General Public License v3.0
300 stars 55 forks source link

Issues while parsing libapp.so from a simple Flutter app #3

Open Pierre-vh opened 3 years ago

Pierre-vh commented 3 years ago

Hello,

I am trying to use Darter on a libapp.so extracted (unzipped) from a .APK generated by flutter from a simple Flutter app, however I'm encountering many issues.

The first one is this:

darter.core.ParseError: (24628, "Version (8ee4ef7a67df9845fba331734198a953) doesn't match with the one this parser was made for")

If I use strict=False, as instructed, I then get this error instead:

darter.core.ParseError: (24813, 'Cluster "FfiPointer" still not implemented')

Does this mean a functionality is missing from Darter, or am I misusing Darter?

Any help on this would be greatly appreciated.

Thank you very much.

mildsunrise commented 3 years ago

yes, functionality is missing on Darter. As the readme says, the snapshot format is not stable and changes frequently between versions.

Darter was made for Dart version 1ef83b86ae (Flutter v1.9.1), and some time has passed since then. The snapshot you're trying to parse has version 8ee4ef7a67df9845fba331734198a953 which corresponds to Flutter v1.22+. To be able to parse newer snapshots, Darter should be updated according to the changes that have been incorporated into Dart since then.

mildsunrise commented 3 years ago

Pull requests are welcome, otherwise I might look into it when I find some time.

rscloura commented 3 years ago

Hi, just wanted to let the OP know that I independently developed a parser for version 8ee4ef7a67df9845fba331734198a953, over at https://github.com/rscloura/Doldrums. As Darter is a lot more mature (and unfortunately I only found it halfway through my own project!), I will try to incorporate the necessary changes to Darter for version 8ee4ef7a67df9845fba331734198a953 if I have the time :)

mildsunrise commented 3 years ago

cool! sorry about the quality of the code, it isn't what I'd like it to be... ask me if you have any doubts

mildsunrise commented 3 years ago

I'm looking at implementing support for all versions after the supported one, which is v1.9.1 manually reviewing the code will take some time, 927 commits so far after initial filtering

maybe I'll only review Dart versions that are used in a Flutter prod/beta release, as I assume most use cases are for Flutter applications