FrenchYeti / dexcalibur

[Official] Android reverse engineering tool focused on dynamic instrumentation automation leveraging Frida. It disassembles dex, analyzes it statically, generates hooks, discovers reflected methods, stores intercepted data and does new things from it. Its aim is to be an all-in-one Android reverse engineering platform.
Apache License 2.0
1.06k stars 126 forks source link

ENOENT lstat on workspace #17

Closed baptistapedro closed 3 years ago

baptistapedro commented 4 years ago
[*] 2713 field calls mapped
[INFO] Scanning default path : /home/lamba/workspace/org.telegram.messenger/dex
internal/fs/utils.js:220
    throw err;
    ^

Error: ENOENT: no such file or directory, lstat '/home/lamba/workspace/org.telegram.messenger/dex'
    at Object.lstatSync (fs.js:906:3)
    at Object.forEachFileOf (/home/lamba/dexcalibur/src/Utils.js:86:66)
    at Analyzer.path (/home/lamba/dexcalibur/src/Analyzer.js:892:12)
    at Project.fullscan (/home/lamba/dexcalibur/src/Project.js:381:22)
    at Object.<anonymous> (/home/lamba/dexcalibur/dexcalibur:169:37)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10) {
  errno: -2,
  syscall: 'lstat',
  code: 'ENOENT',
  path: '/home/lamba/workspace/org.telegram.messenger/dex'
}
FrenchYeti commented 4 years ago

Hello,

how did you launch dexcalibur ? What is your command ?

Is apktool configured into config.js ?

baptistapedro commented 4 years ago

1 - ./dexcalibur --app=org.telegram.messenger --port=8000 --pull 2 - ./dexcalibur --app=org.telegram.messenger --port=8000

Yes I got the path to apk as follows: /home/lamba/Desktop/apktool.jar I got it pointed to the jar file directly, I assume theres no problem with that.

FrenchYeti commented 4 years ago

Can you test with "java --jar /home/lamba/Desktop/apktool.jar" into "apktPath" into config file ?

baptistapedro commented 4 years ago

Didnt work either. I remain with the same bug

FrenchYeti commented 4 years ago

This error occurs when APK file pull from device has not been successfully extracted with APKTool.

Can you remove "/home/lamba/workspace/org.telegram.messenger/" from your workspace, rerun the command and and copy here full output of dexcalibur ?

baptistapedro commented 4 years ago

Sure. https://dpaste.org/pyKJ/raw

FrenchYeti commented 4 years ago

Okay, i found the issue. Is it not relatde to APKtool but it is caused by an issue into Device Manager of Dexcalibur.

Please, can you send me the output of "adb devices" and "adb shell pm path org.telegram.messenger" ?

FrenchYeti commented 3 years ago

I close this issue. Feel free to reopen it, if the problem persists with latest version.