Sunday, October 2, 2016

4.4 kitkat - How to "mount --bind" directories in Android 4.4?


I am just wondering is there a way to bind an internal /sdcard folder to another internal /sdcard folder and normal apps can write into it for Android versions since 4.4?


I have a folder named ./MyPics in the internal /sdcard. I want to bind it to ./DCIM/Camera, ./Pictures/Screenshots, ./Movies/Screencasts. The SD card is mounted in /mnt/shell/emulated/0 as sdcardfs, and it is symlinked to /storage/emulated/legacy. Moreover, there is a directory /storage/emulated/0, which is neither a mount point nor a symlink. It is a very weird directory.




  1. I tried follows:


    mount -o bind,dmask=0000,fmask=0000 /mnt/shell/emulated/0/MyPics /mnt/shell/emulated/0/DCIM/Camera  
    mount -o bind,dmask=0000,fmask=0000 /mnt/shell/emulated/0/MyPics /mnt/shell/emulated/0/Pictures/Screenshots
    mount -o bind,dmask=0000,fmask=0000 /mnt/shell/emulated/0/MyPics /mnt/shell/emulated/0/Movies/Screencasts


    but it has no use: Apps like Camera failed to write into /DCIM/Camera




  2. I tried follows:


    mount -o bind,dmask=0000,fmask=0000 /storage/emulated/legacy/MyPics /mnt/shell/emulated/0/...
    ....

    but it has no use either





  3. I tried follows:


    mount -o bind,dmask=0000,fmask=0000 /data/media/0/MyPics /data/media/0/...
    ....

    If there is a file named a.jpg in /MyPics, it appears in /data/media/0/DCIM/Camera, but it doesn't appear in /storage/emulated/legacy/DCIM/Camera




  4. I tried to use Apps like LuckPatcher to do the job, but it failed again







No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...