termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
35.34k stars 3.72k forks source link

Shell Command in Android 11 #2092

Closed Dhruvkanani closed 3 years ago

Dhruvkanani commented 3 years ago

How to run shell command in android 11 using root to access path /data/data//*. I want to access the internal storage directories of other packages which was possible in android 10 but not in android 11. How to do that using a shell command? Thanks in advance

agnostic-apollo commented 3 years ago

Either install sudo or tsu.

And /data/data/<package_name> was not accessible before android 11 as well. You are likely confusing it with /storage/emulated/0/Android/data/<package_name> which is no longer accessible on android 11+.

For that path you can use its real path /data/media/0 if you have root for faster access, assuming you have not set up adoptable storage for removable sd card.

Or run termux-setup-storage and access its shortcut at ~/storage/shared/Android, but this will be slower due to the emulated sdcardfs filesystem.

As for "How to run shell command", we don't provide that support. There are plenty of guides online to learn shell.