MCPcopy
hub / github.com/APKLab/APKLab / findProjectRoot

Function findProjectRoot

src/tools/frida.ts:168–179  ·  view source on GitHub ↗

* Find the APKTool project root from a file path.

(filePath: string)

Source from the content-addressed store, hash-verified

166 * Find the APKTool project root from a file path.
167 */
168function findProjectRoot(filePath: string): string | null {
169 let dir = path.dirname(filePath);
170 for (let i = 0; i < 10; i++) {
171 if (fs.existsSync(path.join(dir, APKTOOL_YML_FILENAME))) {
172 return dir;
173 }
174 const parent = path.dirname(dir);
175 if (parent === dir) break;
176 dir = parent;
177 }
178 return null;
179}
180
181export namespace frida {
182 /**

Callers 1

generateHookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected