https://github.com/redphx/frida-tuya-sdk-debug
Debug Tuya SDK with Frida
https://github.com/redphx/frida-tuya-sdk-debug
frida tuya
Last synced: 7 months ago
JSON representation
Debug Tuya SDK with Frida
- Host: GitHub
- URL: https://github.com/redphx/frida-tuya-sdk-debug
- Owner: redphx
- Created: 2022-05-22T02:57:48.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-22T04:30:50.000Z (almost 4 years ago)
- Last Synced: 2025-06-06T12:48:23.329Z (9 months ago)
- Topics: frida, tuya
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 10
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Debug Tuya SDK with Frida
I use this script mainly for debugging Tuya BLE protocol for developing [redphx/python-tuya-ble](https://github.com/redphx/python-tuya-ble).
## Features
- Enable global logging.
- Enable Bluetooth logging.
- Disable SSL pinning.
- Support most apps using Tuya SDK: Tuya Smart, Smart Life, Adaprox Home...
## Requirements
- A Rooted Android phone. I'm using a POCO F3.
- Or you can use an Android Emulator. I tested wit [Genymotion](https://www.genymotion.com/) and it worked (you might not be able to control BLE devices with it without using a hub).
## Preparation
1. Install the app you want to debug on your phone.
3. Install [Frida CLI](https://frida.re/docs/installation/).
```
pip install frida-tools
```
3. Run `frida --v` to get CLI's version. Visit [Frida's Release page](https://github.com/frida/frida/releases) and download the correct version for `frida-server`. (Ex:
`frida-server-[VERSION]-android-[ARCH].xz`)
4. [Install frida-server](https://frida.re/docs/android/) on your rooted Android phone. Make sure you have Android's `adb` installed.
## Usage:
1. Pair your PC/Mac/Linux with your phone using ADB.
2. Run Frida script `debug.js`:
```
frida --no-pause -U -f [APP_PACKAGE_NAME] -l debug.js
```
with `[APP_PACKAGE_NAME]` is package name of the app you want to debug. For example: Tuya's package name is `com.tuya.smart`.
3. Use [Logcat Reader](https://play.google.com/store/apps/details?id=com.dp.logcatapp) to view and export logs. Remember to filter logs with your app's PID for better results.
4. Try to interact with your device. If you see something like this in logcat then you did correctly (this is the results from testing BLE device).

## Tested apps
- Tuya Smart 4.0.2
- Smart Life 4.0.2
- Adaprox Home 4.2.00