๐ฑ 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?
- Step 1: Grant Permission
- Step 2: Access Storage
- Practical Example
- Using Termux Shortcuts
- CLI Output
- Pro Tips
- Key Takeaways
- Related Articles
๐ค 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.
๐ 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
๐ฅ️ 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-storageonce after install - Use shortcuts (~ /storage) for faster navigation
- Avoid deleting system files
- Use
pwdto 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