> For the complete documentation index, see [llms.txt](https://docs.talsec.app/freerasp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.talsec.app/freerasp/freerasp/wiki/threat-detection/adb-enabled-detection-android-devices-only.md).

# ADB enabled detection \[Android devices only]

ADB (Android Debug Bridge) Enabled is a power-user feature activated through the "USB Installation" option in the Developer settings. This state can signal potential security risks, such as apps being installed via USB, the device being connected to a man-in-the-middle (MiTM) proxy, or the device running as an emulator.

When ADB is enabled (either via USB or Wireless/Wi-Fi), it allows extensive access to the device, including pulling and pushing files, issuing shell commands, working with the activity manager (e.g., starting activities, broadcasting intents, modifying hidden Android settings, attaching a profiler to a process, or making an app debuggable), and managing packages. Additionally, it enables capturing screenshots, recording the screen, and other actions that can compromise app security and user privacy.

FreeRASP monitors and detects whether any form of ADB debugging is active on the device, providing protection against both physical and network-based debugging attempts.

Below are code snippets demonstrating ADB enabled detection across various platforms:

{% tabs %}
{% tab title="Android" %}

```kotlin
override fun onAdbEnabled() {
    TODO("Not yet implemented")
}
```

{% endtab %}

{% tab title="Flutter" %}

```dart
onAdbEnabled: () => print("ADB Enabled detected"),
```

{% endtab %}

{% tab title="React Native" %}

```javascript
adbEnabled: () => {
    // Place your reaction here
},
```

{% endtab %}

{% tab title="Capacitor" %}

```typescript
adbEnabled: () => {
    // Place your reaction here
},
```

{% endtab %}

{% tab title="Cordova" %}

```javascript
adbEnabled: () => {
    // Place your reaction here
},
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Recommended action:** Log the event on your BE
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.talsec.app/freerasp/freerasp/wiki/threat-detection/adb-enabled-detection-android-devices-only.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
