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

Device enrolment not working as SDK 31-33 isn't available #74

Closed kylemd closed 2 years ago

kylemd commented 2 years ago

Describe the bug I am unable to enrol my device successfully in the Dexcalibur UI as the platform returns [undefined] On closer inspection it is because my device is on Android 12L (SDK 32). The latest available platform in the WebUI is SDK30, so the devices' reported SDK is out of range.

To reproduce / to understand Install Dexcalibur. On first start, install all platforms. Restart Dexcalibur. Attempt to enrol device.

Expected behavior For device to enrol, and/or errors displayed in WebUI if enrolment has failed.

Traceback

Server started on : 8000
[INFO] [ADB] Enumerating connected devices ...
Execute command request : C:\Users\kyle\dexcaliburWS\.dxc\bin\platform-tools\adb.exe devices -l
* daemon not running; starting now at tcp:5037
* daemon started successfully
╔═══════════════════════════[ Enumerated devices ]═══════════════════════════════╗
║ usajaesmnmd1r                                                                  ║
╚════════════════════════════════════════════════════════════════════════════════╝

Execute command request : C:\Users\kyle\dexcaliburWS\.dxc\bin\platform-tools\adb.exe kill-server
{ success: true }
[INFO] [ADB] Enumerating connected devices ...
Execute command request : C:\Users\kyle\dexcaliburWS\.dxc\bin\platform-tools\adb.exe devices -l
* daemon not running; starting now at tcp:5037
* daemon started successfully
╔═══════════════════════════[ Enumerated devices ]═══════════════════════════════╗
║ rtnewxhbg5ptb                                                                  ║
╚════════════════════════════════════════════════════════════════════════════════╝

[INFO] [ADB] C:\Users\kyle\dexcaliburWS\.dxc\bin\platform-tools\adb.exe -s e1c904 shell getprop
[INFO] [FRIDA HELPER] Downloading https://github.com/frida/frida/releases/download/16.0.2/frida-server-16.0.2-android-arm64.xz ...
[INFO] [FRIDA HELPER] https://github.com/frida/frida/releases/download/16.0.2/frida-server-16.0.2-android-arm64.xz  downloaded.
[INFO] [FRIDA HELPER] Server download. Path: C:\Users\kyle\dexcaliburWS\.dxc\tmp\frida_server
[INFO] [FRIDA HELPER] Extracting server from archive ...
Execute command request : C:\Users\kyle\dexcaliburWS\.dxc\bin\platform-tools\adb.exe -s e1c904 push C:\Users\kyle\dexcaliburWS\.dxc\tmp\frida_ser /data/local/tmp/frida_server
Execute command request : C:\Users\kyle\dexcaliburWS\.dxc\bin\platform-tools\adb.exe -s e1c904 shell chmod 777 /data/local/tmp/frida_server
[ERROR] [ERROR][DEVICE] The platform of the device [e1c904] is [undefined]. Please, check into Platform Manager the target platform is available, and re-enroll your target device.
TypeError: Cannot read property 'getUID' of undefined
    at PlatformManager.install (C:\Users\kyle\Development\_Builds\dexcalibur\src\PlatformManager.js:61:90)
    at DeviceManager.enroll (C:\Users\kyle\Development\_Builds\dexcalibur\src\DeviceManager.js:583:26)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async C:\Users\kyle\Development\_Builds\dexcalibur\src\WebServer.js:662:38

Screenshots image

Desktop (please complete the following information):

If you think this issue is related to your device, please fill following information:

FrenchYeti commented 2 years ago

Dex file for Android API 31 / 32 /33 have been added to dexcalibur-registry ( https://github.com/FrenchYeti/dexcalibur-registry/commit/6f0a0895b6f159b621787e119a61d20574674d9f ).

Please, try again now :) Maybe you should install it from Platform manager.

kylemd commented 2 years ago

Yep, new SDKs correctly install now and I can now register my device over ADB. Thank you!