Skip to content

Commit a26609c

Browse files
committed
core: skip problematic ELF files if any (#12)
1 parent 618e80c commit a26609c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

extract_jni.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,12 @@ def extract_so_files(apkfile: str) -> Iterator[SoFile]:
220220

221221

222222
def parse_so_sync(sofile: SoFile):
223-
funcs = get_exported_functions(sofile.data)
223+
try:
224+
funcs = get_exported_functions(sofile.data)
225+
except Exception as e:
226+
console = Console()
227+
console.log(f"skip library {sofile.name}: {e}")
228+
funcs = {}
224229
return {k: v for k, v in funcs.items() if k.startswith("Java_") or k in JNI_COMMON}
225230

226231

0 commit comments

Comments
 (0)