Skip to main content
added 76 characters in body
Source Link
ce4
  • 14.5k
  • 10
  • 61
  • 106

Chmod will never be supported. That's on purpose according to comments in the source code.

Here's a reference to the FUSE implementation on Github pointing to a comment that says this.

And the original head on Googlesource (a bit harder to navigate than Github).

Even root cannot bypass it:

shell@android: # id     
uid=0(root) gid=0(root)    
shell@android: # touch /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     sdcard_rwmedia_rw        0 2013-01-05 17:35 x    
shell@android: # chmod 777 /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     sdcard_rwmedia_rw        0 2013-01-05 17:35 x    
shell@android: # chmod 000 /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     sdcard_rwmedia_rw        0 2013-01-05 17:35 x

Note that ownership is hardcoded to media_rw:media_rw (below /data/media). PS: /data/media is another story, all the regular permissions apply here, it's ext4 and root is allowed to do whatever it wants.

Chmod will never be supported. That's on purpose according to comments in the source code.

Here's a reference to the FUSE implementation on Github pointing to a comment that says this.

And the original head on Googlesource (a bit harder to navigate than Github).

Even root cannot bypass it:

shell@android: # id     
uid=0(root) gid=0(root)    
shell@android: # touch /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     sdcard_rw        0 2013-01-05 17:35 x    
shell@android: # chmod 777 /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     sdcard_rw        0 2013-01-05 17:35 x    
shell@android: # chmod 000 /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     sdcard_rw        0 2013-01-05 17:35 x

/data/media is another story, all the regular permissions apply here, it's ext4 and root is allowed to do whatever it wants.

Chmod will never be supported. That's on purpose according to comments in the source code.

Here's a reference to the FUSE implementation on Github pointing to a comment that says this.

And the original head on Googlesource (a bit harder to navigate than Github).

Even root cannot bypass it:

shell@android: # id     
uid=0(root) gid=0(root)    
shell@android: # touch /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     media_rw        0 2013-01-05 17:35 x    
shell@android: # chmod 777 /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     media_rw        0 2013-01-05 17:35 x    
shell@android: # chmod 000 /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     media_rw        0 2013-01-05 17:35 x

Note that ownership is hardcoded to media_rw:media_rw (below /data/media). PS: /data/media is another story, all the regular permissions apply here, it's ext4 and root is allowed to do whatever it wants.

added test
Source Link
ce4
  • 14.5k
  • 10
  • 61
  • 106

Chmod will never be supported. That's on purpose according to comments in the source code.

Here's a reference to the FUSE implementation on Github pointing to a comment that says this.

And the original head on Googlesource (a bit harder to navigate than Github).

Even root cannot bypass it:

shell@android: # id     
uid=0(root) gid=0(root)    
shell@android: # touch /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     sdcard_rw        0 2013-01-05 17:35 x    
shell@android: # chmod 777 /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     sdcard_rw        0 2013-01-05 17:35 x    
shell@android: # chmod 000 /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     sdcard_rw        0 2013-01-05 17:35 x

/data/media is another story, all the regular permissions apply here, it's ext4 and root is allowed to do whatever it wants.

Chmod will never be supported. That's on purpose according to comments in the source code.

Here's a reference to the FUSE implementation on Github pointing to a comment that says this.

And the original head on Googlesource (a bit harder to navigate than Github).

Chmod will never be supported. That's on purpose according to comments in the source code.

Here's a reference to the FUSE implementation on Github pointing to a comment that says this.

And the original head on Googlesource (a bit harder to navigate than Github).

Even root cannot bypass it:

shell@android: # id     
uid=0(root) gid=0(root)    
shell@android: # touch /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     sdcard_rw        0 2013-01-05 17:35 x    
shell@android: # chmod 777 /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     sdcard_rw        0 2013-01-05 17:35 x    
shell@android: # chmod 000 /mnt/sdcard/x; ls -l /data/media/0/x    
-rw-rw-r-- media_rw     sdcard_rw        0 2013-01-05 17:35 x

/data/media is another story, all the regular permissions apply here, it's ext4 and root is allowed to do whatever it wants.

Source Link
ce4
  • 14.5k
  • 10
  • 61
  • 106

Chmod will never be supported. That's on purpose according to comments in the source code.

Here's a reference to the FUSE implementation on Github pointing to a comment that says this.

And the original head on Googlesource (a bit harder to navigate than Github).