> For the complete documentation index, see [llms.txt](https://docs.udroid.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.udroid.org/udroid-landing/tips-and-tricks/external-sdcard-access.md).

# External Sdcard Access

A guide to access content of external sdcard in termux

## Prerequisites

* Android version 10 or above and termux installed.
* A PC with [<mark style="color:orange;">`android-platform-tools`</mark>](https://developer.android.com/studio/releases/platform-tools) installed. or any **adb OTG** app, is REQUIRED.
* Also, device must be connected to pc and ready for [usb debugging](https://developer.android.com/studio/debug/dev-options#enable)

{% hint style="warning" %}
It requires API LEVEL 29+, so it will not work for devices with android 9 or below.

only Android versions ( 11, 12, 13 ) are tested and working fine
{% endhint %}

## Process

{% hint style="info" %}
Assuming the user has already configured platform tools and adb in pc and connected device successfully.
{% endhint %}

### Granting permissions to termux

This method involves granting permission `WRITE_EXTERNAL_STORAGE` and `READ_EXTERNAL_STORAGE` to termux app with adb explicitly, so that termux access external storage.

```bash
adb shell pm grant com.termux android.permission.READ_EXTERNAL_STORAGE
adb shell pm grant com.termux android.permission.WRITE_EXTERNAL_STORAGE
```

Then you need to find out the external sdcard location to change the directory. this can be done via df Usually, all storage devices are mounted under \`/storage\` directory, so using this

```bash
df | grep /storage | cut -d "/" -f 4-
```

It will show all mounted at `/storage`. Now the one which is in pattern line \`716D-83Z0\` is your sdcard. Or you could use Zarchiver instead to find it's codename. Then change your directory to there and bingo you're on your external storage in termux.


---

# 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.udroid.org/udroid-landing/tips-and-tricks/external-sdcard-access.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.
