MCPcopy
hub / github.com/APKLab/APKLab / detectArchFromFilename

Function detectArchFromFilename

src/tools/frida.ts:441–448  ·  view source on GitHub ↗

* Fallback: detect architecture from gadget filename.

(filePath: string)

Source from the content-addressed store, hash-verified

439 * Fallback: detect architecture from gadget filename.
440 */
441function detectArchFromFilename(filePath: string): string | null {
442 const name = path.basename(filePath).toLowerCase();
443 if (name.includes("arm64") || name.includes("aarch64")) return "arm64-v8a";
444 if (name.includes("arm")) return "armeabi-v7a";
445 if (name.includes("x86_64") || name.includes("x64")) return "x86_64";
446 if (name.includes("x86") || name.includes("i386")) return "x86";
447 return null;
448}
449
450/**
451 * Find the smali file for a given class name.

Callers 2

detectArchFunction · 0.85
frida.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected