Open kerneltea opened 2 years ago
oh, there's a new kind of snapshot? sorry, I've been disconnected from dart development for a while
yes, it seems they added a new kFullCore
kind of snapshot, in https://github.com/dart-lang/sdk/commit/d77fff73075426306d2c3d77ccf61afd3eba9ab1?branch=d77fff73075426306d2c3d77ccf61afd3eba9ab1, but they added it at the start so kFullAOT snapshots now have the number 3 rather than 2.
I should fix that but I have no time to get this project up to date, sorry. You can fix the code for your version, by changing:
to
kKind = [
('kFull', "Full snapshot of an application"),
('kFullCore', "Full snapshot of core libraries. Agnostic to null safety."),
('kFullJIT', "Full + JIT code"),
('kFullAOT', "Full + AOT code"),
('kMessage', "A partial snapshot used only for isolate messaging"),
('kNone', "gen_snapshot"),
('kInvalid', None),
]
Hello,
I am trying to use Darter on a libapp.so extracted (unzipped) from a .APK generated by flutter from a Flutter app, Encountered the following problem
Traceback (most recent call last): File "/Users/realcradle/dev/python/disassembly/main.py", line 110, in
getFiles('samples/libapp.so', '')
File "/Users/realcradle/dev/python/disassembly/main.py", line 91, in getFiles
s = parse_elf_snapshot(elfFile)
File "/Users/realcradle/dev/python/disassembly/darter/file.py", line 42, in parse_elf_snapshot
base = Snapshot(data=blobs[0], data_offset=offsets[0],
File "/Users/realcradle/dev/python/disassembly/darter/core.py", line 232, in parse
self.initialize_clusters()
File "/Users/realcradle/dev/python/disassembly/darter/core.py", line 374, in initialize_clusters
key = map1[self.kind]
KeyError: 3