Saturday, August 3, 2024

How to Access Shared Storage on Android Using Termux

Access Android Storage in Termux – Complete Step-by-Step Guide

๐Ÿ“ฑ Access Android Storage Using Termux (Step-by-Step Guide)

Imagine turning your Android phone into a mini Linux system. With Termux, you can do exactly that—and even access your phone’s internal storage like a pro.


๐Ÿ“š Table of Contents


๐Ÿค” Why Access Storage?

Accessing shared storage allows you to:

  • Edit files directly from terminal
  • Run scripts stored on your phone
  • Manage downloads efficiently
  • Use Linux tools on Android files

๐Ÿ” Step 1: Grant Storage Permission

termux-setup-storage

This command:

  • Requests permission from Android
  • Creates a storage folder
  • Adds shortcuts to common directories

๐Ÿ“‚ Step 2: Access Shared Storage

cd /storage/emulated/0

This takes you to your phone’s internal storage root.

Think of it as “C:\ drive” but for Android.

๐Ÿ“Œ Practical Example

Go to Downloads Folder

cd /storage/emulated/0/Download

Now you can:

  • List files → ls
  • Edit files → nano file.txt
  • Run scripts → bash script.sh

⚡ Using Termux Shortcuts

After setup, a shortcut directory is created:

cd ~/storage

Inside you’ll find:

  • downloads → Download folder
  • dcim → Camera images
  • music → Audio files
These are symbolic links (shortcuts), not actual folders.

๐Ÿ–ฅ️ CLI Output Example

Click to Expand
$ termux-setup-storage
Storage permission granted.

$ cd ~/storage
$ ls
downloads  dcim  music  pictures

$ cd downloads
$ ls
file1.txt  script.sh  image.png 

๐Ÿ› ️ Pro Tips

  • Always run termux-setup-storage once after install
  • Use shortcuts (~ /storage) for faster navigation
  • Avoid deleting system files
  • Use pwd to confirm location

๐Ÿ’ก Key Takeaways

  • Termux can access Android storage easily
  • Permissions are required once
  • Shortcuts simplify navigation
  • You can fully manage files via terminal

๐ŸŽฏ Final Thoughts

Once you unlock storage access in Termux, your Android device becomes far more powerful.

You’re no longer limited to apps—you’re working like a true Linux user.

No comments:

Post a Comment

Featured Post

How HMT Watches Lost the Time: A Deep Dive into Disruptive Innovation Blindness in Indian Manufacturing

The Rise and Fall of HMT Watches: A Story of Brand Dominance and Disruptive Innovation Blindness The Rise and Fal...

Popular Posts