> 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.&#x20;

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.&#x20;

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:

```dart
// Android ADB enabled detection
override fun onAdbEnabled() {
    TODO("Not yet implemented")
}

// Flutter ADB enabled detection
onADBEnabled: () => print("ADB Enabled detected")

// Cordova ADB enabled detection
adbEnabled: () => {
    // Place your reaction here
}

// React Native ADB enabled detection
adbEnabled: () => {
    // Place your reaction here
}

// Capacitor ADB enabled detection
adbEnabled: () => {
    // Place your reaction here
}
```

{% 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
