16 votes
Accepted

Can't use chmod to alter permissions on emulated phone

Figured it out - seems like you just can't change permissions for files on sdcard. Moved it to data/local and chmod worked like a charm.
Rachel L's user avatar
  • 341
15 votes

No permissions for Termux to access internal storage - even for reading

Following the Termux wiki to run termux-setup-storage fixed it for me, as suggested by fornwall. then restart Termux.
Jensenmann's user avatar
11 votes
Accepted

Is it possible to change file permissions on Android's internal storage?

On all operating systems based on Linux kernel - like Android is - it's possible to set permissions on files (including directories) provided that filesystem supports UNIX permissions (uid, gid, mode)....
Irfan Latif's user avatar
  • 19.9k
11 votes

How to access /storage/emulated/10 (multi-users env) in adb shell on Android 9+ without root access?

WHY IS ADB DENIED ACCESS TO MULTI-USER STORAGE? Access to /storage/emulated/10 is denied from adb shell due to this change in Android 9: Add "default_normal" support to vold. This new flag ...
Irfan Latif's user avatar
  • 19.9k
9 votes

SimpleSSHD - create reusable user/password?

I am new myself, but this is how I managed to do it Generate SSH keys on your client (RPi in this case) system A. Use the command ssh-keygen -t rsa -b 4096 -C "optional_identifying_comment" ...
Kit's user avatar
  • 191
7 votes

`adb pull /data` fails with "0 files pull 0 file skipped"

If your phone's rooted, there are three ways to go around this. The first one is to use ADBD insecure. The other one is to move it to another folder with root and then pull it from there: $ adb ...
Juan's user avatar
  • 71
7 votes

How to change the modified date of a file without root?

SHORT ANSWER: You can simply touch the file or provide any time and date in past or future: ~$ touch /sdcard/test_file ~# debugfs -R 'stat media/0/test_file' /dev/block/bootdevice/by-name/userdata | ...
Irfan Latif's user avatar
  • 19.9k
6 votes
Accepted

Run downloaded shell command without root?

Yes, this is by design. You can't execute binaries from the SD card without system or superuser privileges (and remounting it without the noexec option) because otherwise apps could just download and ...
Matthew Read's user avatar
  • 50.5k
5 votes

No permissions for Termux to access internal storage - even for reading

Newer versions of Android require apps to ask for permission during runtime. You may have noticed this already. One example is Chrome asking for the Storage permission when you try to download ...
ColinTNMP's user avatar
5 votes

Run downloaded shell command without root?

Android, just as Linux, prevents any user but root, to change the permission bits of any file not owned by such user. That said, chmod is ineffective, unless you have root privileges. By the way, ...
Grimoire's user avatar
  • 2,969
4 votes

adb push ... Permission denied

I had a variation of this problem so going to leave it here in case someone else googles for it: ./adb push update.zip /sdcard [ 0%] C:/Users/Alex/AppData/Local/Programs/Git/sdcard adb: error: ...
alexandroid's user avatar
4 votes

adb push ... Permission denied

The usual approach, which doesn't require any additional apps: Push to /data/tmp/; Copy on the device using adb shell, using cp if it's available on your device or cat if it isn't. > adb push ...
Alexey Romanov's user avatar
4 votes

Run C-executable from SD card on Termux

Finally I got it to work. Programs can only be run if they are located at the home directory of termux. That is, run pwd to know where the home directory is and put the source files there, then ...
nopeva's user avatar
  • 161
4 votes

How to remount sdcardfs to allow setting file permisions / ownerships?

You cannot change permissions and ownerships of files on sdcardfs. On all operating systems based on Linux kernel - like Android is - it's possible to set permissions on files (including directories) ...
Irfan Latif's user avatar
  • 19.9k
4 votes
Accepted

How much of the Android filesystem is visible over MTP?

MTP - an extension to PTP - is a client-server protocol, roughly like FTP. MTP client on PC sends operation requests (like GET_OBJECT, SEND_OBJECT, DELETE_OBJECT) to server running on Android device ...
Irfan Latif's user avatar
  • 19.9k
4 votes

Termux access /sdcard/data

I believe that you are talking about /sdcard/Android/data instead of /sdcard/data. From what I gathered, this is an intentional "security" feature. It is possible to bypass by root, but that ...
Tada Fireworks's user avatar
3 votes
Accepted

How can I find the group id (gid) for the sdcard_r group on android?

Use the following command to see GID of the concerned group: id -G group_name Courtesy of this answer of doylefermi. It is very much possible that the GID would be 1028 given this line in source ...
Firelord's user avatar
  • 24.9k
3 votes

What file systems can I use for a 128GB sdcard on Android 7.1, used as portable storage

Stock android only supports mounting FAT32 drives as portable storage if mounted system-wide (r/w). Supported partitions may vary depending on device to device. Its dependent on manufacturer/...
zapper123's user avatar
3 votes

What file systems can I use for a 128GB sdcard on Android 7.1, used as portable storage

If 'journaling' is a requirement, then the EXT family (preferrably ext4) mighy be your only choice. Otherwise exFAT is the best. Just FYI, data safety depends more on your hardware rather than ...
iBug's user avatar
  • 7,666
3 votes
Accepted

What is actually happening on the rom when I rooting android device? What is happen on rooting?

When you use your phone, access applications and navigate it's file system, you do so as a user with a given set of permissions. This places certain restrictions on what you can and can't do or access....
David Greaves's user avatar
3 votes
Accepted

remount /mnt as read-write

Use these commands su -c 'busybox mount -o remount,rw /' # this will remount rootfs at / in rw mode su -c 'mkdir /mnt/"NEW_DIR"' # replace NEW_DIR with the name of the directory you ...
Firelord's user avatar
  • 24.9k
3 votes
Accepted

Why is the '/storage/emulated/' directory inaccessible?

On Android 6+ /storage is a mountpoint where tmpfs is (bind) mounted (from /mnt/runtime/default) with mode 0755 i.e. it's world-readable. For every app /storage/emulated is a bind mount in an ...
Irfan Latif's user avatar
  • 19.9k
2 votes

Can't set date via shell

The following worked for me (once you have root permissions): adb shell settings put global auto_time 0 && adb shell date 010219302018.00 set && adb shell am broadcast -a android....
Vinayak Soni's user avatar
2 votes
Accepted

Real root can not change any thing on /system original files!

Based on my comment and Yasser's subsequent comment , I can conclude that the issue was the immutable attribute set on the file build.prop. If other files and directories also can't be edited or ...
Firelord's user avatar
  • 24.9k
2 votes

Can't change file and folder permissions on rooted device

I guess the file system you are working on is mounted as readonly mode. /system is readonly by default. You need to run the following command to re-mount it as read-write su mount -o rw,remount,rw /...
Simon J. Liu's user avatar
2 votes

No permissions for Termux to access internal storage - even for reading

it's July of 2017 & I had this same problem, googled for it, & arrived here. Matthew Read 's comment pointed the way to the solution, but there's no answer that spells it out clearly, so here'...
Nathan Smith's user avatar
2 votes
Accepted

Unknown file type containing a virus

File extensions tend to be present only as mnemonics for the user to quickly identify a file, and for software to filter out incompatible files prior to loading and opening them. The latter explains ...
Grimoire's user avatar
  • 2,969
2 votes
Accepted

Copying files from PC to "external" SD card

If you're not insisting on a wireless transfer, using an USB cable would give you at least two options: Using mtp Using adb With MTP, on connecting the device to your computer you should usually get ...
Izzy's user avatar
  • 90.8k
2 votes

Exclude an Android/data folder from cache cleanup

There is not an Android built-in feature to exclude a folder from scan. Hiding a folder may be useful but in this case the folder will be created again. So using an app called Clean master lite you ...
CheckYourSec's user avatar
2 votes

Why do I have to get permission to save to my own phone?

As @Robert mentions in his excellent comment, the permission system on Android is not user-based, but app-based. Although newer Android versions have some multi-user support, the general attitude of ...
peterh's user avatar
  • 906

Only top scored, non community-wiki answers of a minimum length are eligible